From 928f9879d012e5f557b5498c7c88cc7c3c0d2211 Mon Sep 17 00:00:00 2001 From: Dennis Loose Date: Thu, 5 Sep 2024 17:24:13 +0200 Subject: [PATCH 1/4] feat(bootstrap): track subiquity's main branch --- .gitmodules | 2 +- packages/subiquity_client/subiquity | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index 5a8eb59a6..2e5a337f9 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,4 @@ [submodule "subiquity"] path = packages/subiquity_client/subiquity url = https://github.com/canonical/subiquity.git - branch = ubuntu/noble + branch = main diff --git a/packages/subiquity_client/subiquity b/packages/subiquity_client/subiquity index f20135f3c..709044355 160000 --- a/packages/subiquity_client/subiquity +++ b/packages/subiquity_client/subiquity @@ -1 +1 @@ -Subproject commit f20135f3c705f3862595b0d08f14286e7ee48c1a +Subproject commit 70904435567eb28720d66702708a183be3db716b From 83f455a92d02e992414c3378d64a983065d5688d Mon Sep 17 00:00:00 2001 From: Olivier Gayot Date: Thu, 13 Jun 2024 09:39:45 +0200 Subject: [PATCH 2/4] generator: update to match Subiquity moved API types Subiquity is moving API types away from subiquity/common/types.py into subiquity/common/types/{__init__,storage}.py. Ensure the makefile follows the new architecture. Signed-off-by: Olivier Gayot --- packages/subiquity_client/generator/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/subiquity_client/generator/Makefile b/packages/subiquity_client/generator/Makefile index 386d4f497..b4498e746 100644 --- a/packages/subiquity_client/generator/Makefile +++ b/packages/subiquity_client/generator/Makefile @@ -1,4 +1,5 @@ -types_py = ../subiquity/subiquity/common/types.py +types_py = ../subiquity/subiquity/common/types/__init__.py \ + ../subiquity/subiquity/common/types/storage.py types_dart = ../lib/src/types.dart generate: From 0c60c7bcab64481773942d6deac0e50486f58e03 Mon Sep 17 00:00:00 2001 From: Dennis Loose Date: Fri, 6 Sep 2024 11:45:16 +0200 Subject: [PATCH 3/4] feat(subiquity_client): regenerate types this also removes the now obsolete code related to the deprecated WSL setup --- packages/subiquity_client/lib/src/client.dart | 39 - packages/subiquity_client/lib/src/types.dart | 1083 +- .../lib/src/types.freezed.dart | 14175 ++++++++-------- .../subiquity_client/lib/src/types.g.dart | 1546 +- .../test/subiquity_client_test.dart | 120 - .../subiquity_client/test/types_test.dart | 36 - .../lib/src/generated.mocks.dart | 161 +- 7 files changed, 8076 insertions(+), 9084 deletions(-) diff --git a/packages/subiquity_client/lib/src/client.dart b/packages/subiquity_client/lib/src/client.dart index 26fb53bb2..375a864ba 100644 --- a/packages/subiquity_client/lib/src/client.dart +++ b/packages/subiquity_client/lib/src/client.dart @@ -452,45 +452,6 @@ class SubiquityClient { } on HttpException catch (_) {} } - Future wslSetupOptions() async { - final request = await _openUrl('GET', 'wslsetupoptions'); - return _receive('wslsetupoptions()', request, WSLSetupOptions.fromJson); - } - - Future setWslSetupOptions(WSLSetupOptions options) async { - final request = await _openUrl('POST', 'wslsetupoptions'); - request.write(jsonEncode(options.toJson())); - return _receive('setWslSetupOptions($options)', request); - } - - Future wslConfigurationBase() async { - final request = await _openUrl('GET', 'wslconfbase'); - return _receive('wslconfbase()', request, WSLConfigurationBase.fromJson); - } - - Future setWslConfigurationBase(WSLConfigurationBase conf) async { - final request = await _openUrl('POST', 'wslconfbase'); - request.write(jsonEncode(conf.toJson())); - await _receive('setWslconfbase($conf)', request); - } - - Future wslConfigurationAdvanced() async { - final request = await _openUrl('GET', 'wslconfadvanced'); - return _receive( - 'wslconfadvanced()', - request, - WSLConfigurationAdvanced.fromJson, - ); - } - - Future setWslConfigurationAdvanced( - WSLConfigurationAdvanced conf, - ) async { - final request = await _openUrl('POST', 'wslconfadvanced'); - request.write(jsonEncode(conf.toJson())); - await _receive('setWslconfadvanced($conf)', request); - } - Future getKeyboardStep([String step = '0']) async { final params = {'index': jsonEncode(step)}; final request = await _openUrl('GET', 'keyboard/steps', params); diff --git a/packages/subiquity_client/lib/src/types.dart b/packages/subiquity_client/lib/src/types.dart index c4990b742..610be7067 100644 --- a/packages/subiquity_client/lib/src/types.dart +++ b/packages/subiquity_client/lib/src/types.dart @@ -303,458 +303,150 @@ class NetworkStatus with _$NetworkStatus { _$NetworkStatusFromJson(json); } -enum ProbeStatus { - PROBING, - FAILED, - DONE, +@freezed +class IdentityData with _$IdentityData { + const factory IdentityData({ + @Default('') String realname, + @Default('') String username, + @Default('') String cryptedPassword, + @Default('') String hostname, + }) = _IdentityData; + + factory IdentityData.fromJson(Map json) => + _$IdentityDataFromJson(json); } -enum Bootloader { - NONE, - BIOS, - UEFI, - PREP, +enum UsernameValidation { + OK, + ALREADY_IN_USE, + SYSTEM_RESERVED, + INVALID_CHARS, + TOO_LONG, } @freezed -class OsProber with _$OsProber { - const factory OsProber({ - required String long, - required String label, - required String type, - String? subpath, - String? version, - }) = _OsProber; +class SSHData with _$SSHData { + const factory SSHData({ + required bool installServer, + required bool allowPw, + @Default([]) List authorizedKeys, + }) = _SSHData; - factory OsProber.fromJson(Map json) => - _$OsProberFromJson(json); + factory SSHData.fromJson(Map json) => + _$SSHDataFromJson(json); } -@Freezed(unionKey: '\$type', unionValueCase: FreezedUnionCase.pascal) -class PartitionOrGap with _$PartitionOrGap { - @FreezedUnionValue('Partition') - const factory PartitionOrGap.partition({ - int? size, - int? number, - bool? preserve, - String? wipe, - @Default([]) List annotations, - String? mount, - String? format, - bool? grubDevice, - bool? boot, - OsProber? os, - int? offset, - @Default(-1) int? estimatedMinSize, - bool? resize, - String? path, - @Default(false) bool isInUse, - }) = Partition; - - @FreezedUnionValue('Gap') - const factory PartitionOrGap.gap({ - required int offset, - required int size, - required GapUsable usable, - }) = Gap; +@freezed +class SSHIdentity with _$SSHIdentity { + const factory SSHIdentity({ + required String keyType, + required String key, + required String keyComment, + required String keyFingerprint, + }) = _SSHIdentity; - factory PartitionOrGap.fromJson(Map json) => - _$PartitionOrGapFromJson(json); + factory SSHIdentity.fromJson(Map json) => + _$SSHIdentityFromJson(json); } -@freezed -class ZFS with _$ZFS { - const factory ZFS({ - required String volume, - Map? properties, - }) = _ZFS; - - factory ZFS.fromJson(Map json) => _$ZFSFromJson(json); +enum SSHFetchIdStatus { + OK, + IMPORT_ERROR, + FINGERPRINT_ERROR, } @freezed -class ZPool with _$ZPool { - const factory ZPool({ - required String pool, - required String mountpoint, - ZFS? zfses, - Map? poolProperties, - Map? fsProperties, - @Default(true) bool? defaultFeatures, - }) = _ZPool; +class SSHFetchIdResponse with _$SSHFetchIdResponse { + const factory SSHFetchIdResponse({ + required SSHFetchIdStatus status, + required List? identities, + required String? error, + }) = _SSHFetchIdResponse; - factory ZPool.fromJson(Map json) => _$ZPoolFromJson(json); + factory SSHFetchIdResponse.fromJson(Map json) => + _$SSHFetchIdResponseFromJson(json); } -enum GapUsable { - YES, - TOO_MANY_PRIMARY_PARTS, +enum SnapCheckState { + FAILED, + LOADING, + DONE, } @freezed -class Disk with _$Disk { - const factory Disk({ - required String id, - required String label, - required String type, +class ChannelSnapInfo with _$ChannelSnapInfo { + const factory ChannelSnapInfo({ + required String channelName, + required String revision, + required String confinement, + required String version, required int size, - required List usageLabels, - required List partitions, - required bool okForGuided, - required String? ptable, - required bool preserve, - required String? path, - required bool bootDevice, - required bool canBeBootDevice, - String? model, - String? vendor, - @Default(false) bool hasInUsePartition, - }) = _Disk; + required DateTime releasedAt, + }) = _ChannelSnapInfo; - factory Disk.fromJson(Map json) => _$DiskFromJson(json); + factory ChannelSnapInfo.fromJson(Map json) => + _$ChannelSnapInfoFromJson(json); } -enum GuidedCapability { - MANUAL, - DIRECT, - LVM, - LVM_LUKS, - ZFS, - ZFS_LUKS_KEYSTORE, - CORE_BOOT_ENCRYPTED, - CORE_BOOT_UNENCRYPTED, - CORE_BOOT_PREFER_ENCRYPTED, - CORE_BOOT_PREFER_UNENCRYPTED, - DD, -} +@freezed +class SnapInfo with _$SnapInfo { + const factory SnapInfo({ + required String name, + @Default('') String summary, + @Default('') String publisher, + @Default(false) bool verified, + @Default(false) bool starred, + @Default('') String description, + @Default('') String confinement, + @Default('') String license, + @Default([]) List channels, + }) = _SnapInfo; -enum GuidedDisallowedCapabilityReason { - TOO_SMALL, - CORE_BOOT_ENCRYPTION_UNAVAILABLE, - NOT_UEFI, - THIRD_PARTY_DRIVERS, + factory SnapInfo.fromJson(Map json) => + _$SnapInfoFromJson(json); } @freezed -class GuidedDisallowedCapability with _$GuidedDisallowedCapability { - const factory GuidedDisallowedCapability({ - required GuidedCapability capability, - required GuidedDisallowedCapabilityReason reason, - String? message, - }) = _GuidedDisallowedCapability; +class DriversResponse with _$DriversResponse { + const factory DriversResponse({ + required bool install, + required List? drivers, + required bool localOnly, + required bool searchDrivers, + }) = _DriversResponse; - factory GuidedDisallowedCapability.fromJson(Map json) => - _$GuidedDisallowedCapabilityFromJson(json); + factory DriversResponse.fromJson(Map json) => + _$DriversResponseFromJson(json); } @freezed -class StorageResponse with _$StorageResponse { - const factory StorageResponse({ - required ProbeStatus status, - ErrorReportRef? errorReport, - Bootloader? bootloader, - List? origConfig, - List? config, - Map? dasd, - @Default(1) int storageVersion, - }) = _StorageResponse; +class OEMResponse with _$OEMResponse { + const factory OEMResponse({ + required List? metapackages, + }) = _OEMResponse; - factory StorageResponse.fromJson(Map json) => - _$StorageResponseFromJson(json); + factory OEMResponse.fromJson(Map json) => + _$OEMResponseFromJson(json); } @freezed -class StorageResponseV2 with _$StorageResponseV2 { - const factory StorageResponseV2({ - required ProbeStatus status, - ErrorReportRef? errorReport, - @Default([]) List disks, - bool? needRoot, - bool? needBoot, - int? installMinimumSize, - }) = _StorageResponseV2; - - factory StorageResponseV2.fromJson(Map json) => - _$StorageResponseV2FromJson(json); -} +class CodecsData with _$CodecsData { + const factory CodecsData({ + required bool install, + }) = _CodecsData; -enum SizingPolicy { - SCALED, - ALL, + factory CodecsData.fromJson(Map json) => + _$CodecsDataFromJson(json); } @freezed -class GuidedResizeValues with _$GuidedResizeValues { - const factory GuidedResizeValues({ - required int installMax, - required int minimum, - required int recommended, - required int maximum, - }) = _GuidedResizeValues; +class DriversPayload with _$DriversPayload { + const factory DriversPayload({ + required bool install, + }) = _DriversPayload; - factory GuidedResizeValues.fromJson(Map json) => - _$GuidedResizeValuesFromJson(json); -} - -@Freezed(unionKey: '\$type', unionValueCase: FreezedUnionCase.pascal) -class GuidedStorageTarget with _$GuidedStorageTarget { - @FreezedUnionValue('GuidedStorageTargetReformat') - const factory GuidedStorageTarget.reformat({ - required String diskId, - @Default([]) List allowed, - @Default([]) List disallowed, - }) = GuidedStorageTargetReformat; - - @FreezedUnionValue('GuidedStorageTargetResize') - const factory GuidedStorageTarget.resize({ - required String diskId, - required int partitionNumber, - required int newSize, - required int? minimum, - required int? recommended, - required int? maximum, - @Default([]) List allowed, - @Default([]) List disallowed, - }) = GuidedStorageTargetResize; - - @FreezedUnionValue('GuidedStorageTargetUseGap') - const factory GuidedStorageTarget.useGap({ - required String diskId, - required Gap gap, - @Default([]) List allowed, - @Default([]) List disallowed, - }) = GuidedStorageTargetUseGap; - - @FreezedUnionValue('GuidedStorageTargetManual') - const factory GuidedStorageTarget.manual({ - required List allowed, - @Default([]) List disallowed, - }) = GuidedStorageTargetManual; - - factory GuidedStorageTarget.fromJson(Map json) => - _$GuidedStorageTargetFromJson(json); -} - -@freezed -class RecoveryKey with _$RecoveryKey { - const factory RecoveryKey({ - String? liveLocation, - String? backupLocation, - }) = _RecoveryKey; - - factory RecoveryKey.fromJson(Map json) => - _$RecoveryKeyFromJson(json); -} - -@freezed -class GuidedChoiceV2 with _$GuidedChoiceV2 { - const factory GuidedChoiceV2({ - required GuidedStorageTarget target, - required GuidedCapability capability, - String? password, - RecoveryKey? recoveryKey, - // TODO(Lukas): Change `generator.py` to accommodate for putting the - // SizingPolicy parameter together with the other required parameters. - required SizingPolicy? sizingPolicy, - @Default(false) bool resetPartition, - int? resetPartitionSize, - }) = _GuidedChoiceV2; - - factory GuidedChoiceV2.fromJson(Map json) => - _$GuidedChoiceV2FromJson(json); -} - -@freezed -class GuidedStorageResponseV2 with _$GuidedStorageResponseV2 { - const factory GuidedStorageResponseV2({ - required ProbeStatus status, - ErrorReportRef? errorReport, - GuidedChoiceV2? configured, - @Default([]) List targets, - }) = _GuidedStorageResponseV2; - - factory GuidedStorageResponseV2.fromJson(Map json) => - _$GuidedStorageResponseV2FromJson(json); -} - -@freezed -class AddPartitionV2 with _$AddPartitionV2 { - const factory AddPartitionV2({ - required String diskId, - required Partition partition, - required Gap gap, - }) = _AddPartitionV2; - - factory AddPartitionV2.fromJson(Map json) => - _$AddPartitionV2FromJson(json); -} - -@freezed -class ModifyPartitionV2 with _$ModifyPartitionV2 { - const factory ModifyPartitionV2({ - required String diskId, - required Partition partition, - }) = _ModifyPartitionV2; - - factory ModifyPartitionV2.fromJson(Map json) => - _$ModifyPartitionV2FromJson(json); -} - -@freezed -class ReformatDisk with _$ReformatDisk { - const factory ReformatDisk({ - required String diskId, - String? ptable, - }) = _ReformatDisk; - - factory ReformatDisk.fromJson(Map json) => - _$ReformatDiskFromJson(json); -} - -@freezed -class IdentityData with _$IdentityData { - const factory IdentityData({ - @Default('') String realname, - @Default('') String username, - @Default('') String cryptedPassword, - @Default('') String hostname, - }) = _IdentityData; - - factory IdentityData.fromJson(Map json) => - _$IdentityDataFromJson(json); -} - -enum UsernameValidation { - OK, - ALREADY_IN_USE, - SYSTEM_RESERVED, - INVALID_CHARS, - TOO_LONG, -} - -@freezed -class SSHData with _$SSHData { - const factory SSHData({ - required bool installServer, - required bool allowPw, - @Default([]) List authorizedKeys, - }) = _SSHData; - - factory SSHData.fromJson(Map json) => - _$SSHDataFromJson(json); -} - -@freezed -class SSHIdentity with _$SSHIdentity { - const factory SSHIdentity({ - required String keyType, - required String key, - required String keyComment, - required String keyFingerprint, - }) = _SSHIdentity; - - factory SSHIdentity.fromJson(Map json) => - _$SSHIdentityFromJson(json); -} - -enum SSHFetchIdStatus { - OK, - IMPORT_ERROR, - FINGERPRINT_ERROR, -} - -@freezed -class SSHFetchIdResponse with _$SSHFetchIdResponse { - const factory SSHFetchIdResponse({ - required SSHFetchIdStatus status, - required List? identities, - required String? error, - }) = _SSHFetchIdResponse; - - factory SSHFetchIdResponse.fromJson(Map json) => - _$SSHFetchIdResponseFromJson(json); -} - -enum SnapCheckState { - FAILED, - LOADING, - DONE, -} - -@freezed -class ChannelSnapInfo with _$ChannelSnapInfo { - const factory ChannelSnapInfo({ - required String channelName, - required String revision, - required String confinement, - required String version, - required int size, - required DateTime releasedAt, - }) = _ChannelSnapInfo; - - factory ChannelSnapInfo.fromJson(Map json) => - _$ChannelSnapInfoFromJson(json); -} - -@freezed -class SnapInfo with _$SnapInfo { - const factory SnapInfo({ - required String name, - @Default('') String summary, - @Default('') String publisher, - @Default(false) bool verified, - @Default(false) bool starred, - @Default('') String description, - @Default('') String confinement, - @Default('') String license, - @Default([]) List channels, - }) = _SnapInfo; - - factory SnapInfo.fromJson(Map json) => - _$SnapInfoFromJson(json); -} - -@freezed -class DriversResponse with _$DriversResponse { - const factory DriversResponse({ - required bool install, - required List? drivers, - required bool localOnly, - required bool searchDrivers, - }) = _DriversResponse; - - factory DriversResponse.fromJson(Map json) => - _$DriversResponseFromJson(json); -} - -@freezed -class OEMResponse with _$OEMResponse { - const factory OEMResponse({ - required List? metapackages, - }) = _OEMResponse; - - factory OEMResponse.fromJson(Map json) => - _$OEMResponseFromJson(json); -} - -@freezed -class CodecsData with _$CodecsData { - const factory CodecsData({ - required bool install, - }) = _CodecsData; - - factory CodecsData.fromJson(Map json) => - _$CodecsDataFromJson(json); -} - -@freezed -class DriversPayload with _$DriversPayload { - const factory DriversPayload({ - required bool install, - }) = _DriversPayload; - - factory DriversPayload.fromJson(Map json) => - _$DriversPayloadFromJson(json); + factory DriversPayload.fromJson(Map json) => + _$DriversPayloadFromJson(json); } @freezed @@ -900,200 +592,469 @@ enum ShutdownMode { POWEROFF, } +enum TaskStatus { + DO, + DOING, + DONE, + ABORT, + UNDO, + UNDOING, + HOLD, + ERROR, +} + +@freezed +class TaskProgress with _$TaskProgress { + const factory TaskProgress({ + @Default('') String label, + @Default(0) int done, + @Default(0) int total, + }) = _TaskProgress; + + factory TaskProgress.fromJson(Map json) => + _$TaskProgressFromJson(json); +} + +@freezed +class Task with _$Task { + const factory Task({ + required String id, + required String kind, + required String summary, + required TaskStatus status, + required TaskProgress progress, + }) = _Task; + + factory Task.fromJson(Map json) => _$TaskFromJson(json); +} + +@freezed +class Change with _$Change { + const factory Change({ + required String id, + required String kind, + required String summary, + required TaskStatus status, + required List tasks, + required bool ready, + String? err, + dynamic data, + }) = _Change; + + factory Change.fromJson(Map json) => _$ChangeFromJson(json); +} + +enum CasperMd5Results { + UNKNOWN, + FAIL, + PASS, + SKIP, +} + +enum MirrorCheckStatus { + OK, + RUNNING, + FAILED, +} + +@freezed +class MirrorCheckResponse with _$MirrorCheckResponse { + const factory MirrorCheckResponse({ + required String url, + required MirrorCheckStatus status, + required String output, + }) = _MirrorCheckResponse; + + factory MirrorCheckResponse.fromJson(Map json) => + _$MirrorCheckResponseFromJson(json); +} + +@freezed +class MirrorPost with _$MirrorPost { + const factory MirrorPost({ + String? elected, + List? candidates, + String? staged, + bool? useDuringInstallation, + }) = _MirrorPost; + + factory MirrorPost.fromJson(Map json) => + _$MirrorPostFromJson(json); +} + +enum MirrorPostResponse { + OK, + NO_USABLE_MIRROR, +} + +@freezed +class MirrorGet with _$MirrorGet { + const factory MirrorGet({ + required bool relevant, + required String? elected, + required List candidates, + required String? staged, + required bool useDuringInstallation, + }) = _MirrorGet; + + factory MirrorGet.fromJson(Map json) => + _$MirrorGetFromJson(json); +} + +enum MirrorSelectionFallback { + ABORT, + CONTINUE_ANYWAY, + OFFLINE_INSTALL, +} + +@freezed +class AdConnectionInfo with _$AdConnectionInfo { + const factory AdConnectionInfo({ + @Default('') String adminName, + @Default('') String domainName, + @Default('') String password, + }) = _AdConnectionInfo; + + factory AdConnectionInfo.fromJson(Map json) => + _$AdConnectionInfoFromJson(json); +} + +enum AdAdminNameValidation { + OK, + EMPTY, + INVALID_CHARS, +} + +enum AdDomainNameValidation { + OK, + EMPTY, + TOO_LONG, + INVALID_CHARS, + START_DOT, + END_DOT, + START_HYPHEN, + END_HYPHEN, + MULTIPLE_DOTS, + REALM_NOT_FOUND, +} + +enum AdPasswordValidation { + OK, + EMPTY, +} + +enum AdJoinResult { + OK, + JOIN_ERROR, + EMPTY_HOSTNAME, + PAM_ERROR, + UNKNOWN, +} + +enum ProbeStatus { + PROBING, + FAILED, + DONE, +} + +enum Bootloader { + NONE, + BIOS, + UEFI, + PREP, +} + +@freezed +class OsProber with _$OsProber { + const factory OsProber({ + required String long, + required String label, + required String type, + String? subpath, + String? version, + }) = _OsProber; + + factory OsProber.fromJson(Map json) => + _$OsProberFromJson(json); +} + +@Freezed(unionKey: '\$type', unionValueCase: FreezedUnionCase.pascal) +class PartitionOrGap with _$PartitionOrGap { + @FreezedUnionValue('Partition') + const factory PartitionOrGap.partition({ + int? size, + int? number, + bool? preserve, + String? wipe, + @Default([]) List annotations, + String? mount, + String? format, + bool? grubDevice, + bool? boot, + OsProber? os, + int? offset, + @Default(-1) int? estimatedMinSize, + bool? resize, + String? path, + @Default(false) bool isInUse, + }) = Partition; + + @FreezedUnionValue('Gap') + const factory PartitionOrGap.gap({ + required int offset, + required int size, + required GapUsable usable, + }) = Gap; + + factory PartitionOrGap.fromJson(Map json) => + _$PartitionOrGapFromJson(json); +} + +@freezed +class ZFS with _$ZFS { + const factory ZFS({ + required String volume, + Map? properties, + }) = _ZFS; + + factory ZFS.fromJson(Map json) => _$ZFSFromJson(json); +} + +@freezed +class ZPool with _$ZPool { + const factory ZPool({ + required String pool, + required String mountpoint, + ZFS? zfses, + Map? poolProperties, + Map? fsProperties, + @Default(true) bool? defaultFeatures, + }) = _ZPool; + + factory ZPool.fromJson(Map json) => _$ZPoolFromJson(json); +} + +enum GapUsable { + YES, + TOO_MANY_PRIMARY_PARTS, +} + +@freezed +class Disk with _$Disk { + const factory Disk({ + required String id, + required String label, + required String type, + required int size, + required List usageLabels, + required List partitions, + required bool okForGuided, + required String? ptable, + required bool preserve, + required String? path, + required bool bootDevice, + required bool canBeBootDevice, + String? model, + String? vendor, + @Default(false) bool hasInUsePartition, + }) = _Disk; + + factory Disk.fromJson(Map json) => _$DiskFromJson(json); +} + +enum GuidedCapability { + MANUAL, + DIRECT, + LVM, + LVM_LUKS, + ZFS, + ZFS_LUKS_KEYSTORE, + CORE_BOOT_ENCRYPTED, + CORE_BOOT_UNENCRYPTED, + CORE_BOOT_PREFER_ENCRYPTED, + CORE_BOOT_PREFER_UNENCRYPTED, + DD, +} + +enum GuidedDisallowedCapabilityReason { + TOO_SMALL, + CORE_BOOT_ENCRYPTION_UNAVAILABLE, + NOT_UEFI, + THIRD_PARTY_DRIVERS, +} + @freezed -class WSLConfigurationBase with _$WSLConfigurationBase { - const factory WSLConfigurationBase({ - @Default('/mnt/') String automountRoot, - @Default('') String automountOptions, - @Default(true) bool networkGeneratehosts, - @Default(true) bool networkGenerateresolvconf, - }) = _WSLConfigurationBase; +class GuidedDisallowedCapability with _$GuidedDisallowedCapability { + const factory GuidedDisallowedCapability({ + required GuidedCapability capability, + required GuidedDisallowedCapabilityReason reason, + String? message, + }) = _GuidedDisallowedCapability; - factory WSLConfigurationBase.fromJson(Map json) => - _$WSLConfigurationBaseFromJson(json); + factory GuidedDisallowedCapability.fromJson(Map json) => + _$GuidedDisallowedCapabilityFromJson(json); } @freezed -class WSLConfigurationAdvanced with _$WSLConfigurationAdvanced { - const factory WSLConfigurationAdvanced({ - @Default(true) bool automountEnabled, - @Default(true) bool automountMountfstab, - @Default(true) bool interopEnabled, - @Default(true) bool interopAppendwindowspath, - @Default(false) bool systemdEnabled, - }) = _WSLConfigurationAdvanced; +class StorageResponse with _$StorageResponse { + const factory StorageResponse({ + required ProbeStatus status, + ErrorReportRef? errorReport, + Bootloader? bootloader, + List? origConfig, + List? config, + Map? dasd, + @Default(1) int storageVersion, + }) = _StorageResponse; - factory WSLConfigurationAdvanced.fromJson(Map json) => - _$WSLConfigurationAdvancedFromJson(json); + factory StorageResponse.fromJson(Map json) => + _$StorageResponseFromJson(json); } @freezed -class WSLSetupOptions with _$WSLSetupOptions { - const factory WSLSetupOptions({ - @Default(true) bool installLanguageSupportPackages, - }) = _WSLSetupOptions; +class StorageResponseV2 with _$StorageResponseV2 { + const factory StorageResponseV2({ + required ProbeStatus status, + ErrorReportRef? errorReport, + @Default([]) List disks, + bool? needRoot, + bool? needBoot, + int? installMinimumSize, + }) = _StorageResponseV2; - factory WSLSetupOptions.fromJson(Map json) => - _$WSLSetupOptionsFromJson(json); + factory StorageResponseV2.fromJson(Map json) => + _$StorageResponseV2FromJson(json); } -enum TaskStatus { - DO, - DOING, - DONE, - ABORT, - UNDO, - UNDOING, - HOLD, - ERROR, +enum SizingPolicy { + SCALED, + ALL, } @freezed -class TaskProgress with _$TaskProgress { - const factory TaskProgress({ - @Default('') String label, - @Default(0) int done, - @Default(0) int total, - }) = _TaskProgress; +class GuidedResizeValues with _$GuidedResizeValues { + const factory GuidedResizeValues({ + required int installMax, + required int minimum, + required int recommended, + required int maximum, + }) = _GuidedResizeValues; - factory TaskProgress.fromJson(Map json) => - _$TaskProgressFromJson(json); + factory GuidedResizeValues.fromJson(Map json) => + _$GuidedResizeValuesFromJson(json); } -@freezed -class Task with _$Task { - const factory Task({ - required String id, - required String kind, - required String summary, - required TaskStatus status, - required TaskProgress progress, - }) = _Task; - - factory Task.fromJson(Map json) => _$TaskFromJson(json); -} +@Freezed(unionKey: '\$type', unionValueCase: FreezedUnionCase.pascal) +class GuidedStorageTarget with _$GuidedStorageTarget { + @FreezedUnionValue('GuidedStorageTargetReformat') + const factory GuidedStorageTarget.reformat({ + required String diskId, + @Default([]) List allowed, + @Default([]) List disallowed, + }) = GuidedStorageTargetReformat; -@freezed -class Change with _$Change { - const factory Change({ - required String id, - required String kind, - required String summary, - required TaskStatus status, - required List tasks, - required bool ready, - String? err, - dynamic data, - }) = _Change; + @FreezedUnionValue('GuidedStorageTargetResize') + const factory GuidedStorageTarget.resize({ + required String diskId, + required int partitionNumber, + required int newSize, + required int? minimum, + required int? recommended, + required int? maximum, + @Default([]) List allowed, + @Default([]) List disallowed, + }) = GuidedStorageTargetResize; - factory Change.fromJson(Map json) => _$ChangeFromJson(json); -} + @FreezedUnionValue('GuidedStorageTargetUseGap') + const factory GuidedStorageTarget.useGap({ + required String diskId, + required Gap gap, + @Default([]) List allowed, + @Default([]) List disallowed, + }) = GuidedStorageTargetUseGap; -enum CasperMd5Results { - UNKNOWN, - FAIL, - PASS, - SKIP, -} + @FreezedUnionValue('GuidedStorageTargetManual') + const factory GuidedStorageTarget.manual({ + required List allowed, + @Default([]) List disallowed, + }) = GuidedStorageTargetManual; -enum MirrorCheckStatus { - OK, - RUNNING, - FAILED, + factory GuidedStorageTarget.fromJson(Map json) => + _$GuidedStorageTargetFromJson(json); } @freezed -class MirrorCheckResponse with _$MirrorCheckResponse { - const factory MirrorCheckResponse({ - required String url, - required MirrorCheckStatus status, - required String output, - }) = _MirrorCheckResponse; +class RecoveryKey with _$RecoveryKey { + const factory RecoveryKey({ + String? liveLocation, + String? backupLocation, + }) = _RecoveryKey; - factory MirrorCheckResponse.fromJson(Map json) => - _$MirrorCheckResponseFromJson(json); + factory RecoveryKey.fromJson(Map json) => + _$RecoveryKeyFromJson(json); } @freezed -class MirrorPost with _$MirrorPost { - const factory MirrorPost({ - String? elected, - List? candidates, - String? staged, - bool? useDuringInstallation, - }) = _MirrorPost; - - factory MirrorPost.fromJson(Map json) => - _$MirrorPostFromJson(json); -} +class GuidedChoiceV2 with _$GuidedChoiceV2 { + const factory GuidedChoiceV2({ + required GuidedStorageTarget target, + required GuidedCapability capability, + String? password, + RecoveryKey? recoveryKey, + required SizingPolicy? sizingPolicy, + @Default(false) bool resetPartition, + int? resetPartitionSize, + }) = _GuidedChoiceV2; -enum MirrorPostResponse { - OK, - NO_USABLE_MIRROR, + factory GuidedChoiceV2.fromJson(Map json) => + _$GuidedChoiceV2FromJson(json); } @freezed -class MirrorGet with _$MirrorGet { - const factory MirrorGet({ - required bool relevant, - required String? elected, - required List candidates, - required String? staged, - required bool useDuringInstallation, - }) = _MirrorGet; - - factory MirrorGet.fromJson(Map json) => - _$MirrorGetFromJson(json); -} +class GuidedStorageResponseV2 with _$GuidedStorageResponseV2 { + const factory GuidedStorageResponseV2({ + required ProbeStatus status, + ErrorReportRef? errorReport, + GuidedChoiceV2? configured, + @Default([]) List targets, + }) = _GuidedStorageResponseV2; -enum MirrorSelectionFallback { - ABORT, - CONTINUE_ANYWAY, - OFFLINE_INSTALL, + factory GuidedStorageResponseV2.fromJson(Map json) => + _$GuidedStorageResponseV2FromJson(json); } @freezed -class AdConnectionInfo with _$AdConnectionInfo { - const factory AdConnectionInfo({ - @Default('') String adminName, - @Default('') String domainName, - @Default('') String password, - }) = _AdConnectionInfo; +class AddPartitionV2 with _$AddPartitionV2 { + const factory AddPartitionV2({ + required String diskId, + required Partition partition, + required Gap gap, + }) = _AddPartitionV2; - factory AdConnectionInfo.fromJson(Map json) => - _$AdConnectionInfoFromJson(json); + factory AddPartitionV2.fromJson(Map json) => + _$AddPartitionV2FromJson(json); } -enum AdAdminNameValidation { - OK, - EMPTY, - INVALID_CHARS, -} +@freezed +class ModifyPartitionV2 with _$ModifyPartitionV2 { + const factory ModifyPartitionV2({ + required String diskId, + required Partition partition, + }) = _ModifyPartitionV2; -enum AdDomainNameValidation { - OK, - EMPTY, - TOO_LONG, - INVALID_CHARS, - START_DOT, - END_DOT, - START_HYPHEN, - END_HYPHEN, - MULTIPLE_DOTS, - REALM_NOT_FOUND, + factory ModifyPartitionV2.fromJson(Map json) => + _$ModifyPartitionV2FromJson(json); } -enum AdPasswordValidation { - OK, - EMPTY, -} +@freezed +class ReformatDisk with _$ReformatDisk { + const factory ReformatDisk({ + required String diskId, + String? ptable, + }) = _ReformatDisk; -enum AdJoinResult { - OK, - JOIN_ERROR, - EMPTY_HOSTNAME, - PAM_ERROR, - UNKNOWN, + factory ReformatDisk.fromJson(Map json) => + _$ReformatDiskFromJson(json); } // END GENERATED CODE diff --git a/packages/subiquity_client/lib/src/types.freezed.dart b/packages/subiquity_client/lib/src/types.freezed.dart index c96b62267..18c53b447 100644 --- a/packages/subiquity_client/lib/src/types.freezed.dart +++ b/packages/subiquity_client/lib/src/types.freezed.dart @@ -3594,41 +3594,40 @@ abstract class _NetworkStatus implements NetworkStatus { throw _privateConstructorUsedError; } -OsProber _$OsProberFromJson(Map json) { - return _OsProber.fromJson(json); +IdentityData _$IdentityDataFromJson(Map json) { + return _IdentityData.fromJson(json); } /// @nodoc -mixin _$OsProber { - String get long => throw _privateConstructorUsedError; - String get label => throw _privateConstructorUsedError; - String get type => throw _privateConstructorUsedError; - String? get subpath => throw _privateConstructorUsedError; - String? get version => throw _privateConstructorUsedError; +mixin _$IdentityData { + String get realname => throw _privateConstructorUsedError; + String get username => throw _privateConstructorUsedError; + String get cryptedPassword => throw _privateConstructorUsedError; + String get hostname => throw _privateConstructorUsedError; Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $OsProberCopyWith get copyWith => + $IdentityDataCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class $OsProberCopyWith<$Res> { - factory $OsProberCopyWith(OsProber value, $Res Function(OsProber) then) = - _$OsProberCopyWithImpl<$Res, OsProber>; +abstract class $IdentityDataCopyWith<$Res> { + factory $IdentityDataCopyWith( + IdentityData value, $Res Function(IdentityData) then) = + _$IdentityDataCopyWithImpl<$Res, IdentityData>; @useResult $Res call( - {String long, - String label, - String type, - String? subpath, - String? version}); + {String realname, + String username, + String cryptedPassword, + String hostname}); } /// @nodoc -class _$OsProberCopyWithImpl<$Res, $Val extends OsProber> - implements $OsProberCopyWith<$Res> { - _$OsProberCopyWithImpl(this._value, this._then); +class _$IdentityDataCopyWithImpl<$Res, $Val extends IdentityData> + implements $IdentityDataCopyWith<$Res> { + _$IdentityDataCopyWithImpl(this._value, this._then); // ignore: unused_field final $Val _value; @@ -3638,304 +3637,199 @@ class _$OsProberCopyWithImpl<$Res, $Val extends OsProber> @pragma('vm:prefer-inline') @override $Res call({ - Object? long = null, - Object? label = null, - Object? type = null, - Object? subpath = freezed, - Object? version = freezed, + Object? realname = null, + Object? username = null, + Object? cryptedPassword = null, + Object? hostname = null, }) { return _then(_value.copyWith( - long: null == long - ? _value.long - : long // ignore: cast_nullable_to_non_nullable + realname: null == realname + ? _value.realname + : realname // ignore: cast_nullable_to_non_nullable as String, - label: null == label - ? _value.label - : label // ignore: cast_nullable_to_non_nullable + username: null == username + ? _value.username + : username // ignore: cast_nullable_to_non_nullable as String, - type: null == type - ? _value.type - : type // ignore: cast_nullable_to_non_nullable + cryptedPassword: null == cryptedPassword + ? _value.cryptedPassword + : cryptedPassword // ignore: cast_nullable_to_non_nullable + as String, + hostname: null == hostname + ? _value.hostname + : hostname // ignore: cast_nullable_to_non_nullable as String, - subpath: freezed == subpath - ? _value.subpath - : subpath // ignore: cast_nullable_to_non_nullable - as String?, - version: freezed == version - ? _value.version - : version // ignore: cast_nullable_to_non_nullable - as String?, ) as $Val); } } /// @nodoc -abstract class _$$OsProberImplCopyWith<$Res> - implements $OsProberCopyWith<$Res> { - factory _$$OsProberImplCopyWith( - _$OsProberImpl value, $Res Function(_$OsProberImpl) then) = - __$$OsProberImplCopyWithImpl<$Res>; +abstract class _$$IdentityDataImplCopyWith<$Res> + implements $IdentityDataCopyWith<$Res> { + factory _$$IdentityDataImplCopyWith( + _$IdentityDataImpl value, $Res Function(_$IdentityDataImpl) then) = + __$$IdentityDataImplCopyWithImpl<$Res>; @override @useResult $Res call( - {String long, - String label, - String type, - String? subpath, - String? version}); + {String realname, + String username, + String cryptedPassword, + String hostname}); } /// @nodoc -class __$$OsProberImplCopyWithImpl<$Res> - extends _$OsProberCopyWithImpl<$Res, _$OsProberImpl> - implements _$$OsProberImplCopyWith<$Res> { - __$$OsProberImplCopyWithImpl( - _$OsProberImpl _value, $Res Function(_$OsProberImpl) _then) +class __$$IdentityDataImplCopyWithImpl<$Res> + extends _$IdentityDataCopyWithImpl<$Res, _$IdentityDataImpl> + implements _$$IdentityDataImplCopyWith<$Res> { + __$$IdentityDataImplCopyWithImpl( + _$IdentityDataImpl _value, $Res Function(_$IdentityDataImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? long = null, - Object? label = null, - Object? type = null, - Object? subpath = freezed, - Object? version = freezed, + Object? realname = null, + Object? username = null, + Object? cryptedPassword = null, + Object? hostname = null, }) { - return _then(_$OsProberImpl( - long: null == long - ? _value.long - : long // ignore: cast_nullable_to_non_nullable + return _then(_$IdentityDataImpl( + realname: null == realname + ? _value.realname + : realname // ignore: cast_nullable_to_non_nullable as String, - label: null == label - ? _value.label - : label // ignore: cast_nullable_to_non_nullable + username: null == username + ? _value.username + : username // ignore: cast_nullable_to_non_nullable as String, - type: null == type - ? _value.type - : type // ignore: cast_nullable_to_non_nullable + cryptedPassword: null == cryptedPassword + ? _value.cryptedPassword + : cryptedPassword // ignore: cast_nullable_to_non_nullable + as String, + hostname: null == hostname + ? _value.hostname + : hostname // ignore: cast_nullable_to_non_nullable as String, - subpath: freezed == subpath - ? _value.subpath - : subpath // ignore: cast_nullable_to_non_nullable - as String?, - version: freezed == version - ? _value.version - : version // ignore: cast_nullable_to_non_nullable - as String?, )); } } /// @nodoc @JsonSerializable() -class _$OsProberImpl implements _OsProber { - const _$OsProberImpl( - {required this.long, - required this.label, - required this.type, - this.subpath, - this.version}); +class _$IdentityDataImpl implements _IdentityData { + const _$IdentityDataImpl( + {this.realname = '', + this.username = '', + this.cryptedPassword = '', + this.hostname = ''}); - factory _$OsProberImpl.fromJson(Map json) => - _$$OsProberImplFromJson(json); + factory _$IdentityDataImpl.fromJson(Map json) => + _$$IdentityDataImplFromJson(json); @override - final String long; - @override - final String label; + @JsonKey() + final String realname; @override - final String type; + @JsonKey() + final String username; @override - final String? subpath; + @JsonKey() + final String cryptedPassword; @override - final String? version; + @JsonKey() + final String hostname; @override String toString() { - return 'OsProber(long: $long, label: $label, type: $type, subpath: $subpath, version: $version)'; + return 'IdentityData(realname: $realname, username: $username, cryptedPassword: $cryptedPassword, hostname: $hostname)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$OsProberImpl && - (identical(other.long, long) || other.long == long) && - (identical(other.label, label) || other.label == label) && - (identical(other.type, type) || other.type == type) && - (identical(other.subpath, subpath) || other.subpath == subpath) && - (identical(other.version, version) || other.version == version)); + other is _$IdentityDataImpl && + (identical(other.realname, realname) || + other.realname == realname) && + (identical(other.username, username) || + other.username == username) && + (identical(other.cryptedPassword, cryptedPassword) || + other.cryptedPassword == cryptedPassword) && + (identical(other.hostname, hostname) || + other.hostname == hostname)); } @JsonKey(ignore: true) @override int get hashCode => - Object.hash(runtimeType, long, label, type, subpath, version); + Object.hash(runtimeType, realname, username, cryptedPassword, hostname); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$OsProberImplCopyWith<_$OsProberImpl> get copyWith => - __$$OsProberImplCopyWithImpl<_$OsProberImpl>(this, _$identity); + _$$IdentityDataImplCopyWith<_$IdentityDataImpl> get copyWith => + __$$IdentityDataImplCopyWithImpl<_$IdentityDataImpl>(this, _$identity); @override Map toJson() { - return _$$OsProberImplToJson( + return _$$IdentityDataImplToJson( this, ); } } -abstract class _OsProber implements OsProber { - const factory _OsProber( - {required final String long, - required final String label, - required final String type, - final String? subpath, - final String? version}) = _$OsProberImpl; +abstract class _IdentityData implements IdentityData { + const factory _IdentityData( + {final String realname, + final String username, + final String cryptedPassword, + final String hostname}) = _$IdentityDataImpl; - factory _OsProber.fromJson(Map json) = - _$OsProberImpl.fromJson; + factory _IdentityData.fromJson(Map json) = + _$IdentityDataImpl.fromJson; @override - String get long; - @override - String get label; + String get realname; @override - String get type; + String get username; @override - String? get subpath; + String get cryptedPassword; @override - String? get version; + String get hostname; @override @JsonKey(ignore: true) - _$$OsProberImplCopyWith<_$OsProberImpl> get copyWith => + _$$IdentityDataImplCopyWith<_$IdentityDataImpl> get copyWith => throw _privateConstructorUsedError; } -PartitionOrGap _$PartitionOrGapFromJson(Map json) { - switch (json['\$type']) { - case 'Partition': - return Partition.fromJson(json); - case 'Gap': - return Gap.fromJson(json); +SSHData _$SSHDataFromJson(Map json) { + return _SSHData.fromJson(json); +} - default: - throw CheckedFromJsonException(json, '\$type', 'PartitionOrGap', - 'Invalid union type "${json['\$type']}"!'); - } +/// @nodoc +mixin _$SSHData { + bool get installServer => throw _privateConstructorUsedError; + bool get allowPw => throw _privateConstructorUsedError; + List get authorizedKeys => throw _privateConstructorUsedError; + + Map toJson() => throw _privateConstructorUsedError; + @JsonKey(ignore: true) + $SSHDataCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc -mixin _$PartitionOrGap { - int? get size => throw _privateConstructorUsedError; - int? get offset => throw _privateConstructorUsedError; - @optionalTypeArgs - TResult when({ - required TResult Function( - int? size, - int? number, - bool? preserve, - String? wipe, - List annotations, - String? mount, - String? format, - bool? grubDevice, - bool? boot, - OsProber? os, - int? offset, - int? estimatedMinSize, - bool? resize, - String? path, - bool isInUse) - partition, - required TResult Function(int offset, int size, GapUsable usable) gap, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function( - int? size, - int? number, - bool? preserve, - String? wipe, - List annotations, - String? mount, - String? format, - bool? grubDevice, - bool? boot, - OsProber? os, - int? offset, - int? estimatedMinSize, - bool? resize, - String? path, - bool isInUse)? - partition, - TResult? Function(int offset, int size, GapUsable usable)? gap, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function( - int? size, - int? number, - bool? preserve, - String? wipe, - List annotations, - String? mount, - String? format, - bool? grubDevice, - bool? boot, - OsProber? os, - int? offset, - int? estimatedMinSize, - bool? resize, - String? path, - bool isInUse)? - partition, - TResult Function(int offset, int size, GapUsable usable)? gap, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(Partition value) partition, - required TResult Function(Gap value) gap, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(Partition value)? partition, - TResult? Function(Gap value)? gap, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Partition value)? partition, - TResult Function(Gap value)? gap, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - Map toJson() => throw _privateConstructorUsedError; - @JsonKey(ignore: true) - $PartitionOrGapCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $PartitionOrGapCopyWith<$Res> { - factory $PartitionOrGapCopyWith( - PartitionOrGap value, $Res Function(PartitionOrGap) then) = - _$PartitionOrGapCopyWithImpl<$Res, PartitionOrGap>; +abstract class $SSHDataCopyWith<$Res> { + factory $SSHDataCopyWith(SSHData value, $Res Function(SSHData) then) = + _$SSHDataCopyWithImpl<$Res, SSHData>; @useResult - $Res call({int size, int offset}); + $Res call({bool installServer, bool allowPw, List authorizedKeys}); } /// @nodoc -class _$PartitionOrGapCopyWithImpl<$Res, $Val extends PartitionOrGap> - implements $PartitionOrGapCopyWith<$Res> { - _$PartitionOrGapCopyWithImpl(this._value, this._then); +class _$SSHDataCopyWithImpl<$Res, $Val extends SSHData> + implements $SSHDataCopyWith<$Res> { + _$SSHDataCopyWithImpl(this._value, this._then); // ignore: unused_field final $Val _value; @@ -3945,724 +3839,377 @@ class _$PartitionOrGapCopyWithImpl<$Res, $Val extends PartitionOrGap> @pragma('vm:prefer-inline') @override $Res call({ - Object? size = null, - Object? offset = null, + Object? installServer = null, + Object? allowPw = null, + Object? authorizedKeys = null, }) { return _then(_value.copyWith( - size: null == size - ? _value.size! - : size // ignore: cast_nullable_to_non_nullable - as int, - offset: null == offset - ? _value.offset! - : offset // ignore: cast_nullable_to_non_nullable - as int, + installServer: null == installServer + ? _value.installServer + : installServer // ignore: cast_nullable_to_non_nullable + as bool, + allowPw: null == allowPw + ? _value.allowPw + : allowPw // ignore: cast_nullable_to_non_nullable + as bool, + authorizedKeys: null == authorizedKeys + ? _value.authorizedKeys + : authorizedKeys // ignore: cast_nullable_to_non_nullable + as List, ) as $Val); } } /// @nodoc -abstract class _$$PartitionImplCopyWith<$Res> - implements $PartitionOrGapCopyWith<$Res> { - factory _$$PartitionImplCopyWith( - _$PartitionImpl value, $Res Function(_$PartitionImpl) then) = - __$$PartitionImplCopyWithImpl<$Res>; +abstract class _$$SSHDataImplCopyWith<$Res> implements $SSHDataCopyWith<$Res> { + factory _$$SSHDataImplCopyWith( + _$SSHDataImpl value, $Res Function(_$SSHDataImpl) then) = + __$$SSHDataImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {int? size, - int? number, - bool? preserve, - String? wipe, - List annotations, - String? mount, - String? format, - bool? grubDevice, - bool? boot, - OsProber? os, - int? offset, - int? estimatedMinSize, - bool? resize, - String? path, - bool isInUse}); - - $OsProberCopyWith<$Res>? get os; + $Res call({bool installServer, bool allowPw, List authorizedKeys}); } /// @nodoc -class __$$PartitionImplCopyWithImpl<$Res> - extends _$PartitionOrGapCopyWithImpl<$Res, _$PartitionImpl> - implements _$$PartitionImplCopyWith<$Res> { - __$$PartitionImplCopyWithImpl( - _$PartitionImpl _value, $Res Function(_$PartitionImpl) _then) +class __$$SSHDataImplCopyWithImpl<$Res> + extends _$SSHDataCopyWithImpl<$Res, _$SSHDataImpl> + implements _$$SSHDataImplCopyWith<$Res> { + __$$SSHDataImplCopyWithImpl( + _$SSHDataImpl _value, $Res Function(_$SSHDataImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? size = freezed, - Object? number = freezed, - Object? preserve = freezed, - Object? wipe = freezed, - Object? annotations = null, - Object? mount = freezed, - Object? format = freezed, - Object? grubDevice = freezed, - Object? boot = freezed, - Object? os = freezed, - Object? offset = freezed, - Object? estimatedMinSize = freezed, - Object? resize = freezed, - Object? path = freezed, - Object? isInUse = null, + Object? installServer = null, + Object? allowPw = null, + Object? authorizedKeys = null, }) { - return _then(_$PartitionImpl( - size: freezed == size - ? _value.size - : size // ignore: cast_nullable_to_non_nullable - as int?, - number: freezed == number - ? _value.number - : number // ignore: cast_nullable_to_non_nullable - as int?, - preserve: freezed == preserve - ? _value.preserve - : preserve // ignore: cast_nullable_to_non_nullable - as bool?, - wipe: freezed == wipe - ? _value.wipe - : wipe // ignore: cast_nullable_to_non_nullable - as String?, - annotations: null == annotations - ? _value._annotations - : annotations // ignore: cast_nullable_to_non_nullable - as List, - mount: freezed == mount - ? _value.mount - : mount // ignore: cast_nullable_to_non_nullable - as String?, - format: freezed == format - ? _value.format - : format // ignore: cast_nullable_to_non_nullable - as String?, - grubDevice: freezed == grubDevice - ? _value.grubDevice - : grubDevice // ignore: cast_nullable_to_non_nullable - as bool?, - boot: freezed == boot - ? _value.boot - : boot // ignore: cast_nullable_to_non_nullable - as bool?, - os: freezed == os - ? _value.os - : os // ignore: cast_nullable_to_non_nullable - as OsProber?, - offset: freezed == offset - ? _value.offset - : offset // ignore: cast_nullable_to_non_nullable - as int?, - estimatedMinSize: freezed == estimatedMinSize - ? _value.estimatedMinSize - : estimatedMinSize // ignore: cast_nullable_to_non_nullable - as int?, - resize: freezed == resize - ? _value.resize - : resize // ignore: cast_nullable_to_non_nullable - as bool?, - path: freezed == path - ? _value.path - : path // ignore: cast_nullable_to_non_nullable - as String?, - isInUse: null == isInUse - ? _value.isInUse - : isInUse // ignore: cast_nullable_to_non_nullable + return _then(_$SSHDataImpl( + installServer: null == installServer + ? _value.installServer + : installServer // ignore: cast_nullable_to_non_nullable as bool, - )); - } - - @override - @pragma('vm:prefer-inline') - $OsProberCopyWith<$Res>? get os { - if (_value.os == null) { - return null; - } - - return $OsProberCopyWith<$Res>(_value.os!, (value) { - return _then(_value.copyWith(os: value)); - }); + allowPw: null == allowPw + ? _value.allowPw + : allowPw // ignore: cast_nullable_to_non_nullable + as bool, + authorizedKeys: null == authorizedKeys + ? _value._authorizedKeys + : authorizedKeys // ignore: cast_nullable_to_non_nullable + as List, + )); } } /// @nodoc @JsonSerializable() -class _$PartitionImpl implements Partition { - const _$PartitionImpl( - {this.size, - this.number, - this.preserve, - this.wipe, - final List annotations = const [], - this.mount, - this.format, - this.grubDevice, - this.boot, - this.os, - this.offset, - this.estimatedMinSize = -1, - this.resize, - this.path, - this.isInUse = false, - final String? $type}) - : _annotations = annotations, - $type = $type ?? 'Partition'; +class _$SSHDataImpl implements _SSHData { + const _$SSHDataImpl( + {required this.installServer, + required this.allowPw, + final List authorizedKeys = const []}) + : _authorizedKeys = authorizedKeys; - factory _$PartitionImpl.fromJson(Map json) => - _$$PartitionImplFromJson(json); + factory _$SSHDataImpl.fromJson(Map json) => + _$$SSHDataImplFromJson(json); @override - final int? size; - @override - final int? number; - @override - final bool? preserve; + final bool installServer; @override - final String? wipe; - final List _annotations; + final bool allowPw; + final List _authorizedKeys; @override @JsonKey() - List get annotations { - if (_annotations is EqualUnmodifiableListView) return _annotations; + List get authorizedKeys { + if (_authorizedKeys is EqualUnmodifiableListView) return _authorizedKeys; // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_annotations); + return EqualUnmodifiableListView(_authorizedKeys); } - @override - final String? mount; - @override - final String? format; - @override - final bool? grubDevice; - @override - final bool? boot; - @override - final OsProber? os; - @override - final int? offset; - @override - @JsonKey() - final int? estimatedMinSize; - @override - final bool? resize; - @override - final String? path; - @override - @JsonKey() - final bool isInUse; - - @JsonKey(name: '\$type') - final String $type; - @override String toString() { - return 'PartitionOrGap.partition(size: $size, number: $number, preserve: $preserve, wipe: $wipe, annotations: $annotations, mount: $mount, format: $format, grubDevice: $grubDevice, boot: $boot, os: $os, offset: $offset, estimatedMinSize: $estimatedMinSize, resize: $resize, path: $path, isInUse: $isInUse)'; + return 'SSHData(installServer: $installServer, allowPw: $allowPw, authorizedKeys: $authorizedKeys)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$PartitionImpl && - (identical(other.size, size) || other.size == size) && - (identical(other.number, number) || other.number == number) && - (identical(other.preserve, preserve) || - other.preserve == preserve) && - (identical(other.wipe, wipe) || other.wipe == wipe) && + other is _$SSHDataImpl && + (identical(other.installServer, installServer) || + other.installServer == installServer) && + (identical(other.allowPw, allowPw) || other.allowPw == allowPw) && const DeepCollectionEquality() - .equals(other._annotations, _annotations) && - (identical(other.mount, mount) || other.mount == mount) && - (identical(other.format, format) || other.format == format) && - (identical(other.grubDevice, grubDevice) || - other.grubDevice == grubDevice) && - (identical(other.boot, boot) || other.boot == boot) && - (identical(other.os, os) || other.os == os) && - (identical(other.offset, offset) || other.offset == offset) && - (identical(other.estimatedMinSize, estimatedMinSize) || - other.estimatedMinSize == estimatedMinSize) && - (identical(other.resize, resize) || other.resize == resize) && - (identical(other.path, path) || other.path == path) && - (identical(other.isInUse, isInUse) || other.isInUse == isInUse)); + .equals(other._authorizedKeys, _authorizedKeys)); } @JsonKey(ignore: true) @override - int get hashCode => Object.hash( - runtimeType, - size, - number, - preserve, - wipe, - const DeepCollectionEquality().hash(_annotations), - mount, - format, - grubDevice, - boot, - os, - offset, - estimatedMinSize, - resize, - path, - isInUse); + int get hashCode => Object.hash(runtimeType, installServer, allowPw, + const DeepCollectionEquality().hash(_authorizedKeys)); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$PartitionImplCopyWith<_$PartitionImpl> get copyWith => - __$$PartitionImplCopyWithImpl<_$PartitionImpl>(this, _$identity); + _$$SSHDataImplCopyWith<_$SSHDataImpl> get copyWith => + __$$SSHDataImplCopyWithImpl<_$SSHDataImpl>(this, _$identity); @override - @optionalTypeArgs - TResult when({ - required TResult Function( - int? size, - int? number, - bool? preserve, - String? wipe, - List annotations, - String? mount, - String? format, - bool? grubDevice, - bool? boot, - OsProber? os, - int? offset, - int? estimatedMinSize, - bool? resize, - String? path, - bool isInUse) - partition, - required TResult Function(int offset, int size, GapUsable usable) gap, - }) { - return partition(size, number, preserve, wipe, annotations, mount, format, - grubDevice, boot, os, offset, estimatedMinSize, resize, path, isInUse); + Map toJson() { + return _$$SSHDataImplToJson( + this, + ); } +} - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function( - int? size, - int? number, - bool? preserve, - String? wipe, - List annotations, - String? mount, - String? format, - bool? grubDevice, - bool? boot, - OsProber? os, - int? offset, - int? estimatedMinSize, - bool? resize, - String? path, - bool isInUse)? - partition, - TResult? Function(int offset, int size, GapUsable usable)? gap, - }) { - return partition?.call( - size, - number, - preserve, - wipe, - annotations, - mount, - format, - grubDevice, - boot, - os, - offset, - estimatedMinSize, - resize, - path, - isInUse); - } +abstract class _SSHData implements SSHData { + const factory _SSHData( + {required final bool installServer, + required final bool allowPw, + final List authorizedKeys}) = _$SSHDataImpl; + + factory _SSHData.fromJson(Map json) = _$SSHDataImpl.fromJson; @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function( - int? size, - int? number, - bool? preserve, - String? wipe, - List annotations, - String? mount, - String? format, - bool? grubDevice, - bool? boot, - OsProber? os, - int? offset, - int? estimatedMinSize, - bool? resize, - String? path, - bool isInUse)? - partition, - TResult Function(int offset, int size, GapUsable usable)? gap, - required TResult orElse(), - }) { - if (partition != null) { - return partition( - size, - number, - preserve, - wipe, - annotations, - mount, - format, - grubDevice, - boot, - os, - offset, - estimatedMinSize, - resize, - path, - isInUse); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(Partition value) partition, - required TResult Function(Gap value) gap, - }) { - return partition(this); - } - + bool get installServer; @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(Partition value)? partition, - TResult? Function(Gap value)? gap, - }) { - return partition?.call(this); - } - + bool get allowPw; @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Partition value)? partition, - TResult Function(Gap value)? gap, - required TResult orElse(), - }) { - if (partition != null) { - return partition(this); - } - return orElse(); - } - + List get authorizedKeys; @override - Map toJson() { - return _$$PartitionImplToJson( - this, - ); - } + @JsonKey(ignore: true) + _$$SSHDataImplCopyWith<_$SSHDataImpl> get copyWith => + throw _privateConstructorUsedError; } -abstract class Partition implements PartitionOrGap { - const factory Partition( - {final int? size, - final int? number, - final bool? preserve, - final String? wipe, - final List annotations, - final String? mount, - final String? format, - final bool? grubDevice, - final bool? boot, - final OsProber? os, - final int? offset, - final int? estimatedMinSize, - final bool? resize, - final String? path, - final bool isInUse}) = _$PartitionImpl; +SSHIdentity _$SSHIdentityFromJson(Map json) { + return _SSHIdentity.fromJson(json); +} - factory Partition.fromJson(Map json) = - _$PartitionImpl.fromJson; +/// @nodoc +mixin _$SSHIdentity { + String get keyType => throw _privateConstructorUsedError; + String get key => throw _privateConstructorUsedError; + String get keyComment => throw _privateConstructorUsedError; + String get keyFingerprint => throw _privateConstructorUsedError; - @override - int? get size; - int? get number; - bool? get preserve; - String? get wipe; - List get annotations; - String? get mount; - String? get format; - bool? get grubDevice; - bool? get boot; - OsProber? get os; - @override - int? get offset; - int? get estimatedMinSize; - bool? get resize; - String? get path; - bool get isInUse; - @override + Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) - _$$PartitionImplCopyWith<_$PartitionImpl> get copyWith => + $SSHIdentityCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$GapImplCopyWith<$Res> - implements $PartitionOrGapCopyWith<$Res> { - factory _$$GapImplCopyWith(_$GapImpl value, $Res Function(_$GapImpl) then) = - __$$GapImplCopyWithImpl<$Res>; +abstract class $SSHIdentityCopyWith<$Res> { + factory $SSHIdentityCopyWith( + SSHIdentity value, $Res Function(SSHIdentity) then) = + _$SSHIdentityCopyWithImpl<$Res, SSHIdentity>; + @useResult + $Res call( + {String keyType, String key, String keyComment, String keyFingerprint}); +} + +/// @nodoc +class _$SSHIdentityCopyWithImpl<$Res, $Val extends SSHIdentity> + implements $SSHIdentityCopyWith<$Res> { + _$SSHIdentityCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? keyType = null, + Object? key = null, + Object? keyComment = null, + Object? keyFingerprint = null, + }) { + return _then(_value.copyWith( + keyType: null == keyType + ? _value.keyType + : keyType // ignore: cast_nullable_to_non_nullable + as String, + key: null == key + ? _value.key + : key // ignore: cast_nullable_to_non_nullable + as String, + keyComment: null == keyComment + ? _value.keyComment + : keyComment // ignore: cast_nullable_to_non_nullable + as String, + keyFingerprint: null == keyFingerprint + ? _value.keyFingerprint + : keyFingerprint // ignore: cast_nullable_to_non_nullable + as String, + ) as $Val); + } +} + +/// @nodoc +abstract class _$$SSHIdentityImplCopyWith<$Res> + implements $SSHIdentityCopyWith<$Res> { + factory _$$SSHIdentityImplCopyWith( + _$SSHIdentityImpl value, $Res Function(_$SSHIdentityImpl) then) = + __$$SSHIdentityImplCopyWithImpl<$Res>; @override @useResult - $Res call({int offset, int size, GapUsable usable}); + $Res call( + {String keyType, String key, String keyComment, String keyFingerprint}); } /// @nodoc -class __$$GapImplCopyWithImpl<$Res> - extends _$PartitionOrGapCopyWithImpl<$Res, _$GapImpl> - implements _$$GapImplCopyWith<$Res> { - __$$GapImplCopyWithImpl(_$GapImpl _value, $Res Function(_$GapImpl) _then) +class __$$SSHIdentityImplCopyWithImpl<$Res> + extends _$SSHIdentityCopyWithImpl<$Res, _$SSHIdentityImpl> + implements _$$SSHIdentityImplCopyWith<$Res> { + __$$SSHIdentityImplCopyWithImpl( + _$SSHIdentityImpl _value, $Res Function(_$SSHIdentityImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? offset = null, - Object? size = null, - Object? usable = null, + Object? keyType = null, + Object? key = null, + Object? keyComment = null, + Object? keyFingerprint = null, }) { - return _then(_$GapImpl( - offset: null == offset - ? _value.offset - : offset // ignore: cast_nullable_to_non_nullable - as int, - size: null == size - ? _value.size - : size // ignore: cast_nullable_to_non_nullable - as int, - usable: null == usable - ? _value.usable - : usable // ignore: cast_nullable_to_non_nullable - as GapUsable, + return _then(_$SSHIdentityImpl( + keyType: null == keyType + ? _value.keyType + : keyType // ignore: cast_nullable_to_non_nullable + as String, + key: null == key + ? _value.key + : key // ignore: cast_nullable_to_non_nullable + as String, + keyComment: null == keyComment + ? _value.keyComment + : keyComment // ignore: cast_nullable_to_non_nullable + as String, + keyFingerprint: null == keyFingerprint + ? _value.keyFingerprint + : keyFingerprint // ignore: cast_nullable_to_non_nullable + as String, )); } } /// @nodoc @JsonSerializable() -class _$GapImpl implements Gap { - const _$GapImpl( - {required this.offset, - required this.size, - required this.usable, - final String? $type}) - : $type = $type ?? 'Gap'; +class _$SSHIdentityImpl implements _SSHIdentity { + const _$SSHIdentityImpl( + {required this.keyType, + required this.key, + required this.keyComment, + required this.keyFingerprint}); - factory _$GapImpl.fromJson(Map json) => - _$$GapImplFromJson(json); + factory _$SSHIdentityImpl.fromJson(Map json) => + _$$SSHIdentityImplFromJson(json); @override - final int offset; + final String keyType; @override - final int size; + final String key; @override - final GapUsable usable; - - @JsonKey(name: '\$type') - final String $type; + final String keyComment; + @override + final String keyFingerprint; @override String toString() { - return 'PartitionOrGap.gap(offset: $offset, size: $size, usable: $usable)'; + return 'SSHIdentity(keyType: $keyType, key: $key, keyComment: $keyComment, keyFingerprint: $keyFingerprint)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$GapImpl && - (identical(other.offset, offset) || other.offset == offset) && - (identical(other.size, size) || other.size == size) && - (identical(other.usable, usable) || other.usable == usable)); + other is _$SSHIdentityImpl && + (identical(other.keyType, keyType) || other.keyType == keyType) && + (identical(other.key, key) || other.key == key) && + (identical(other.keyComment, keyComment) || + other.keyComment == keyComment) && + (identical(other.keyFingerprint, keyFingerprint) || + other.keyFingerprint == keyFingerprint)); } @JsonKey(ignore: true) @override - int get hashCode => Object.hash(runtimeType, offset, size, usable); + int get hashCode => + Object.hash(runtimeType, keyType, key, keyComment, keyFingerprint); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$GapImplCopyWith<_$GapImpl> get copyWith => - __$$GapImplCopyWithImpl<_$GapImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function( - int? size, - int? number, - bool? preserve, - String? wipe, - List annotations, - String? mount, - String? format, - bool? grubDevice, - bool? boot, - OsProber? os, - int? offset, - int? estimatedMinSize, - bool? resize, - String? path, - bool isInUse) - partition, - required TResult Function(int offset, int size, GapUsable usable) gap, - }) { - return gap(offset, size, usable); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function( - int? size, - int? number, - bool? preserve, - String? wipe, - List annotations, - String? mount, - String? format, - bool? grubDevice, - bool? boot, - OsProber? os, - int? offset, - int? estimatedMinSize, - bool? resize, - String? path, - bool isInUse)? - partition, - TResult? Function(int offset, int size, GapUsable usable)? gap, - }) { - return gap?.call(offset, size, usable); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function( - int? size, - int? number, - bool? preserve, - String? wipe, - List annotations, - String? mount, - String? format, - bool? grubDevice, - bool? boot, - OsProber? os, - int? offset, - int? estimatedMinSize, - bool? resize, - String? path, - bool isInUse)? - partition, - TResult Function(int offset, int size, GapUsable usable)? gap, - required TResult orElse(), - }) { - if (gap != null) { - return gap(offset, size, usable); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(Partition value) partition, - required TResult Function(Gap value) gap, - }) { - return gap(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(Partition value)? partition, - TResult? Function(Gap value)? gap, - }) { - return gap?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(Partition value)? partition, - TResult Function(Gap value)? gap, - required TResult orElse(), - }) { - if (gap != null) { - return gap(this); - } - return orElse(); - } + _$$SSHIdentityImplCopyWith<_$SSHIdentityImpl> get copyWith => + __$$SSHIdentityImplCopyWithImpl<_$SSHIdentityImpl>(this, _$identity); @override Map toJson() { - return _$$GapImplToJson( + return _$$SSHIdentityImplToJson( this, ); } } -abstract class Gap implements PartitionOrGap { - const factory Gap( - {required final int offset, - required final int size, - required final GapUsable usable}) = _$GapImpl; +abstract class _SSHIdentity implements SSHIdentity { + const factory _SSHIdentity( + {required final String keyType, + required final String key, + required final String keyComment, + required final String keyFingerprint}) = _$SSHIdentityImpl; - factory Gap.fromJson(Map json) = _$GapImpl.fromJson; + factory _SSHIdentity.fromJson(Map json) = + _$SSHIdentityImpl.fromJson; @override - int get offset; + String get keyType; @override - int get size; - GapUsable get usable; + String get key; + @override + String get keyComment; + @override + String get keyFingerprint; @override @JsonKey(ignore: true) - _$$GapImplCopyWith<_$GapImpl> get copyWith => + _$$SSHIdentityImplCopyWith<_$SSHIdentityImpl> get copyWith => throw _privateConstructorUsedError; } -ZFS _$ZFSFromJson(Map json) { - return _ZFS.fromJson(json); +SSHFetchIdResponse _$SSHFetchIdResponseFromJson(Map json) { + return _SSHFetchIdResponse.fromJson(json); } /// @nodoc -mixin _$ZFS { - String get volume => throw _privateConstructorUsedError; - Map? get properties => throw _privateConstructorUsedError; +mixin _$SSHFetchIdResponse { + SSHFetchIdStatus get status => throw _privateConstructorUsedError; + List? get identities => throw _privateConstructorUsedError; + String? get error => throw _privateConstructorUsedError; Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $ZFSCopyWith get copyWith => throw _privateConstructorUsedError; + $SSHFetchIdResponseCopyWith get copyWith => + throw _privateConstructorUsedError; } /// @nodoc -abstract class $ZFSCopyWith<$Res> { - factory $ZFSCopyWith(ZFS value, $Res Function(ZFS) then) = - _$ZFSCopyWithImpl<$Res, ZFS>; +abstract class $SSHFetchIdResponseCopyWith<$Res> { + factory $SSHFetchIdResponseCopyWith( + SSHFetchIdResponse value, $Res Function(SSHFetchIdResponse) then) = + _$SSHFetchIdResponseCopyWithImpl<$Res, SSHFetchIdResponse>; @useResult - $Res call({String volume, Map? properties}); + $Res call( + {SSHFetchIdStatus status, List? identities, String? error}); } /// @nodoc -class _$ZFSCopyWithImpl<$Res, $Val extends ZFS> implements $ZFSCopyWith<$Res> { - _$ZFSCopyWithImpl(this._value, this._then); +class _$SSHFetchIdResponseCopyWithImpl<$Res, $Val extends SSHFetchIdResponse> + implements $SSHFetchIdResponseCopyWith<$Res> { + _$SSHFetchIdResponseCopyWithImpl(this._value, this._then); // ignore: unused_field final $Val _value; @@ -4672,168 +4219,193 @@ class _$ZFSCopyWithImpl<$Res, $Val extends ZFS> implements $ZFSCopyWith<$Res> { @pragma('vm:prefer-inline') @override $Res call({ - Object? volume = null, - Object? properties = freezed, + Object? status = null, + Object? identities = freezed, + Object? error = freezed, }) { return _then(_value.copyWith( - volume: null == volume - ? _value.volume - : volume // ignore: cast_nullable_to_non_nullable - as String, - properties: freezed == properties - ? _value.properties - : properties // ignore: cast_nullable_to_non_nullable - as Map?, + status: null == status + ? _value.status + : status // ignore: cast_nullable_to_non_nullable + as SSHFetchIdStatus, + identities: freezed == identities + ? _value.identities + : identities // ignore: cast_nullable_to_non_nullable + as List?, + error: freezed == error + ? _value.error + : error // ignore: cast_nullable_to_non_nullable + as String?, ) as $Val); } } /// @nodoc -abstract class _$$ZFSImplCopyWith<$Res> implements $ZFSCopyWith<$Res> { - factory _$$ZFSImplCopyWith(_$ZFSImpl value, $Res Function(_$ZFSImpl) then) = - __$$ZFSImplCopyWithImpl<$Res>; +abstract class _$$SSHFetchIdResponseImplCopyWith<$Res> + implements $SSHFetchIdResponseCopyWith<$Res> { + factory _$$SSHFetchIdResponseImplCopyWith(_$SSHFetchIdResponseImpl value, + $Res Function(_$SSHFetchIdResponseImpl) then) = + __$$SSHFetchIdResponseImplCopyWithImpl<$Res>; @override @useResult - $Res call({String volume, Map? properties}); + $Res call( + {SSHFetchIdStatus status, List? identities, String? error}); } /// @nodoc -class __$$ZFSImplCopyWithImpl<$Res> extends _$ZFSCopyWithImpl<$Res, _$ZFSImpl> - implements _$$ZFSImplCopyWith<$Res> { - __$$ZFSImplCopyWithImpl(_$ZFSImpl _value, $Res Function(_$ZFSImpl) _then) +class __$$SSHFetchIdResponseImplCopyWithImpl<$Res> + extends _$SSHFetchIdResponseCopyWithImpl<$Res, _$SSHFetchIdResponseImpl> + implements _$$SSHFetchIdResponseImplCopyWith<$Res> { + __$$SSHFetchIdResponseImplCopyWithImpl(_$SSHFetchIdResponseImpl _value, + $Res Function(_$SSHFetchIdResponseImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? volume = null, - Object? properties = freezed, + Object? status = null, + Object? identities = freezed, + Object? error = freezed, }) { - return _then(_$ZFSImpl( - volume: null == volume - ? _value.volume - : volume // ignore: cast_nullable_to_non_nullable - as String, - properties: freezed == properties - ? _value._properties - : properties // ignore: cast_nullable_to_non_nullable - as Map?, + return _then(_$SSHFetchIdResponseImpl( + status: null == status + ? _value.status + : status // ignore: cast_nullable_to_non_nullable + as SSHFetchIdStatus, + identities: freezed == identities + ? _value._identities + : identities // ignore: cast_nullable_to_non_nullable + as List?, + error: freezed == error + ? _value.error + : error // ignore: cast_nullable_to_non_nullable + as String?, )); } } /// @nodoc @JsonSerializable() -class _$ZFSImpl implements _ZFS { - const _$ZFSImpl( - {required this.volume, final Map? properties}) - : _properties = properties; +class _$SSHFetchIdResponseImpl implements _SSHFetchIdResponse { + const _$SSHFetchIdResponseImpl( + {required this.status, + required final List? identities, + required this.error}) + : _identities = identities; - factory _$ZFSImpl.fromJson(Map json) => - _$$ZFSImplFromJson(json); + factory _$SSHFetchIdResponseImpl.fromJson(Map json) => + _$$SSHFetchIdResponseImplFromJson(json); @override - final String volume; - final Map? _properties; + final SSHFetchIdStatus status; + final List? _identities; @override - Map? get properties { - final value = _properties; + List? get identities { + final value = _identities; if (value == null) return null; - if (_properties is EqualUnmodifiableMapView) return _properties; + if (_identities is EqualUnmodifiableListView) return _identities; // ignore: implicit_dynamic_type - return EqualUnmodifiableMapView(value); + return EqualUnmodifiableListView(value); } @override - String toString() { - return 'ZFS(volume: $volume, properties: $properties)'; + final String? error; + + @override + String toString() { + return 'SSHFetchIdResponse(status: $status, identities: $identities, error: $error)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$ZFSImpl && - (identical(other.volume, volume) || other.volume == volume) && + other is _$SSHFetchIdResponseImpl && + (identical(other.status, status) || other.status == status) && const DeepCollectionEquality() - .equals(other._properties, _properties)); + .equals(other._identities, _identities) && + (identical(other.error, error) || other.error == error)); } @JsonKey(ignore: true) @override - int get hashCode => Object.hash( - runtimeType, volume, const DeepCollectionEquality().hash(_properties)); + int get hashCode => Object.hash(runtimeType, status, + const DeepCollectionEquality().hash(_identities), error); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$ZFSImplCopyWith<_$ZFSImpl> get copyWith => - __$$ZFSImplCopyWithImpl<_$ZFSImpl>(this, _$identity); + _$$SSHFetchIdResponseImplCopyWith<_$SSHFetchIdResponseImpl> get copyWith => + __$$SSHFetchIdResponseImplCopyWithImpl<_$SSHFetchIdResponseImpl>( + this, _$identity); @override Map toJson() { - return _$$ZFSImplToJson( + return _$$SSHFetchIdResponseImplToJson( this, ); } } -abstract class _ZFS implements ZFS { - const factory _ZFS( - {required final String volume, - final Map? properties}) = _$ZFSImpl; +abstract class _SSHFetchIdResponse implements SSHFetchIdResponse { + const factory _SSHFetchIdResponse( + {required final SSHFetchIdStatus status, + required final List? identities, + required final String? error}) = _$SSHFetchIdResponseImpl; - factory _ZFS.fromJson(Map json) = _$ZFSImpl.fromJson; + factory _SSHFetchIdResponse.fromJson(Map json) = + _$SSHFetchIdResponseImpl.fromJson; @override - String get volume; + SSHFetchIdStatus get status; @override - Map? get properties; + List? get identities; + @override + String? get error; @override @JsonKey(ignore: true) - _$$ZFSImplCopyWith<_$ZFSImpl> get copyWith => + _$$SSHFetchIdResponseImplCopyWith<_$SSHFetchIdResponseImpl> get copyWith => throw _privateConstructorUsedError; } -ZPool _$ZPoolFromJson(Map json) { - return _ZPool.fromJson(json); +ChannelSnapInfo _$ChannelSnapInfoFromJson(Map json) { + return _ChannelSnapInfo.fromJson(json); } /// @nodoc -mixin _$ZPool { - String get pool => throw _privateConstructorUsedError; - String get mountpoint => throw _privateConstructorUsedError; - ZFS? get zfses => throw _privateConstructorUsedError; - Map? get poolProperties => - throw _privateConstructorUsedError; - Map? get fsProperties => throw _privateConstructorUsedError; - bool? get defaultFeatures => throw _privateConstructorUsedError; +mixin _$ChannelSnapInfo { + String get channelName => throw _privateConstructorUsedError; + String get revision => throw _privateConstructorUsedError; + String get confinement => throw _privateConstructorUsedError; + String get version => throw _privateConstructorUsedError; + int get size => throw _privateConstructorUsedError; + DateTime get releasedAt => throw _privateConstructorUsedError; Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $ZPoolCopyWith get copyWith => throw _privateConstructorUsedError; + $ChannelSnapInfoCopyWith get copyWith => + throw _privateConstructorUsedError; } /// @nodoc -abstract class $ZPoolCopyWith<$Res> { - factory $ZPoolCopyWith(ZPool value, $Res Function(ZPool) then) = - _$ZPoolCopyWithImpl<$Res, ZPool>; +abstract class $ChannelSnapInfoCopyWith<$Res> { + factory $ChannelSnapInfoCopyWith( + ChannelSnapInfo value, $Res Function(ChannelSnapInfo) then) = + _$ChannelSnapInfoCopyWithImpl<$Res, ChannelSnapInfo>; @useResult $Res call( - {String pool, - String mountpoint, - ZFS? zfses, - Map? poolProperties, - Map? fsProperties, - bool? defaultFeatures}); - - $ZFSCopyWith<$Res>? get zfses; + {String channelName, + String revision, + String confinement, + String version, + int size, + DateTime releasedAt}); } /// @nodoc -class _$ZPoolCopyWithImpl<$Res, $Val extends ZPool> - implements $ZPoolCopyWith<$Res> { - _$ZPoolCopyWithImpl(this._value, this._then); +class _$ChannelSnapInfoCopyWithImpl<$Res, $Val extends ChannelSnapInfo> + implements $ChannelSnapInfoCopyWith<$Res> { + _$ChannelSnapInfoCopyWithImpl(this._value, this._then); // ignore: unused_field final $Val _value; @@ -4843,296 +4415,248 @@ class _$ZPoolCopyWithImpl<$Res, $Val extends ZPool> @pragma('vm:prefer-inline') @override $Res call({ - Object? pool = null, - Object? mountpoint = null, - Object? zfses = freezed, - Object? poolProperties = freezed, - Object? fsProperties = freezed, - Object? defaultFeatures = freezed, + Object? channelName = null, + Object? revision = null, + Object? confinement = null, + Object? version = null, + Object? size = null, + Object? releasedAt = null, }) { return _then(_value.copyWith( - pool: null == pool - ? _value.pool - : pool // ignore: cast_nullable_to_non_nullable + channelName: null == channelName + ? _value.channelName + : channelName // ignore: cast_nullable_to_non_nullable as String, - mountpoint: null == mountpoint - ? _value.mountpoint - : mountpoint // ignore: cast_nullable_to_non_nullable + revision: null == revision + ? _value.revision + : revision // ignore: cast_nullable_to_non_nullable as String, - zfses: freezed == zfses - ? _value.zfses - : zfses // ignore: cast_nullable_to_non_nullable - as ZFS?, - poolProperties: freezed == poolProperties - ? _value.poolProperties - : poolProperties // ignore: cast_nullable_to_non_nullable - as Map?, - fsProperties: freezed == fsProperties - ? _value.fsProperties - : fsProperties // ignore: cast_nullable_to_non_nullable - as Map?, - defaultFeatures: freezed == defaultFeatures - ? _value.defaultFeatures - : defaultFeatures // ignore: cast_nullable_to_non_nullable - as bool?, + confinement: null == confinement + ? _value.confinement + : confinement // ignore: cast_nullable_to_non_nullable + as String, + version: null == version + ? _value.version + : version // ignore: cast_nullable_to_non_nullable + as String, + size: null == size + ? _value.size + : size // ignore: cast_nullable_to_non_nullable + as int, + releasedAt: null == releasedAt + ? _value.releasedAt + : releasedAt // ignore: cast_nullable_to_non_nullable + as DateTime, ) as $Val); } - - @override - @pragma('vm:prefer-inline') - $ZFSCopyWith<$Res>? get zfses { - if (_value.zfses == null) { - return null; - } - - return $ZFSCopyWith<$Res>(_value.zfses!, (value) { - return _then(_value.copyWith(zfses: value) as $Val); - }); - } } /// @nodoc -abstract class _$$ZPoolImplCopyWith<$Res> implements $ZPoolCopyWith<$Res> { - factory _$$ZPoolImplCopyWith( - _$ZPoolImpl value, $Res Function(_$ZPoolImpl) then) = - __$$ZPoolImplCopyWithImpl<$Res>; +abstract class _$$ChannelSnapInfoImplCopyWith<$Res> + implements $ChannelSnapInfoCopyWith<$Res> { + factory _$$ChannelSnapInfoImplCopyWith(_$ChannelSnapInfoImpl value, + $Res Function(_$ChannelSnapInfoImpl) then) = + __$$ChannelSnapInfoImplCopyWithImpl<$Res>; @override @useResult $Res call( - {String pool, - String mountpoint, - ZFS? zfses, - Map? poolProperties, - Map? fsProperties, - bool? defaultFeatures}); - - @override - $ZFSCopyWith<$Res>? get zfses; + {String channelName, + String revision, + String confinement, + String version, + int size, + DateTime releasedAt}); } /// @nodoc -class __$$ZPoolImplCopyWithImpl<$Res> - extends _$ZPoolCopyWithImpl<$Res, _$ZPoolImpl> - implements _$$ZPoolImplCopyWith<$Res> { - __$$ZPoolImplCopyWithImpl( - _$ZPoolImpl _value, $Res Function(_$ZPoolImpl) _then) +class __$$ChannelSnapInfoImplCopyWithImpl<$Res> + extends _$ChannelSnapInfoCopyWithImpl<$Res, _$ChannelSnapInfoImpl> + implements _$$ChannelSnapInfoImplCopyWith<$Res> { + __$$ChannelSnapInfoImplCopyWithImpl( + _$ChannelSnapInfoImpl _value, $Res Function(_$ChannelSnapInfoImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? pool = null, - Object? mountpoint = null, - Object? zfses = freezed, - Object? poolProperties = freezed, - Object? fsProperties = freezed, - Object? defaultFeatures = freezed, + Object? channelName = null, + Object? revision = null, + Object? confinement = null, + Object? version = null, + Object? size = null, + Object? releasedAt = null, }) { - return _then(_$ZPoolImpl( - pool: null == pool - ? _value.pool - : pool // ignore: cast_nullable_to_non_nullable + return _then(_$ChannelSnapInfoImpl( + channelName: null == channelName + ? _value.channelName + : channelName // ignore: cast_nullable_to_non_nullable as String, - mountpoint: null == mountpoint - ? _value.mountpoint - : mountpoint // ignore: cast_nullable_to_non_nullable + revision: null == revision + ? _value.revision + : revision // ignore: cast_nullable_to_non_nullable as String, - zfses: freezed == zfses - ? _value.zfses - : zfses // ignore: cast_nullable_to_non_nullable - as ZFS?, - poolProperties: freezed == poolProperties - ? _value._poolProperties - : poolProperties // ignore: cast_nullable_to_non_nullable - as Map?, - fsProperties: freezed == fsProperties - ? _value._fsProperties - : fsProperties // ignore: cast_nullable_to_non_nullable - as Map?, - defaultFeatures: freezed == defaultFeatures - ? _value.defaultFeatures - : defaultFeatures // ignore: cast_nullable_to_non_nullable - as bool?, + confinement: null == confinement + ? _value.confinement + : confinement // ignore: cast_nullable_to_non_nullable + as String, + version: null == version + ? _value.version + : version // ignore: cast_nullable_to_non_nullable + as String, + size: null == size + ? _value.size + : size // ignore: cast_nullable_to_non_nullable + as int, + releasedAt: null == releasedAt + ? _value.releasedAt + : releasedAt // ignore: cast_nullable_to_non_nullable + as DateTime, )); } } /// @nodoc @JsonSerializable() -class _$ZPoolImpl implements _ZPool { - const _$ZPoolImpl( - {required this.pool, - required this.mountpoint, - this.zfses, - final Map? poolProperties, - final Map? fsProperties, - this.defaultFeatures = true}) - : _poolProperties = poolProperties, - _fsProperties = fsProperties; +class _$ChannelSnapInfoImpl implements _ChannelSnapInfo { + const _$ChannelSnapInfoImpl( + {required this.channelName, + required this.revision, + required this.confinement, + required this.version, + required this.size, + required this.releasedAt}); - factory _$ZPoolImpl.fromJson(Map json) => - _$$ZPoolImplFromJson(json); + factory _$ChannelSnapInfoImpl.fromJson(Map json) => + _$$ChannelSnapInfoImplFromJson(json); @override - final String pool; + final String channelName; @override - final String mountpoint; + final String revision; @override - final ZFS? zfses; - final Map? _poolProperties; + final String confinement; @override - Map? get poolProperties { - final value = _poolProperties; - if (value == null) return null; - if (_poolProperties is EqualUnmodifiableMapView) return _poolProperties; - // ignore: implicit_dynamic_type - return EqualUnmodifiableMapView(value); - } - - final Map? _fsProperties; + final String version; @override - Map? get fsProperties { - final value = _fsProperties; - if (value == null) return null; - if (_fsProperties is EqualUnmodifiableMapView) return _fsProperties; - // ignore: implicit_dynamic_type - return EqualUnmodifiableMapView(value); - } - + final int size; @override - @JsonKey() - final bool? defaultFeatures; + final DateTime releasedAt; @override String toString() { - return 'ZPool(pool: $pool, mountpoint: $mountpoint, zfses: $zfses, poolProperties: $poolProperties, fsProperties: $fsProperties, defaultFeatures: $defaultFeatures)'; + return 'ChannelSnapInfo(channelName: $channelName, revision: $revision, confinement: $confinement, version: $version, size: $size, releasedAt: $releasedAt)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$ZPoolImpl && - (identical(other.pool, pool) || other.pool == pool) && - (identical(other.mountpoint, mountpoint) || - other.mountpoint == mountpoint) && - (identical(other.zfses, zfses) || other.zfses == zfses) && - const DeepCollectionEquality() - .equals(other._poolProperties, _poolProperties) && - const DeepCollectionEquality() - .equals(other._fsProperties, _fsProperties) && - (identical(other.defaultFeatures, defaultFeatures) || - other.defaultFeatures == defaultFeatures)); + other is _$ChannelSnapInfoImpl && + (identical(other.channelName, channelName) || + other.channelName == channelName) && + (identical(other.revision, revision) || + other.revision == revision) && + (identical(other.confinement, confinement) || + other.confinement == confinement) && + (identical(other.version, version) || other.version == version) && + (identical(other.size, size) || other.size == size) && + (identical(other.releasedAt, releasedAt) || + other.releasedAt == releasedAt)); } @JsonKey(ignore: true) @override - int get hashCode => Object.hash( - runtimeType, - pool, - mountpoint, - zfses, - const DeepCollectionEquality().hash(_poolProperties), - const DeepCollectionEquality().hash(_fsProperties), - defaultFeatures); + int get hashCode => Object.hash(runtimeType, channelName, revision, + confinement, version, size, releasedAt); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$ZPoolImplCopyWith<_$ZPoolImpl> get copyWith => - __$$ZPoolImplCopyWithImpl<_$ZPoolImpl>(this, _$identity); + _$$ChannelSnapInfoImplCopyWith<_$ChannelSnapInfoImpl> get copyWith => + __$$ChannelSnapInfoImplCopyWithImpl<_$ChannelSnapInfoImpl>( + this, _$identity); @override Map toJson() { - return _$$ZPoolImplToJson( + return _$$ChannelSnapInfoImplToJson( this, ); } } -abstract class _ZPool implements ZPool { - const factory _ZPool( - {required final String pool, - required final String mountpoint, - final ZFS? zfses, - final Map? poolProperties, - final Map? fsProperties, - final bool? defaultFeatures}) = _$ZPoolImpl; +abstract class _ChannelSnapInfo implements ChannelSnapInfo { + const factory _ChannelSnapInfo( + {required final String channelName, + required final String revision, + required final String confinement, + required final String version, + required final int size, + required final DateTime releasedAt}) = _$ChannelSnapInfoImpl; - factory _ZPool.fromJson(Map json) = _$ZPoolImpl.fromJson; + factory _ChannelSnapInfo.fromJson(Map json) = + _$ChannelSnapInfoImpl.fromJson; @override - String get pool; + String get channelName; @override - String get mountpoint; + String get revision; @override - ZFS? get zfses; + String get confinement; @override - Map? get poolProperties; + String get version; @override - Map? get fsProperties; + int get size; @override - bool? get defaultFeatures; + DateTime get releasedAt; @override @JsonKey(ignore: true) - _$$ZPoolImplCopyWith<_$ZPoolImpl> get copyWith => + _$$ChannelSnapInfoImplCopyWith<_$ChannelSnapInfoImpl> get copyWith => throw _privateConstructorUsedError; } -Disk _$DiskFromJson(Map json) { - return _Disk.fromJson(json); +SnapInfo _$SnapInfoFromJson(Map json) { + return _SnapInfo.fromJson(json); } /// @nodoc -mixin _$Disk { - String get id => throw _privateConstructorUsedError; - String get label => throw _privateConstructorUsedError; - String get type => throw _privateConstructorUsedError; - int get size => throw _privateConstructorUsedError; - List get usageLabels => throw _privateConstructorUsedError; - List get partitions => throw _privateConstructorUsedError; - bool get okForGuided => throw _privateConstructorUsedError; - String? get ptable => throw _privateConstructorUsedError; - bool get preserve => throw _privateConstructorUsedError; - String? get path => throw _privateConstructorUsedError; - bool get bootDevice => throw _privateConstructorUsedError; - bool get canBeBootDevice => throw _privateConstructorUsedError; - String? get model => throw _privateConstructorUsedError; - String? get vendor => throw _privateConstructorUsedError; - bool get hasInUsePartition => throw _privateConstructorUsedError; +mixin _$SnapInfo { + String get name => throw _privateConstructorUsedError; + String get summary => throw _privateConstructorUsedError; + String get publisher => throw _privateConstructorUsedError; + bool get verified => throw _privateConstructorUsedError; + bool get starred => throw _privateConstructorUsedError; + String get description => throw _privateConstructorUsedError; + String get confinement => throw _privateConstructorUsedError; + String get license => throw _privateConstructorUsedError; + List get channels => throw _privateConstructorUsedError; Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $DiskCopyWith get copyWith => throw _privateConstructorUsedError; + $SnapInfoCopyWith get copyWith => + throw _privateConstructorUsedError; } /// @nodoc -abstract class $DiskCopyWith<$Res> { - factory $DiskCopyWith(Disk value, $Res Function(Disk) then) = - _$DiskCopyWithImpl<$Res, Disk>; +abstract class $SnapInfoCopyWith<$Res> { + factory $SnapInfoCopyWith(SnapInfo value, $Res Function(SnapInfo) then) = + _$SnapInfoCopyWithImpl<$Res, SnapInfo>; @useResult $Res call( - {String id, - String label, - String type, - int size, - List usageLabels, - List partitions, - bool okForGuided, - String? ptable, - bool preserve, - String? path, - bool bootDevice, - bool canBeBootDevice, - String? model, - String? vendor, - bool hasInUsePartition}); + {String name, + String summary, + String publisher, + bool verified, + bool starred, + String description, + String confinement, + String license, + List channels}); } /// @nodoc -class _$DiskCopyWithImpl<$Res, $Val extends Disk> - implements $DiskCopyWith<$Res> { - _$DiskCopyWithImpl(this._value, this._then); +class _$SnapInfoCopyWithImpl<$Res, $Val extends SnapInfo> + implements $SnapInfoCopyWith<$Res> { + _$SnapInfoCopyWithImpl(this._value, this._then); // ignore: unused_field final $Val _value; @@ -5142,432 +4666,315 @@ class _$DiskCopyWithImpl<$Res, $Val extends Disk> @pragma('vm:prefer-inline') @override $Res call({ - Object? id = null, - Object? label = null, - Object? type = null, - Object? size = null, - Object? usageLabels = null, - Object? partitions = null, - Object? okForGuided = null, - Object? ptable = freezed, - Object? preserve = null, - Object? path = freezed, - Object? bootDevice = null, - Object? canBeBootDevice = null, - Object? model = freezed, - Object? vendor = freezed, - Object? hasInUsePartition = null, + Object? name = null, + Object? summary = null, + Object? publisher = null, + Object? verified = null, + Object? starred = null, + Object? description = null, + Object? confinement = null, + Object? license = null, + Object? channels = null, }) { return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable + name: null == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable as String, - label: null == label - ? _value.label - : label // ignore: cast_nullable_to_non_nullable + summary: null == summary + ? _value.summary + : summary // ignore: cast_nullable_to_non_nullable as String, - type: null == type - ? _value.type - : type // ignore: cast_nullable_to_non_nullable + publisher: null == publisher + ? _value.publisher + : publisher // ignore: cast_nullable_to_non_nullable as String, - size: null == size - ? _value.size - : size // ignore: cast_nullable_to_non_nullable - as int, - usageLabels: null == usageLabels - ? _value.usageLabels - : usageLabels // ignore: cast_nullable_to_non_nullable - as List, - partitions: null == partitions - ? _value.partitions - : partitions // ignore: cast_nullable_to_non_nullable - as List, - okForGuided: null == okForGuided - ? _value.okForGuided - : okForGuided // ignore: cast_nullable_to_non_nullable + verified: null == verified + ? _value.verified + : verified // ignore: cast_nullable_to_non_nullable as bool, - ptable: freezed == ptable - ? _value.ptable - : ptable // ignore: cast_nullable_to_non_nullable - as String?, - preserve: null == preserve - ? _value.preserve - : preserve // ignore: cast_nullable_to_non_nullable - as bool, - path: freezed == path - ? _value.path - : path // ignore: cast_nullable_to_non_nullable - as String?, - bootDevice: null == bootDevice - ? _value.bootDevice - : bootDevice // ignore: cast_nullable_to_non_nullable - as bool, - canBeBootDevice: null == canBeBootDevice - ? _value.canBeBootDevice - : canBeBootDevice // ignore: cast_nullable_to_non_nullable - as bool, - model: freezed == model - ? _value.model - : model // ignore: cast_nullable_to_non_nullable - as String?, - vendor: freezed == vendor - ? _value.vendor - : vendor // ignore: cast_nullable_to_non_nullable - as String?, - hasInUsePartition: null == hasInUsePartition - ? _value.hasInUsePartition - : hasInUsePartition // ignore: cast_nullable_to_non_nullable + starred: null == starred + ? _value.starred + : starred // ignore: cast_nullable_to_non_nullable as bool, + description: null == description + ? _value.description + : description // ignore: cast_nullable_to_non_nullable + as String, + confinement: null == confinement + ? _value.confinement + : confinement // ignore: cast_nullable_to_non_nullable + as String, + license: null == license + ? _value.license + : license // ignore: cast_nullable_to_non_nullable + as String, + channels: null == channels + ? _value.channels + : channels // ignore: cast_nullable_to_non_nullable + as List, ) as $Val); } } /// @nodoc -abstract class _$$DiskImplCopyWith<$Res> implements $DiskCopyWith<$Res> { - factory _$$DiskImplCopyWith( - _$DiskImpl value, $Res Function(_$DiskImpl) then) = - __$$DiskImplCopyWithImpl<$Res>; +abstract class _$$SnapInfoImplCopyWith<$Res> + implements $SnapInfoCopyWith<$Res> { + factory _$$SnapInfoImplCopyWith( + _$SnapInfoImpl value, $Res Function(_$SnapInfoImpl) then) = + __$$SnapInfoImplCopyWithImpl<$Res>; @override @useResult $Res call( - {String id, - String label, - String type, - int size, - List usageLabels, - List partitions, - bool okForGuided, - String? ptable, - bool preserve, - String? path, - bool bootDevice, - bool canBeBootDevice, - String? model, - String? vendor, - bool hasInUsePartition}); + {String name, + String summary, + String publisher, + bool verified, + bool starred, + String description, + String confinement, + String license, + List channels}); } /// @nodoc -class __$$DiskImplCopyWithImpl<$Res> - extends _$DiskCopyWithImpl<$Res, _$DiskImpl> - implements _$$DiskImplCopyWith<$Res> { - __$$DiskImplCopyWithImpl(_$DiskImpl _value, $Res Function(_$DiskImpl) _then) +class __$$SnapInfoImplCopyWithImpl<$Res> + extends _$SnapInfoCopyWithImpl<$Res, _$SnapInfoImpl> + implements _$$SnapInfoImplCopyWith<$Res> { + __$$SnapInfoImplCopyWithImpl( + _$SnapInfoImpl _value, $Res Function(_$SnapInfoImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? id = null, - Object? label = null, - Object? type = null, - Object? size = null, - Object? usageLabels = null, - Object? partitions = null, - Object? okForGuided = null, - Object? ptable = freezed, - Object? preserve = null, - Object? path = freezed, - Object? bootDevice = null, - Object? canBeBootDevice = null, - Object? model = freezed, - Object? vendor = freezed, - Object? hasInUsePartition = null, + Object? name = null, + Object? summary = null, + Object? publisher = null, + Object? verified = null, + Object? starred = null, + Object? description = null, + Object? confinement = null, + Object? license = null, + Object? channels = null, }) { - return _then(_$DiskImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable + return _then(_$SnapInfoImpl( + name: null == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable as String, - label: null == label - ? _value.label - : label // ignore: cast_nullable_to_non_nullable + summary: null == summary + ? _value.summary + : summary // ignore: cast_nullable_to_non_nullable as String, - type: null == type - ? _value.type - : type // ignore: cast_nullable_to_non_nullable + publisher: null == publisher + ? _value.publisher + : publisher // ignore: cast_nullable_to_non_nullable as String, - size: null == size - ? _value.size - : size // ignore: cast_nullable_to_non_nullable - as int, - usageLabels: null == usageLabels - ? _value._usageLabels - : usageLabels // ignore: cast_nullable_to_non_nullable - as List, - partitions: null == partitions - ? _value._partitions - : partitions // ignore: cast_nullable_to_non_nullable - as List, - okForGuided: null == okForGuided - ? _value.okForGuided - : okForGuided // ignore: cast_nullable_to_non_nullable - as bool, - ptable: freezed == ptable - ? _value.ptable - : ptable // ignore: cast_nullable_to_non_nullable - as String?, - preserve: null == preserve - ? _value.preserve - : preserve // ignore: cast_nullable_to_non_nullable - as bool, - path: freezed == path - ? _value.path - : path // ignore: cast_nullable_to_non_nullable - as String?, - bootDevice: null == bootDevice - ? _value.bootDevice - : bootDevice // ignore: cast_nullable_to_non_nullable - as bool, - canBeBootDevice: null == canBeBootDevice - ? _value.canBeBootDevice - : canBeBootDevice // ignore: cast_nullable_to_non_nullable + verified: null == verified + ? _value.verified + : verified // ignore: cast_nullable_to_non_nullable as bool, - model: freezed == model - ? _value.model - : model // ignore: cast_nullable_to_non_nullable - as String?, - vendor: freezed == vendor - ? _value.vendor - : vendor // ignore: cast_nullable_to_non_nullable - as String?, - hasInUsePartition: null == hasInUsePartition - ? _value.hasInUsePartition - : hasInUsePartition // ignore: cast_nullable_to_non_nullable + starred: null == starred + ? _value.starred + : starred // ignore: cast_nullable_to_non_nullable as bool, + description: null == description + ? _value.description + : description // ignore: cast_nullable_to_non_nullable + as String, + confinement: null == confinement + ? _value.confinement + : confinement // ignore: cast_nullable_to_non_nullable + as String, + license: null == license + ? _value.license + : license // ignore: cast_nullable_to_non_nullable + as String, + channels: null == channels + ? _value._channels + : channels // ignore: cast_nullable_to_non_nullable + as List, )); } } /// @nodoc @JsonSerializable() -class _$DiskImpl implements _Disk { - const _$DiskImpl( - {required this.id, - required this.label, - required this.type, - required this.size, - required final List usageLabels, - required final List partitions, - required this.okForGuided, - required this.ptable, - required this.preserve, - required this.path, - required this.bootDevice, - required this.canBeBootDevice, - this.model, - this.vendor, - this.hasInUsePartition = false}) - : _usageLabels = usageLabels, - _partitions = partitions; +class _$SnapInfoImpl implements _SnapInfo { + const _$SnapInfoImpl( + {required this.name, + this.summary = '', + this.publisher = '', + this.verified = false, + this.starred = false, + this.description = '', + this.confinement = '', + this.license = '', + final List channels = const []}) + : _channels = channels; - factory _$DiskImpl.fromJson(Map json) => - _$$DiskImplFromJson(json); + factory _$SnapInfoImpl.fromJson(Map json) => + _$$SnapInfoImplFromJson(json); @override - final String id; + final String name; @override - final String label; + @JsonKey() + final String summary; @override - final String type; + @JsonKey() + final String publisher; @override - final int size; - final List _usageLabels; + @JsonKey() + final bool verified; @override - List get usageLabels { - if (_usageLabels is EqualUnmodifiableListView) return _usageLabels; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_usageLabels); - } - - final List _partitions; + @JsonKey() + final bool starred; @override - List get partitions { - if (_partitions is EqualUnmodifiableListView) return _partitions; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_partitions); - } - - @override - final bool okForGuided; - @override - final String? ptable; - @override - final bool preserve; - @override - final String? path; - @override - final bool bootDevice; - @override - final bool canBeBootDevice; + @JsonKey() + final String description; @override - final String? model; + @JsonKey() + final String confinement; @override - final String? vendor; + @JsonKey() + final String license; + final List _channels; @override @JsonKey() - final bool hasInUsePartition; + List get channels { + if (_channels is EqualUnmodifiableListView) return _channels; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_channels); + } @override String toString() { - return 'Disk(id: $id, label: $label, type: $type, size: $size, usageLabels: $usageLabels, partitions: $partitions, okForGuided: $okForGuided, ptable: $ptable, preserve: $preserve, path: $path, bootDevice: $bootDevice, canBeBootDevice: $canBeBootDevice, model: $model, vendor: $vendor, hasInUsePartition: $hasInUsePartition)'; + return 'SnapInfo(name: $name, summary: $summary, publisher: $publisher, verified: $verified, starred: $starred, description: $description, confinement: $confinement, license: $license, channels: $channels)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$DiskImpl && - (identical(other.id, id) || other.id == id) && - (identical(other.label, label) || other.label == label) && - (identical(other.type, type) || other.type == type) && - (identical(other.size, size) || other.size == size) && - const DeepCollectionEquality() - .equals(other._usageLabels, _usageLabels) && - const DeepCollectionEquality() - .equals(other._partitions, _partitions) && - (identical(other.okForGuided, okForGuided) || - other.okForGuided == okForGuided) && - (identical(other.ptable, ptable) || other.ptable == ptable) && - (identical(other.preserve, preserve) || - other.preserve == preserve) && - (identical(other.path, path) || other.path == path) && - (identical(other.bootDevice, bootDevice) || - other.bootDevice == bootDevice) && - (identical(other.canBeBootDevice, canBeBootDevice) || - other.canBeBootDevice == canBeBootDevice) && - (identical(other.model, model) || other.model == model) && - (identical(other.vendor, vendor) || other.vendor == vendor) && - (identical(other.hasInUsePartition, hasInUsePartition) || - other.hasInUsePartition == hasInUsePartition)); + other is _$SnapInfoImpl && + (identical(other.name, name) || other.name == name) && + (identical(other.summary, summary) || other.summary == summary) && + (identical(other.publisher, publisher) || + other.publisher == publisher) && + (identical(other.verified, verified) || + other.verified == verified) && + (identical(other.starred, starred) || other.starred == starred) && + (identical(other.description, description) || + other.description == description) && + (identical(other.confinement, confinement) || + other.confinement == confinement) && + (identical(other.license, license) || other.license == license) && + const DeepCollectionEquality().equals(other._channels, _channels)); } @JsonKey(ignore: true) @override int get hashCode => Object.hash( runtimeType, - id, - label, - type, - size, - const DeepCollectionEquality().hash(_usageLabels), - const DeepCollectionEquality().hash(_partitions), - okForGuided, - ptable, - preserve, - path, - bootDevice, - canBeBootDevice, - model, - vendor, - hasInUsePartition); + name, + summary, + publisher, + verified, + starred, + description, + confinement, + license, + const DeepCollectionEquality().hash(_channels)); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$DiskImplCopyWith<_$DiskImpl> get copyWith => - __$$DiskImplCopyWithImpl<_$DiskImpl>(this, _$identity); + _$$SnapInfoImplCopyWith<_$SnapInfoImpl> get copyWith => + __$$SnapInfoImplCopyWithImpl<_$SnapInfoImpl>(this, _$identity); @override Map toJson() { - return _$$DiskImplToJson( + return _$$SnapInfoImplToJson( this, ); } } -abstract class _Disk implements Disk { - const factory _Disk( - {required final String id, - required final String label, - required final String type, - required final int size, - required final List usageLabels, - required final List partitions, - required final bool okForGuided, - required final String? ptable, - required final bool preserve, - required final String? path, - required final bool bootDevice, - required final bool canBeBootDevice, - final String? model, - final String? vendor, - final bool hasInUsePartition}) = _$DiskImpl; +abstract class _SnapInfo implements SnapInfo { + const factory _SnapInfo( + {required final String name, + final String summary, + final String publisher, + final bool verified, + final bool starred, + final String description, + final String confinement, + final String license, + final List channels}) = _$SnapInfoImpl; - factory _Disk.fromJson(Map json) = _$DiskImpl.fromJson; + factory _SnapInfo.fromJson(Map json) = + _$SnapInfoImpl.fromJson; @override - String get id; - @override - String get label; - @override - String get type; - @override - int get size; - @override - List get usageLabels; - @override - List get partitions; - @override - bool get okForGuided; + String get name; @override - String? get ptable; + String get summary; @override - bool get preserve; + String get publisher; @override - String? get path; + bool get verified; @override - bool get bootDevice; + bool get starred; @override - bool get canBeBootDevice; + String get description; @override - String? get model; + String get confinement; @override - String? get vendor; + String get license; @override - bool get hasInUsePartition; + List get channels; @override @JsonKey(ignore: true) - _$$DiskImplCopyWith<_$DiskImpl> get copyWith => + _$$SnapInfoImplCopyWith<_$SnapInfoImpl> get copyWith => throw _privateConstructorUsedError; } -GuidedDisallowedCapability _$GuidedDisallowedCapabilityFromJson( - Map json) { - return _GuidedDisallowedCapability.fromJson(json); +DriversResponse _$DriversResponseFromJson(Map json) { + return _DriversResponse.fromJson(json); } /// @nodoc -mixin _$GuidedDisallowedCapability { - GuidedCapability get capability => throw _privateConstructorUsedError; - GuidedDisallowedCapabilityReason get reason => - throw _privateConstructorUsedError; - String? get message => throw _privateConstructorUsedError; +mixin _$DriversResponse { + bool get install => throw _privateConstructorUsedError; + List? get drivers => throw _privateConstructorUsedError; + bool get localOnly => throw _privateConstructorUsedError; + bool get searchDrivers => throw _privateConstructorUsedError; Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $GuidedDisallowedCapabilityCopyWith - get copyWith => throw _privateConstructorUsedError; + $DriversResponseCopyWith get copyWith => + throw _privateConstructorUsedError; } /// @nodoc -abstract class $GuidedDisallowedCapabilityCopyWith<$Res> { - factory $GuidedDisallowedCapabilityCopyWith(GuidedDisallowedCapability value, - $Res Function(GuidedDisallowedCapability) then) = - _$GuidedDisallowedCapabilityCopyWithImpl<$Res, - GuidedDisallowedCapability>; +abstract class $DriversResponseCopyWith<$Res> { + factory $DriversResponseCopyWith( + DriversResponse value, $Res Function(DriversResponse) then) = + _$DriversResponseCopyWithImpl<$Res, DriversResponse>; @useResult $Res call( - {GuidedCapability capability, - GuidedDisallowedCapabilityReason reason, - String? message}); + {bool install, + List? drivers, + bool localOnly, + bool searchDrivers}); } /// @nodoc -class _$GuidedDisallowedCapabilityCopyWithImpl<$Res, - $Val extends GuidedDisallowedCapability> - implements $GuidedDisallowedCapabilityCopyWith<$Res> { - _$GuidedDisallowedCapabilityCopyWithImpl(this._value, this._then); +class _$DriversResponseCopyWithImpl<$Res, $Val extends DriversResponse> + implements $DriversResponseCopyWith<$Res> { + _$DriversResponseCopyWithImpl(this._value, this._then); // ignore: unused_field final $Val _value; @@ -5577,192 +4984,203 @@ class _$GuidedDisallowedCapabilityCopyWithImpl<$Res, @pragma('vm:prefer-inline') @override $Res call({ - Object? capability = null, - Object? reason = null, - Object? message = freezed, + Object? install = null, + Object? drivers = freezed, + Object? localOnly = null, + Object? searchDrivers = null, }) { return _then(_value.copyWith( - capability: null == capability - ? _value.capability - : capability // ignore: cast_nullable_to_non_nullable - as GuidedCapability, - reason: null == reason - ? _value.reason - : reason // ignore: cast_nullable_to_non_nullable - as GuidedDisallowedCapabilityReason, - message: freezed == message - ? _value.message - : message // ignore: cast_nullable_to_non_nullable - as String?, + install: null == install + ? _value.install + : install // ignore: cast_nullable_to_non_nullable + as bool, + drivers: freezed == drivers + ? _value.drivers + : drivers // ignore: cast_nullable_to_non_nullable + as List?, + localOnly: null == localOnly + ? _value.localOnly + : localOnly // ignore: cast_nullable_to_non_nullable + as bool, + searchDrivers: null == searchDrivers + ? _value.searchDrivers + : searchDrivers // ignore: cast_nullable_to_non_nullable + as bool, ) as $Val); } } /// @nodoc -abstract class _$$GuidedDisallowedCapabilityImplCopyWith<$Res> - implements $GuidedDisallowedCapabilityCopyWith<$Res> { - factory _$$GuidedDisallowedCapabilityImplCopyWith( - _$GuidedDisallowedCapabilityImpl value, - $Res Function(_$GuidedDisallowedCapabilityImpl) then) = - __$$GuidedDisallowedCapabilityImplCopyWithImpl<$Res>; +abstract class _$$DriversResponseImplCopyWith<$Res> + implements $DriversResponseCopyWith<$Res> { + factory _$$DriversResponseImplCopyWith(_$DriversResponseImpl value, + $Res Function(_$DriversResponseImpl) then) = + __$$DriversResponseImplCopyWithImpl<$Res>; @override @useResult $Res call( - {GuidedCapability capability, - GuidedDisallowedCapabilityReason reason, - String? message}); -} - + {bool install, + List? drivers, + bool localOnly, + bool searchDrivers}); +} + /// @nodoc -class __$$GuidedDisallowedCapabilityImplCopyWithImpl<$Res> - extends _$GuidedDisallowedCapabilityCopyWithImpl<$Res, - _$GuidedDisallowedCapabilityImpl> - implements _$$GuidedDisallowedCapabilityImplCopyWith<$Res> { - __$$GuidedDisallowedCapabilityImplCopyWithImpl( - _$GuidedDisallowedCapabilityImpl _value, - $Res Function(_$GuidedDisallowedCapabilityImpl) _then) +class __$$DriversResponseImplCopyWithImpl<$Res> + extends _$DriversResponseCopyWithImpl<$Res, _$DriversResponseImpl> + implements _$$DriversResponseImplCopyWith<$Res> { + __$$DriversResponseImplCopyWithImpl( + _$DriversResponseImpl _value, $Res Function(_$DriversResponseImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? capability = null, - Object? reason = null, - Object? message = freezed, + Object? install = null, + Object? drivers = freezed, + Object? localOnly = null, + Object? searchDrivers = null, }) { - return _then(_$GuidedDisallowedCapabilityImpl( - capability: null == capability - ? _value.capability - : capability // ignore: cast_nullable_to_non_nullable - as GuidedCapability, - reason: null == reason - ? _value.reason - : reason // ignore: cast_nullable_to_non_nullable - as GuidedDisallowedCapabilityReason, - message: freezed == message - ? _value.message - : message // ignore: cast_nullable_to_non_nullable - as String?, + return _then(_$DriversResponseImpl( + install: null == install + ? _value.install + : install // ignore: cast_nullable_to_non_nullable + as bool, + drivers: freezed == drivers + ? _value._drivers + : drivers // ignore: cast_nullable_to_non_nullable + as List?, + localOnly: null == localOnly + ? _value.localOnly + : localOnly // ignore: cast_nullable_to_non_nullable + as bool, + searchDrivers: null == searchDrivers + ? _value.searchDrivers + : searchDrivers // ignore: cast_nullable_to_non_nullable + as bool, )); } } /// @nodoc @JsonSerializable() -class _$GuidedDisallowedCapabilityImpl implements _GuidedDisallowedCapability { - const _$GuidedDisallowedCapabilityImpl( - {required this.capability, required this.reason, this.message}); +class _$DriversResponseImpl implements _DriversResponse { + const _$DriversResponseImpl( + {required this.install, + required final List? drivers, + required this.localOnly, + required this.searchDrivers}) + : _drivers = drivers; - factory _$GuidedDisallowedCapabilityImpl.fromJson( - Map json) => - _$$GuidedDisallowedCapabilityImplFromJson(json); + factory _$DriversResponseImpl.fromJson(Map json) => + _$$DriversResponseImplFromJson(json); @override - final GuidedCapability capability; + final bool install; + final List? _drivers; @override - final GuidedDisallowedCapabilityReason reason; + List? get drivers { + final value = _drivers; + if (value == null) return null; + if (_drivers is EqualUnmodifiableListView) return _drivers; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(value); + } + @override - final String? message; + final bool localOnly; + @override + final bool searchDrivers; @override String toString() { - return 'GuidedDisallowedCapability(capability: $capability, reason: $reason, message: $message)'; + return 'DriversResponse(install: $install, drivers: $drivers, localOnly: $localOnly, searchDrivers: $searchDrivers)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$GuidedDisallowedCapabilityImpl && - (identical(other.capability, capability) || - other.capability == capability) && - (identical(other.reason, reason) || other.reason == reason) && - (identical(other.message, message) || other.message == message)); + other is _$DriversResponseImpl && + (identical(other.install, install) || other.install == install) && + const DeepCollectionEquality().equals(other._drivers, _drivers) && + (identical(other.localOnly, localOnly) || + other.localOnly == localOnly) && + (identical(other.searchDrivers, searchDrivers) || + other.searchDrivers == searchDrivers)); } @JsonKey(ignore: true) @override - int get hashCode => Object.hash(runtimeType, capability, reason, message); + int get hashCode => Object.hash(runtimeType, install, + const DeepCollectionEquality().hash(_drivers), localOnly, searchDrivers); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$GuidedDisallowedCapabilityImplCopyWith<_$GuidedDisallowedCapabilityImpl> - get copyWith => __$$GuidedDisallowedCapabilityImplCopyWithImpl< - _$GuidedDisallowedCapabilityImpl>(this, _$identity); + _$$DriversResponseImplCopyWith<_$DriversResponseImpl> get copyWith => + __$$DriversResponseImplCopyWithImpl<_$DriversResponseImpl>( + this, _$identity); @override Map toJson() { - return _$$GuidedDisallowedCapabilityImplToJson( + return _$$DriversResponseImplToJson( this, ); } } -abstract class _GuidedDisallowedCapability - implements GuidedDisallowedCapability { - const factory _GuidedDisallowedCapability( - {required final GuidedCapability capability, - required final GuidedDisallowedCapabilityReason reason, - final String? message}) = _$GuidedDisallowedCapabilityImpl; +abstract class _DriversResponse implements DriversResponse { + const factory _DriversResponse( + {required final bool install, + required final List? drivers, + required final bool localOnly, + required final bool searchDrivers}) = _$DriversResponseImpl; - factory _GuidedDisallowedCapability.fromJson(Map json) = - _$GuidedDisallowedCapabilityImpl.fromJson; + factory _DriversResponse.fromJson(Map json) = + _$DriversResponseImpl.fromJson; @override - GuidedCapability get capability; + bool get install; @override - GuidedDisallowedCapabilityReason get reason; + List? get drivers; @override - String? get message; + bool get localOnly; + @override + bool get searchDrivers; @override @JsonKey(ignore: true) - _$$GuidedDisallowedCapabilityImplCopyWith<_$GuidedDisallowedCapabilityImpl> - get copyWith => throw _privateConstructorUsedError; + _$$DriversResponseImplCopyWith<_$DriversResponseImpl> get copyWith => + throw _privateConstructorUsedError; } -StorageResponse _$StorageResponseFromJson(Map json) { - return _StorageResponse.fromJson(json); +OEMResponse _$OEMResponseFromJson(Map json) { + return _OEMResponse.fromJson(json); } /// @nodoc -mixin _$StorageResponse { - ProbeStatus get status => throw _privateConstructorUsedError; - ErrorReportRef? get errorReport => throw _privateConstructorUsedError; - Bootloader? get bootloader => throw _privateConstructorUsedError; - List? get origConfig => throw _privateConstructorUsedError; - List? get config => throw _privateConstructorUsedError; - Map? get dasd => throw _privateConstructorUsedError; - int get storageVersion => throw _privateConstructorUsedError; +mixin _$OEMResponse { + List? get metapackages => throw _privateConstructorUsedError; Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $StorageResponseCopyWith get copyWith => + $OEMResponseCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class $StorageResponseCopyWith<$Res> { - factory $StorageResponseCopyWith( - StorageResponse value, $Res Function(StorageResponse) then) = - _$StorageResponseCopyWithImpl<$Res, StorageResponse>; +abstract class $OEMResponseCopyWith<$Res> { + factory $OEMResponseCopyWith( + OEMResponse value, $Res Function(OEMResponse) then) = + _$OEMResponseCopyWithImpl<$Res, OEMResponse>; @useResult - $Res call( - {ProbeStatus status, - ErrorReportRef? errorReport, - Bootloader? bootloader, - List? origConfig, - List? config, - Map? dasd, - int storageVersion}); - - $ErrorReportRefCopyWith<$Res>? get errorReport; + $Res call({List? metapackages}); } /// @nodoc -class _$StorageResponseCopyWithImpl<$Res, $Val extends StorageResponse> - implements $StorageResponseCopyWith<$Res> { - _$StorageResponseCopyWithImpl(this._value, this._then); +class _$OEMResponseCopyWithImpl<$Res, $Val extends OEMResponse> + implements $OEMResponseCopyWith<$Res> { + _$OEMResponseCopyWithImpl(this._value, this._then); // ignore: unused_field final $Val _value; @@ -5772,313 +5190,144 @@ class _$StorageResponseCopyWithImpl<$Res, $Val extends StorageResponse> @pragma('vm:prefer-inline') @override $Res call({ - Object? status = null, - Object? errorReport = freezed, - Object? bootloader = freezed, - Object? origConfig = freezed, - Object? config = freezed, - Object? dasd = freezed, - Object? storageVersion = null, + Object? metapackages = freezed, }) { return _then(_value.copyWith( - status: null == status - ? _value.status - : status // ignore: cast_nullable_to_non_nullable - as ProbeStatus, - errorReport: freezed == errorReport - ? _value.errorReport - : errorReport // ignore: cast_nullable_to_non_nullable - as ErrorReportRef?, - bootloader: freezed == bootloader - ? _value.bootloader - : bootloader // ignore: cast_nullable_to_non_nullable - as Bootloader?, - origConfig: freezed == origConfig - ? _value.origConfig - : origConfig // ignore: cast_nullable_to_non_nullable - as List?, - config: freezed == config - ? _value.config - : config // ignore: cast_nullable_to_non_nullable - as List?, - dasd: freezed == dasd - ? _value.dasd - : dasd // ignore: cast_nullable_to_non_nullable - as Map?, - storageVersion: null == storageVersion - ? _value.storageVersion - : storageVersion // ignore: cast_nullable_to_non_nullable - as int, + metapackages: freezed == metapackages + ? _value.metapackages + : metapackages // ignore: cast_nullable_to_non_nullable + as List?, ) as $Val); } - - @override - @pragma('vm:prefer-inline') - $ErrorReportRefCopyWith<$Res>? get errorReport { - if (_value.errorReport == null) { - return null; - } - - return $ErrorReportRefCopyWith<$Res>(_value.errorReport!, (value) { - return _then(_value.copyWith(errorReport: value) as $Val); - }); - } } /// @nodoc -abstract class _$$StorageResponseImplCopyWith<$Res> - implements $StorageResponseCopyWith<$Res> { - factory _$$StorageResponseImplCopyWith(_$StorageResponseImpl value, - $Res Function(_$StorageResponseImpl) then) = - __$$StorageResponseImplCopyWithImpl<$Res>; +abstract class _$$OEMResponseImplCopyWith<$Res> + implements $OEMResponseCopyWith<$Res> { + factory _$$OEMResponseImplCopyWith( + _$OEMResponseImpl value, $Res Function(_$OEMResponseImpl) then) = + __$$OEMResponseImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {ProbeStatus status, - ErrorReportRef? errorReport, - Bootloader? bootloader, - List? origConfig, - List? config, - Map? dasd, - int storageVersion}); - - @override - $ErrorReportRefCopyWith<$Res>? get errorReport; + $Res call({List? metapackages}); } /// @nodoc -class __$$StorageResponseImplCopyWithImpl<$Res> - extends _$StorageResponseCopyWithImpl<$Res, _$StorageResponseImpl> - implements _$$StorageResponseImplCopyWith<$Res> { - __$$StorageResponseImplCopyWithImpl( - _$StorageResponseImpl _value, $Res Function(_$StorageResponseImpl) _then) +class __$$OEMResponseImplCopyWithImpl<$Res> + extends _$OEMResponseCopyWithImpl<$Res, _$OEMResponseImpl> + implements _$$OEMResponseImplCopyWith<$Res> { + __$$OEMResponseImplCopyWithImpl( + _$OEMResponseImpl _value, $Res Function(_$OEMResponseImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? status = null, - Object? errorReport = freezed, - Object? bootloader = freezed, - Object? origConfig = freezed, - Object? config = freezed, - Object? dasd = freezed, - Object? storageVersion = null, + Object? metapackages = freezed, }) { - return _then(_$StorageResponseImpl( - status: null == status - ? _value.status - : status // ignore: cast_nullable_to_non_nullable - as ProbeStatus, - errorReport: freezed == errorReport - ? _value.errorReport - : errorReport // ignore: cast_nullable_to_non_nullable - as ErrorReportRef?, - bootloader: freezed == bootloader - ? _value.bootloader - : bootloader // ignore: cast_nullable_to_non_nullable - as Bootloader?, - origConfig: freezed == origConfig - ? _value._origConfig - : origConfig // ignore: cast_nullable_to_non_nullable - as List?, - config: freezed == config - ? _value._config - : config // ignore: cast_nullable_to_non_nullable - as List?, - dasd: freezed == dasd - ? _value._dasd - : dasd // ignore: cast_nullable_to_non_nullable - as Map?, - storageVersion: null == storageVersion - ? _value.storageVersion - : storageVersion // ignore: cast_nullable_to_non_nullable - as int, + return _then(_$OEMResponseImpl( + metapackages: freezed == metapackages + ? _value._metapackages + : metapackages // ignore: cast_nullable_to_non_nullable + as List?, )); } } /// @nodoc @JsonSerializable() -class _$StorageResponseImpl implements _StorageResponse { - const _$StorageResponseImpl( - {required this.status, - this.errorReport, - this.bootloader, - final List? origConfig, - final List? config, - final Map? dasd, - this.storageVersion = 1}) - : _origConfig = origConfig, - _config = config, - _dasd = dasd; - - factory _$StorageResponseImpl.fromJson(Map json) => - _$$StorageResponseImplFromJson(json); +class _$OEMResponseImpl implements _OEMResponse { + const _$OEMResponseImpl({required final List? metapackages}) + : _metapackages = metapackages; - @override - final ProbeStatus status; - @override - final ErrorReportRef? errorReport; - @override - final Bootloader? bootloader; - final List? _origConfig; - @override - List? get origConfig { - final value = _origConfig; - if (value == null) return null; - if (_origConfig is EqualUnmodifiableListView) return _origConfig; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(value); - } + factory _$OEMResponseImpl.fromJson(Map json) => + _$$OEMResponseImplFromJson(json); - final List? _config; + final List? _metapackages; @override - List? get config { - final value = _config; + List? get metapackages { + final value = _metapackages; if (value == null) return null; - if (_config is EqualUnmodifiableListView) return _config; + if (_metapackages is EqualUnmodifiableListView) return _metapackages; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(value); } - final Map? _dasd; - @override - Map? get dasd { - final value = _dasd; - if (value == null) return null; - if (_dasd is EqualUnmodifiableMapView) return _dasd; - // ignore: implicit_dynamic_type - return EqualUnmodifiableMapView(value); - } - - @override - @JsonKey() - final int storageVersion; - @override String toString() { - return 'StorageResponse(status: $status, errorReport: $errorReport, bootloader: $bootloader, origConfig: $origConfig, config: $config, dasd: $dasd, storageVersion: $storageVersion)'; + return 'OEMResponse(metapackages: $metapackages)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StorageResponseImpl && - (identical(other.status, status) || other.status == status) && - (identical(other.errorReport, errorReport) || - other.errorReport == errorReport) && - (identical(other.bootloader, bootloader) || - other.bootloader == bootloader) && + other is _$OEMResponseImpl && const DeepCollectionEquality() - .equals(other._origConfig, _origConfig) && - const DeepCollectionEquality().equals(other._config, _config) && - const DeepCollectionEquality().equals(other._dasd, _dasd) && - (identical(other.storageVersion, storageVersion) || - other.storageVersion == storageVersion)); + .equals(other._metapackages, _metapackages)); } @JsonKey(ignore: true) @override int get hashCode => Object.hash( - runtimeType, - status, - errorReport, - bootloader, - const DeepCollectionEquality().hash(_origConfig), - const DeepCollectionEquality().hash(_config), - const DeepCollectionEquality().hash(_dasd), - storageVersion); + runtimeType, const DeepCollectionEquality().hash(_metapackages)); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$StorageResponseImplCopyWith<_$StorageResponseImpl> get copyWith => - __$$StorageResponseImplCopyWithImpl<_$StorageResponseImpl>( - this, _$identity); + _$$OEMResponseImplCopyWith<_$OEMResponseImpl> get copyWith => + __$$OEMResponseImplCopyWithImpl<_$OEMResponseImpl>(this, _$identity); @override Map toJson() { - return _$$StorageResponseImplToJson( + return _$$OEMResponseImplToJson( this, ); } } -abstract class _StorageResponse implements StorageResponse { - const factory _StorageResponse( - {required final ProbeStatus status, - final ErrorReportRef? errorReport, - final Bootloader? bootloader, - final List? origConfig, - final List? config, - final Map? dasd, - final int storageVersion}) = _$StorageResponseImpl; +abstract class _OEMResponse implements OEMResponse { + const factory _OEMResponse({required final List? metapackages}) = + _$OEMResponseImpl; - factory _StorageResponse.fromJson(Map json) = - _$StorageResponseImpl.fromJson; + factory _OEMResponse.fromJson(Map json) = + _$OEMResponseImpl.fromJson; @override - ProbeStatus get status; - @override - ErrorReportRef? get errorReport; - @override - Bootloader? get bootloader; - @override - List? get origConfig; - @override - List? get config; - @override - Map? get dasd; - @override - int get storageVersion; + List? get metapackages; @override @JsonKey(ignore: true) - _$$StorageResponseImplCopyWith<_$StorageResponseImpl> get copyWith => + _$$OEMResponseImplCopyWith<_$OEMResponseImpl> get copyWith => throw _privateConstructorUsedError; } -StorageResponseV2 _$StorageResponseV2FromJson(Map json) { - return _StorageResponseV2.fromJson(json); +CodecsData _$CodecsDataFromJson(Map json) { + return _CodecsData.fromJson(json); } /// @nodoc -mixin _$StorageResponseV2 { - ProbeStatus get status => throw _privateConstructorUsedError; - ErrorReportRef? get errorReport => throw _privateConstructorUsedError; - List get disks => throw _privateConstructorUsedError; - bool? get needRoot => throw _privateConstructorUsedError; - bool? get needBoot => throw _privateConstructorUsedError; - int? get installMinimumSize => throw _privateConstructorUsedError; +mixin _$CodecsData { + bool get install => throw _privateConstructorUsedError; Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $StorageResponseV2CopyWith get copyWith => + $CodecsDataCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class $StorageResponseV2CopyWith<$Res> { - factory $StorageResponseV2CopyWith( - StorageResponseV2 value, $Res Function(StorageResponseV2) then) = - _$StorageResponseV2CopyWithImpl<$Res, StorageResponseV2>; +abstract class $CodecsDataCopyWith<$Res> { + factory $CodecsDataCopyWith( + CodecsData value, $Res Function(CodecsData) then) = + _$CodecsDataCopyWithImpl<$Res, CodecsData>; @useResult - $Res call( - {ProbeStatus status, - ErrorReportRef? errorReport, - List disks, - bool? needRoot, - bool? needBoot, - int? installMinimumSize}); - - $ErrorReportRefCopyWith<$Res>? get errorReport; + $Res call({bool install}); } /// @nodoc -class _$StorageResponseV2CopyWithImpl<$Res, $Val extends StorageResponseV2> - implements $StorageResponseV2CopyWith<$Res> { - _$StorageResponseV2CopyWithImpl(this._value, this._then); +class _$CodecsDataCopyWithImpl<$Res, $Val extends CodecsData> + implements $CodecsDataCopyWith<$Res> { + _$CodecsDataCopyWithImpl(this._value, this._then); // ignore: unused_field final $Val _value; @@ -6088,264 +5337,133 @@ class _$StorageResponseV2CopyWithImpl<$Res, $Val extends StorageResponseV2> @pragma('vm:prefer-inline') @override $Res call({ - Object? status = null, - Object? errorReport = freezed, - Object? disks = null, - Object? needRoot = freezed, - Object? needBoot = freezed, - Object? installMinimumSize = freezed, + Object? install = null, }) { return _then(_value.copyWith( - status: null == status - ? _value.status - : status // ignore: cast_nullable_to_non_nullable - as ProbeStatus, - errorReport: freezed == errorReport - ? _value.errorReport - : errorReport // ignore: cast_nullable_to_non_nullable - as ErrorReportRef?, - disks: null == disks - ? _value.disks - : disks // ignore: cast_nullable_to_non_nullable - as List, - needRoot: freezed == needRoot - ? _value.needRoot - : needRoot // ignore: cast_nullable_to_non_nullable - as bool?, - needBoot: freezed == needBoot - ? _value.needBoot - : needBoot // ignore: cast_nullable_to_non_nullable - as bool?, - installMinimumSize: freezed == installMinimumSize - ? _value.installMinimumSize - : installMinimumSize // ignore: cast_nullable_to_non_nullable - as int?, + install: null == install + ? _value.install + : install // ignore: cast_nullable_to_non_nullable + as bool, ) as $Val); } - - @override - @pragma('vm:prefer-inline') - $ErrorReportRefCopyWith<$Res>? get errorReport { - if (_value.errorReport == null) { - return null; - } - - return $ErrorReportRefCopyWith<$Res>(_value.errorReport!, (value) { - return _then(_value.copyWith(errorReport: value) as $Val); - }); - } } /// @nodoc -abstract class _$$StorageResponseV2ImplCopyWith<$Res> - implements $StorageResponseV2CopyWith<$Res> { - factory _$$StorageResponseV2ImplCopyWith(_$StorageResponseV2Impl value, - $Res Function(_$StorageResponseV2Impl) then) = - __$$StorageResponseV2ImplCopyWithImpl<$Res>; +abstract class _$$CodecsDataImplCopyWith<$Res> + implements $CodecsDataCopyWith<$Res> { + factory _$$CodecsDataImplCopyWith( + _$CodecsDataImpl value, $Res Function(_$CodecsDataImpl) then) = + __$$CodecsDataImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {ProbeStatus status, - ErrorReportRef? errorReport, - List disks, - bool? needRoot, - bool? needBoot, - int? installMinimumSize}); - - @override - $ErrorReportRefCopyWith<$Res>? get errorReport; + $Res call({bool install}); } /// @nodoc -class __$$StorageResponseV2ImplCopyWithImpl<$Res> - extends _$StorageResponseV2CopyWithImpl<$Res, _$StorageResponseV2Impl> - implements _$$StorageResponseV2ImplCopyWith<$Res> { - __$$StorageResponseV2ImplCopyWithImpl(_$StorageResponseV2Impl _value, - $Res Function(_$StorageResponseV2Impl) _then) +class __$$CodecsDataImplCopyWithImpl<$Res> + extends _$CodecsDataCopyWithImpl<$Res, _$CodecsDataImpl> + implements _$$CodecsDataImplCopyWith<$Res> { + __$$CodecsDataImplCopyWithImpl( + _$CodecsDataImpl _value, $Res Function(_$CodecsDataImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? status = null, - Object? errorReport = freezed, - Object? disks = null, - Object? needRoot = freezed, - Object? needBoot = freezed, - Object? installMinimumSize = freezed, + Object? install = null, }) { - return _then(_$StorageResponseV2Impl( - status: null == status - ? _value.status - : status // ignore: cast_nullable_to_non_nullable - as ProbeStatus, - errorReport: freezed == errorReport - ? _value.errorReport - : errorReport // ignore: cast_nullable_to_non_nullable - as ErrorReportRef?, - disks: null == disks - ? _value._disks - : disks // ignore: cast_nullable_to_non_nullable - as List, - needRoot: freezed == needRoot - ? _value.needRoot - : needRoot // ignore: cast_nullable_to_non_nullable - as bool?, - needBoot: freezed == needBoot - ? _value.needBoot - : needBoot // ignore: cast_nullable_to_non_nullable - as bool?, - installMinimumSize: freezed == installMinimumSize - ? _value.installMinimumSize - : installMinimumSize // ignore: cast_nullable_to_non_nullable - as int?, + return _then(_$CodecsDataImpl( + install: null == install + ? _value.install + : install // ignore: cast_nullable_to_non_nullable + as bool, )); } } /// @nodoc @JsonSerializable() -class _$StorageResponseV2Impl implements _StorageResponseV2 { - const _$StorageResponseV2Impl( - {required this.status, - this.errorReport, - final List disks = const [], - this.needRoot, - this.needBoot, - this.installMinimumSize}) - : _disks = disks; - - factory _$StorageResponseV2Impl.fromJson(Map json) => - _$$StorageResponseV2ImplFromJson(json); +class _$CodecsDataImpl implements _CodecsData { + const _$CodecsDataImpl({required this.install}); - @override - final ProbeStatus status; - @override - final ErrorReportRef? errorReport; - final List _disks; - @override - @JsonKey() - List get disks { - if (_disks is EqualUnmodifiableListView) return _disks; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_disks); - } + factory _$CodecsDataImpl.fromJson(Map json) => + _$$CodecsDataImplFromJson(json); @override - final bool? needRoot; - @override - final bool? needBoot; - @override - final int? installMinimumSize; + final bool install; @override String toString() { - return 'StorageResponseV2(status: $status, errorReport: $errorReport, disks: $disks, needRoot: $needRoot, needBoot: $needBoot, installMinimumSize: $installMinimumSize)'; + return 'CodecsData(install: $install)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$StorageResponseV2Impl && - (identical(other.status, status) || other.status == status) && - (identical(other.errorReport, errorReport) || - other.errorReport == errorReport) && - const DeepCollectionEquality().equals(other._disks, _disks) && - (identical(other.needRoot, needRoot) || - other.needRoot == needRoot) && - (identical(other.needBoot, needBoot) || - other.needBoot == needBoot) && - (identical(other.installMinimumSize, installMinimumSize) || - other.installMinimumSize == installMinimumSize)); + other is _$CodecsDataImpl && + (identical(other.install, install) || other.install == install)); } @JsonKey(ignore: true) @override - int get hashCode => Object.hash( - runtimeType, - status, - errorReport, - const DeepCollectionEquality().hash(_disks), - needRoot, - needBoot, - installMinimumSize); + int get hashCode => Object.hash(runtimeType, install); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$StorageResponseV2ImplCopyWith<_$StorageResponseV2Impl> get copyWith => - __$$StorageResponseV2ImplCopyWithImpl<_$StorageResponseV2Impl>( - this, _$identity); + _$$CodecsDataImplCopyWith<_$CodecsDataImpl> get copyWith => + __$$CodecsDataImplCopyWithImpl<_$CodecsDataImpl>(this, _$identity); @override Map toJson() { - return _$$StorageResponseV2ImplToJson( + return _$$CodecsDataImplToJson( this, ); } } -abstract class _StorageResponseV2 implements StorageResponseV2 { - const factory _StorageResponseV2( - {required final ProbeStatus status, - final ErrorReportRef? errorReport, - final List disks, - final bool? needRoot, - final bool? needBoot, - final int? installMinimumSize}) = _$StorageResponseV2Impl; +abstract class _CodecsData implements CodecsData { + const factory _CodecsData({required final bool install}) = _$CodecsDataImpl; - factory _StorageResponseV2.fromJson(Map json) = - _$StorageResponseV2Impl.fromJson; + factory _CodecsData.fromJson(Map json) = + _$CodecsDataImpl.fromJson; @override - ProbeStatus get status; - @override - ErrorReportRef? get errorReport; - @override - List get disks; - @override - bool? get needRoot; - @override - bool? get needBoot; - @override - int? get installMinimumSize; + bool get install; @override @JsonKey(ignore: true) - _$$StorageResponseV2ImplCopyWith<_$StorageResponseV2Impl> get copyWith => + _$$CodecsDataImplCopyWith<_$CodecsDataImpl> get copyWith => throw _privateConstructorUsedError; } -GuidedResizeValues _$GuidedResizeValuesFromJson(Map json) { - return _GuidedResizeValues.fromJson(json); +DriversPayload _$DriversPayloadFromJson(Map json) { + return _DriversPayload.fromJson(json); } /// @nodoc -mixin _$GuidedResizeValues { - int get installMax => throw _privateConstructorUsedError; - int get minimum => throw _privateConstructorUsedError; - int get recommended => throw _privateConstructorUsedError; - int get maximum => throw _privateConstructorUsedError; +mixin _$DriversPayload { + bool get install => throw _privateConstructorUsedError; Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $GuidedResizeValuesCopyWith get copyWith => + $DriversPayloadCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class $GuidedResizeValuesCopyWith<$Res> { - factory $GuidedResizeValuesCopyWith( - GuidedResizeValues value, $Res Function(GuidedResizeValues) then) = - _$GuidedResizeValuesCopyWithImpl<$Res, GuidedResizeValues>; +abstract class $DriversPayloadCopyWith<$Res> { + factory $DriversPayloadCopyWith( + DriversPayload value, $Res Function(DriversPayload) then) = + _$DriversPayloadCopyWithImpl<$Res, DriversPayload>; @useResult - $Res call({int installMax, int minimum, int recommended, int maximum}); + $Res call({bool install}); } /// @nodoc -class _$GuidedResizeValuesCopyWithImpl<$Res, $Val extends GuidedResizeValues> - implements $GuidedResizeValuesCopyWith<$Res> { - _$GuidedResizeValuesCopyWithImpl(this._value, this._then); +class _$DriversPayloadCopyWithImpl<$Res, $Val extends DriversPayload> + implements $DriversPayloadCopyWith<$Res> { + _$DriversPayloadCopyWithImpl(this._value, this._then); // ignore: unused_field final $Val _value; @@ -6355,304 +5473,137 @@ class _$GuidedResizeValuesCopyWithImpl<$Res, $Val extends GuidedResizeValues> @pragma('vm:prefer-inline') @override $Res call({ - Object? installMax = null, - Object? minimum = null, - Object? recommended = null, - Object? maximum = null, + Object? install = null, }) { return _then(_value.copyWith( - installMax: null == installMax - ? _value.installMax - : installMax // ignore: cast_nullable_to_non_nullable - as int, - minimum: null == minimum - ? _value.minimum - : minimum // ignore: cast_nullable_to_non_nullable - as int, - recommended: null == recommended - ? _value.recommended - : recommended // ignore: cast_nullable_to_non_nullable - as int, - maximum: null == maximum - ? _value.maximum - : maximum // ignore: cast_nullable_to_non_nullable - as int, + install: null == install + ? _value.install + : install // ignore: cast_nullable_to_non_nullable + as bool, ) as $Val); } } /// @nodoc -abstract class _$$GuidedResizeValuesImplCopyWith<$Res> - implements $GuidedResizeValuesCopyWith<$Res> { - factory _$$GuidedResizeValuesImplCopyWith(_$GuidedResizeValuesImpl value, - $Res Function(_$GuidedResizeValuesImpl) then) = - __$$GuidedResizeValuesImplCopyWithImpl<$Res>; +abstract class _$$DriversPayloadImplCopyWith<$Res> + implements $DriversPayloadCopyWith<$Res> { + factory _$$DriversPayloadImplCopyWith(_$DriversPayloadImpl value, + $Res Function(_$DriversPayloadImpl) then) = + __$$DriversPayloadImplCopyWithImpl<$Res>; @override @useResult - $Res call({int installMax, int minimum, int recommended, int maximum}); + $Res call({bool install}); } /// @nodoc -class __$$GuidedResizeValuesImplCopyWithImpl<$Res> - extends _$GuidedResizeValuesCopyWithImpl<$Res, _$GuidedResizeValuesImpl> - implements _$$GuidedResizeValuesImplCopyWith<$Res> { - __$$GuidedResizeValuesImplCopyWithImpl(_$GuidedResizeValuesImpl _value, - $Res Function(_$GuidedResizeValuesImpl) _then) +class __$$DriversPayloadImplCopyWithImpl<$Res> + extends _$DriversPayloadCopyWithImpl<$Res, _$DriversPayloadImpl> + implements _$$DriversPayloadImplCopyWith<$Res> { + __$$DriversPayloadImplCopyWithImpl( + _$DriversPayloadImpl _value, $Res Function(_$DriversPayloadImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? installMax = null, - Object? minimum = null, - Object? recommended = null, - Object? maximum = null, + Object? install = null, }) { - return _then(_$GuidedResizeValuesImpl( - installMax: null == installMax - ? _value.installMax - : installMax // ignore: cast_nullable_to_non_nullable - as int, - minimum: null == minimum - ? _value.minimum - : minimum // ignore: cast_nullable_to_non_nullable - as int, - recommended: null == recommended - ? _value.recommended - : recommended // ignore: cast_nullable_to_non_nullable - as int, - maximum: null == maximum - ? _value.maximum - : maximum // ignore: cast_nullable_to_non_nullable - as int, + return _then(_$DriversPayloadImpl( + install: null == install + ? _value.install + : install // ignore: cast_nullable_to_non_nullable + as bool, )); } } /// @nodoc @JsonSerializable() -class _$GuidedResizeValuesImpl implements _GuidedResizeValues { - const _$GuidedResizeValuesImpl( - {required this.installMax, - required this.minimum, - required this.recommended, - required this.maximum}); +class _$DriversPayloadImpl implements _DriversPayload { + const _$DriversPayloadImpl({required this.install}); - factory _$GuidedResizeValuesImpl.fromJson(Map json) => - _$$GuidedResizeValuesImplFromJson(json); + factory _$DriversPayloadImpl.fromJson(Map json) => + _$$DriversPayloadImplFromJson(json); @override - final int installMax; - @override - final int minimum; - @override - final int recommended; - @override - final int maximum; + final bool install; @override String toString() { - return 'GuidedResizeValues(installMax: $installMax, minimum: $minimum, recommended: $recommended, maximum: $maximum)'; + return 'DriversPayload(install: $install)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$GuidedResizeValuesImpl && - (identical(other.installMax, installMax) || - other.installMax == installMax) && - (identical(other.minimum, minimum) || other.minimum == minimum) && - (identical(other.recommended, recommended) || - other.recommended == recommended) && - (identical(other.maximum, maximum) || other.maximum == maximum)); + other is _$DriversPayloadImpl && + (identical(other.install, install) || other.install == install)); } @JsonKey(ignore: true) @override - int get hashCode => - Object.hash(runtimeType, installMax, minimum, recommended, maximum); + int get hashCode => Object.hash(runtimeType, install); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$GuidedResizeValuesImplCopyWith<_$GuidedResizeValuesImpl> get copyWith => - __$$GuidedResizeValuesImplCopyWithImpl<_$GuidedResizeValuesImpl>( + _$$DriversPayloadImplCopyWith<_$DriversPayloadImpl> get copyWith => + __$$DriversPayloadImplCopyWithImpl<_$DriversPayloadImpl>( this, _$identity); @override Map toJson() { - return _$$GuidedResizeValuesImplToJson( + return _$$DriversPayloadImplToJson( this, ); } } -abstract class _GuidedResizeValues implements GuidedResizeValues { - const factory _GuidedResizeValues( - {required final int installMax, - required final int minimum, - required final int recommended, - required final int maximum}) = _$GuidedResizeValuesImpl; +abstract class _DriversPayload implements DriversPayload { + const factory _DriversPayload({required final bool install}) = + _$DriversPayloadImpl; - factory _GuidedResizeValues.fromJson(Map json) = - _$GuidedResizeValuesImpl.fromJson; + factory _DriversPayload.fromJson(Map json) = + _$DriversPayloadImpl.fromJson; @override - int get installMax; - @override - int get minimum; - @override - int get recommended; - @override - int get maximum; + bool get install; @override @JsonKey(ignore: true) - _$$GuidedResizeValuesImplCopyWith<_$GuidedResizeValuesImpl> get copyWith => + _$$DriversPayloadImplCopyWith<_$DriversPayloadImpl> get copyWith => throw _privateConstructorUsedError; } -GuidedStorageTarget _$GuidedStorageTargetFromJson(Map json) { - switch (json['\$type']) { - case 'GuidedStorageTargetReformat': - return GuidedStorageTargetReformat.fromJson(json); - case 'GuidedStorageTargetResize': - return GuidedStorageTargetResize.fromJson(json); - case 'GuidedStorageTargetUseGap': - return GuidedStorageTargetUseGap.fromJson(json); - case 'GuidedStorageTargetManual': - return GuidedStorageTargetManual.fromJson(json); - - default: - throw CheckedFromJsonException(json, '\$type', 'GuidedStorageTarget', - 'Invalid union type "${json['\$type']}"!'); - } +SnapSelection _$SnapSelectionFromJson(Map json) { + return _SnapSelection.fromJson(json); } /// @nodoc -mixin _$GuidedStorageTarget { - List get allowed => throw _privateConstructorUsedError; - List get disallowed => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult when({ - required TResult Function(String diskId, List allowed, - List disallowed) - reformat, - required TResult Function( - String diskId, - int partitionNumber, - int newSize, - int? minimum, - int? recommended, - int? maximum, - List allowed, - List disallowed) - resize, - required TResult Function( - String diskId, - Gap gap, - List allowed, - List disallowed) - useGap, - required TResult Function(List allowed, - List disallowed) - manual, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(String diskId, List allowed, - List disallowed)? - reformat, - TResult? Function( - String diskId, - int partitionNumber, - int newSize, - int? minimum, - int? recommended, - int? maximum, - List allowed, - List disallowed)? - resize, - TResult? Function(String diskId, Gap gap, List allowed, - List disallowed)? - useGap, - TResult? Function(List allowed, - List disallowed)? - manual, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(String diskId, List allowed, - List disallowed)? - reformat, - TResult Function( - String diskId, - int partitionNumber, - int newSize, - int? minimum, - int? recommended, - int? maximum, - List allowed, - List disallowed)? - resize, - TResult Function(String diskId, Gap gap, List allowed, - List disallowed)? - useGap, - TResult Function(List allowed, - List disallowed)? - manual, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(GuidedStorageTargetReformat value) reformat, - required TResult Function(GuidedStorageTargetResize value) resize, - required TResult Function(GuidedStorageTargetUseGap value) useGap, - required TResult Function(GuidedStorageTargetManual value) manual, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(GuidedStorageTargetReformat value)? reformat, - TResult? Function(GuidedStorageTargetResize value)? resize, - TResult? Function(GuidedStorageTargetUseGap value)? useGap, - TResult? Function(GuidedStorageTargetManual value)? manual, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(GuidedStorageTargetReformat value)? reformat, - TResult Function(GuidedStorageTargetResize value)? resize, - TResult Function(GuidedStorageTargetUseGap value)? useGap, - TResult Function(GuidedStorageTargetManual value)? manual, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; +mixin _$SnapSelection { + String get name => throw _privateConstructorUsedError; + String get channel => throw _privateConstructorUsedError; + bool get classic => throw _privateConstructorUsedError; + Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $GuidedStorageTargetCopyWith get copyWith => + $SnapSelectionCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class $GuidedStorageTargetCopyWith<$Res> { - factory $GuidedStorageTargetCopyWith( - GuidedStorageTarget value, $Res Function(GuidedStorageTarget) then) = - _$GuidedStorageTargetCopyWithImpl<$Res, GuidedStorageTarget>; +abstract class $SnapSelectionCopyWith<$Res> { + factory $SnapSelectionCopyWith( + SnapSelection value, $Res Function(SnapSelection) then) = + _$SnapSelectionCopyWithImpl<$Res, SnapSelection>; @useResult - $Res call( - {List allowed, - List disallowed}); + $Res call({String name, String channel, bool classic}); } /// @nodoc -class _$GuidedStorageTargetCopyWithImpl<$Res, $Val extends GuidedStorageTarget> - implements $GuidedStorageTargetCopyWith<$Res> { - _$GuidedStorageTargetCopyWithImpl(this._value, this._then); +class _$SnapSelectionCopyWithImpl<$Res, $Val extends SnapSelection> + implements $SnapSelectionCopyWith<$Res> { + _$SnapSelectionCopyWithImpl(this._value, this._then); // ignore: unused_field final $Val _value; @@ -6662,1196 +5613,663 @@ class _$GuidedStorageTargetCopyWithImpl<$Res, $Val extends GuidedStorageTarget> @pragma('vm:prefer-inline') @override $Res call({ - Object? allowed = null, - Object? disallowed = null, + Object? name = null, + Object? channel = null, + Object? classic = null, }) { return _then(_value.copyWith( - allowed: null == allowed - ? _value.allowed - : allowed // ignore: cast_nullable_to_non_nullable - as List, - disallowed: null == disallowed - ? _value.disallowed - : disallowed // ignore: cast_nullable_to_non_nullable - as List, + name: null == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String, + channel: null == channel + ? _value.channel + : channel // ignore: cast_nullable_to_non_nullable + as String, + classic: null == classic + ? _value.classic + : classic // ignore: cast_nullable_to_non_nullable + as bool, ) as $Val); } } /// @nodoc -abstract class _$$GuidedStorageTargetReformatImplCopyWith<$Res> - implements $GuidedStorageTargetCopyWith<$Res> { - factory _$$GuidedStorageTargetReformatImplCopyWith( - _$GuidedStorageTargetReformatImpl value, - $Res Function(_$GuidedStorageTargetReformatImpl) then) = - __$$GuidedStorageTargetReformatImplCopyWithImpl<$Res>; +abstract class _$$SnapSelectionImplCopyWith<$Res> + implements $SnapSelectionCopyWith<$Res> { + factory _$$SnapSelectionImplCopyWith( + _$SnapSelectionImpl value, $Res Function(_$SnapSelectionImpl) then) = + __$$SnapSelectionImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {String diskId, - List allowed, - List disallowed}); + $Res call({String name, String channel, bool classic}); } /// @nodoc -class __$$GuidedStorageTargetReformatImplCopyWithImpl<$Res> - extends _$GuidedStorageTargetCopyWithImpl<$Res, - _$GuidedStorageTargetReformatImpl> - implements _$$GuidedStorageTargetReformatImplCopyWith<$Res> { - __$$GuidedStorageTargetReformatImplCopyWithImpl( - _$GuidedStorageTargetReformatImpl _value, - $Res Function(_$GuidedStorageTargetReformatImpl) _then) +class __$$SnapSelectionImplCopyWithImpl<$Res> + extends _$SnapSelectionCopyWithImpl<$Res, _$SnapSelectionImpl> + implements _$$SnapSelectionImplCopyWith<$Res> { + __$$SnapSelectionImplCopyWithImpl( + _$SnapSelectionImpl _value, $Res Function(_$SnapSelectionImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? diskId = null, - Object? allowed = null, - Object? disallowed = null, + Object? name = null, + Object? channel = null, + Object? classic = null, }) { - return _then(_$GuidedStorageTargetReformatImpl( - diskId: null == diskId - ? _value.diskId - : diskId // ignore: cast_nullable_to_non_nullable + return _then(_$SnapSelectionImpl( + name: null == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable as String, - allowed: null == allowed - ? _value._allowed - : allowed // ignore: cast_nullable_to_non_nullable - as List, - disallowed: null == disallowed - ? _value._disallowed - : disallowed // ignore: cast_nullable_to_non_nullable - as List, + channel: null == channel + ? _value.channel + : channel // ignore: cast_nullable_to_non_nullable + as String, + classic: null == classic + ? _value.classic + : classic // ignore: cast_nullable_to_non_nullable + as bool, )); } } /// @nodoc @JsonSerializable() -class _$GuidedStorageTargetReformatImpl implements GuidedStorageTargetReformat { - const _$GuidedStorageTargetReformatImpl( - {required this.diskId, - final List allowed = const [], - final List disallowed = const [], - final String? $type}) - : _allowed = allowed, - _disallowed = disallowed, - $type = $type ?? 'GuidedStorageTargetReformat'; +class _$SnapSelectionImpl implements _SnapSelection { + const _$SnapSelectionImpl( + {required this.name, required this.channel, this.classic = false}); - factory _$GuidedStorageTargetReformatImpl.fromJson( - Map json) => - _$$GuidedStorageTargetReformatImplFromJson(json); + factory _$SnapSelectionImpl.fromJson(Map json) => + _$$SnapSelectionImplFromJson(json); @override - final String diskId; - final List _allowed; + final String name; @override - @JsonKey() - List get allowed { - if (_allowed is EqualUnmodifiableListView) return _allowed; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_allowed); - } - - final List _disallowed; + final String channel; @override @JsonKey() - List get disallowed { - if (_disallowed is EqualUnmodifiableListView) return _disallowed; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_disallowed); - } - - @JsonKey(name: '\$type') - final String $type; + final bool classic; @override String toString() { - return 'GuidedStorageTarget.reformat(diskId: $diskId, allowed: $allowed, disallowed: $disallowed)'; + return 'SnapSelection(name: $name, channel: $channel, classic: $classic)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$GuidedStorageTargetReformatImpl && - (identical(other.diskId, diskId) || other.diskId == diskId) && - const DeepCollectionEquality().equals(other._allowed, _allowed) && - const DeepCollectionEquality() - .equals(other._disallowed, _disallowed)); + other is _$SnapSelectionImpl && + (identical(other.name, name) || other.name == name) && + (identical(other.channel, channel) || other.channel == channel) && + (identical(other.classic, classic) || other.classic == classic)); } @JsonKey(ignore: true) @override - int get hashCode => Object.hash( - runtimeType, - diskId, - const DeepCollectionEquality().hash(_allowed), - const DeepCollectionEquality().hash(_disallowed)); + int get hashCode => Object.hash(runtimeType, name, channel, classic); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$GuidedStorageTargetReformatImplCopyWith<_$GuidedStorageTargetReformatImpl> - get copyWith => __$$GuidedStorageTargetReformatImplCopyWithImpl< - _$GuidedStorageTargetReformatImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(String diskId, List allowed, - List disallowed) - reformat, - required TResult Function( - String diskId, - int partitionNumber, - int newSize, - int? minimum, - int? recommended, - int? maximum, - List allowed, - List disallowed) - resize, - required TResult Function( - String diskId, - Gap gap, - List allowed, - List disallowed) - useGap, - required TResult Function(List allowed, - List disallowed) - manual, - }) { - return reformat(diskId, allowed, disallowed); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(String diskId, List allowed, - List disallowed)? - reformat, - TResult? Function( - String diskId, - int partitionNumber, - int newSize, - int? minimum, - int? recommended, - int? maximum, - List allowed, - List disallowed)? - resize, - TResult? Function(String diskId, Gap gap, List allowed, - List disallowed)? - useGap, - TResult? Function(List allowed, - List disallowed)? - manual, - }) { - return reformat?.call(diskId, allowed, disallowed); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(String diskId, List allowed, - List disallowed)? - reformat, - TResult Function( - String diskId, - int partitionNumber, - int newSize, - int? minimum, - int? recommended, - int? maximum, - List allowed, - List disallowed)? - resize, - TResult Function(String diskId, Gap gap, List allowed, - List disallowed)? - useGap, - TResult Function(List allowed, - List disallowed)? - manual, - required TResult orElse(), - }) { - if (reformat != null) { - return reformat(diskId, allowed, disallowed); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(GuidedStorageTargetReformat value) reformat, - required TResult Function(GuidedStorageTargetResize value) resize, - required TResult Function(GuidedStorageTargetUseGap value) useGap, - required TResult Function(GuidedStorageTargetManual value) manual, - }) { - return reformat(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(GuidedStorageTargetReformat value)? reformat, - TResult? Function(GuidedStorageTargetResize value)? resize, - TResult? Function(GuidedStorageTargetUseGap value)? useGap, - TResult? Function(GuidedStorageTargetManual value)? manual, - }) { - return reformat?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(GuidedStorageTargetReformat value)? reformat, - TResult Function(GuidedStorageTargetResize value)? resize, - TResult Function(GuidedStorageTargetUseGap value)? useGap, - TResult Function(GuidedStorageTargetManual value)? manual, - required TResult orElse(), - }) { - if (reformat != null) { - return reformat(this); - } - return orElse(); - } + _$$SnapSelectionImplCopyWith<_$SnapSelectionImpl> get copyWith => + __$$SnapSelectionImplCopyWithImpl<_$SnapSelectionImpl>(this, _$identity); @override Map toJson() { - return _$$GuidedStorageTargetReformatImplToJson( + return _$$SnapSelectionImplToJson( this, ); } } -abstract class GuidedStorageTargetReformat implements GuidedStorageTarget { - const factory GuidedStorageTargetReformat( - {required final String diskId, - final List allowed, - final List disallowed}) = - _$GuidedStorageTargetReformatImpl; +abstract class _SnapSelection implements SnapSelection { + const factory _SnapSelection( + {required final String name, + required final String channel, + final bool classic}) = _$SnapSelectionImpl; - factory GuidedStorageTargetReformat.fromJson(Map json) = - _$GuidedStorageTargetReformatImpl.fromJson; + factory _SnapSelection.fromJson(Map json) = + _$SnapSelectionImpl.fromJson; - String get diskId; @override - List get allowed; + String get name; @override - List get disallowed; + String get channel; + @override + bool get classic; @override @JsonKey(ignore: true) - _$$GuidedStorageTargetReformatImplCopyWith<_$GuidedStorageTargetReformatImpl> - get copyWith => throw _privateConstructorUsedError; + _$$SnapSelectionImplCopyWith<_$SnapSelectionImpl> get copyWith => + throw _privateConstructorUsedError; +} + +SnapListResponse _$SnapListResponseFromJson(Map json) { + return _SnapListResponse.fromJson(json); } /// @nodoc -abstract class _$$GuidedStorageTargetResizeImplCopyWith<$Res> - implements $GuidedStorageTargetCopyWith<$Res> { - factory _$$GuidedStorageTargetResizeImplCopyWith( - _$GuidedStorageTargetResizeImpl value, - $Res Function(_$GuidedStorageTargetResizeImpl) then) = - __$$GuidedStorageTargetResizeImplCopyWithImpl<$Res>; +mixin _$SnapListResponse { + SnapCheckState get status => throw _privateConstructorUsedError; + List get snaps => throw _privateConstructorUsedError; + List get selections => throw _privateConstructorUsedError; + + Map toJson() => throw _privateConstructorUsedError; + @JsonKey(ignore: true) + $SnapListResponseCopyWith get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $SnapListResponseCopyWith<$Res> { + factory $SnapListResponseCopyWith( + SnapListResponse value, $Res Function(SnapListResponse) then) = + _$SnapListResponseCopyWithImpl<$Res, SnapListResponse>; + @useResult + $Res call( + {SnapCheckState status, + List snaps, + List selections}); +} + +/// @nodoc +class _$SnapListResponseCopyWithImpl<$Res, $Val extends SnapListResponse> + implements $SnapListResponseCopyWith<$Res> { + _$SnapListResponseCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? status = null, + Object? snaps = null, + Object? selections = null, + }) { + return _then(_value.copyWith( + status: null == status + ? _value.status + : status // ignore: cast_nullable_to_non_nullable + as SnapCheckState, + snaps: null == snaps + ? _value.snaps + : snaps // ignore: cast_nullable_to_non_nullable + as List, + selections: null == selections + ? _value.selections + : selections // ignore: cast_nullable_to_non_nullable + as List, + ) as $Val); + } +} + +/// @nodoc +abstract class _$$SnapListResponseImplCopyWith<$Res> + implements $SnapListResponseCopyWith<$Res> { + factory _$$SnapListResponseImplCopyWith(_$SnapListResponseImpl value, + $Res Function(_$SnapListResponseImpl) then) = + __$$SnapListResponseImplCopyWithImpl<$Res>; @override @useResult $Res call( - {String diskId, - int partitionNumber, - int newSize, - int? minimum, - int? recommended, - int? maximum, - List allowed, - List disallowed}); + {SnapCheckState status, + List snaps, + List selections}); } /// @nodoc -class __$$GuidedStorageTargetResizeImplCopyWithImpl<$Res> - extends _$GuidedStorageTargetCopyWithImpl<$Res, - _$GuidedStorageTargetResizeImpl> - implements _$$GuidedStorageTargetResizeImplCopyWith<$Res> { - __$$GuidedStorageTargetResizeImplCopyWithImpl( - _$GuidedStorageTargetResizeImpl _value, - $Res Function(_$GuidedStorageTargetResizeImpl) _then) +class __$$SnapListResponseImplCopyWithImpl<$Res> + extends _$SnapListResponseCopyWithImpl<$Res, _$SnapListResponseImpl> + implements _$$SnapListResponseImplCopyWith<$Res> { + __$$SnapListResponseImplCopyWithImpl(_$SnapListResponseImpl _value, + $Res Function(_$SnapListResponseImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? diskId = null, - Object? partitionNumber = null, - Object? newSize = null, - Object? minimum = freezed, - Object? recommended = freezed, - Object? maximum = freezed, - Object? allowed = null, - Object? disallowed = null, + Object? status = null, + Object? snaps = null, + Object? selections = null, }) { - return _then(_$GuidedStorageTargetResizeImpl( - diskId: null == diskId - ? _value.diskId - : diskId // ignore: cast_nullable_to_non_nullable - as String, - partitionNumber: null == partitionNumber - ? _value.partitionNumber - : partitionNumber // ignore: cast_nullable_to_non_nullable - as int, - newSize: null == newSize - ? _value.newSize - : newSize // ignore: cast_nullable_to_non_nullable - as int, - minimum: freezed == minimum - ? _value.minimum - : minimum // ignore: cast_nullable_to_non_nullable - as int?, - recommended: freezed == recommended - ? _value.recommended - : recommended // ignore: cast_nullable_to_non_nullable - as int?, - maximum: freezed == maximum - ? _value.maximum - : maximum // ignore: cast_nullable_to_non_nullable - as int?, - allowed: null == allowed - ? _value._allowed - : allowed // ignore: cast_nullable_to_non_nullable - as List, - disallowed: null == disallowed - ? _value._disallowed - : disallowed // ignore: cast_nullable_to_non_nullable - as List, + return _then(_$SnapListResponseImpl( + status: null == status + ? _value.status + : status // ignore: cast_nullable_to_non_nullable + as SnapCheckState, + snaps: null == snaps + ? _value._snaps + : snaps // ignore: cast_nullable_to_non_nullable + as List, + selections: null == selections + ? _value._selections + : selections // ignore: cast_nullable_to_non_nullable + as List, )); } } /// @nodoc @JsonSerializable() -class _$GuidedStorageTargetResizeImpl implements GuidedStorageTargetResize { - const _$GuidedStorageTargetResizeImpl( - {required this.diskId, - required this.partitionNumber, - required this.newSize, - required this.minimum, - required this.recommended, - required this.maximum, - final List allowed = const [], - final List disallowed = const [], - final String? $type}) - : _allowed = allowed, - _disallowed = disallowed, - $type = $type ?? 'GuidedStorageTargetResize'; +class _$SnapListResponseImpl implements _SnapListResponse { + const _$SnapListResponseImpl( + {required this.status, + final List snaps = const [], + final List selections = const []}) + : _snaps = snaps, + _selections = selections; - factory _$GuidedStorageTargetResizeImpl.fromJson(Map json) => - _$$GuidedStorageTargetResizeImplFromJson(json); + factory _$SnapListResponseImpl.fromJson(Map json) => + _$$SnapListResponseImplFromJson(json); @override - final String diskId; - @override - final int partitionNumber; - @override - final int newSize; - @override - final int? minimum; - @override - final int? recommended; - @override - final int? maximum; - final List _allowed; + final SnapCheckState status; + final List _snaps; @override @JsonKey() - List get allowed { - if (_allowed is EqualUnmodifiableListView) return _allowed; + List get snaps { + if (_snaps is EqualUnmodifiableListView) return _snaps; // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_allowed); + return EqualUnmodifiableListView(_snaps); } - final List _disallowed; + final List _selections; @override @JsonKey() - List get disallowed { - if (_disallowed is EqualUnmodifiableListView) return _disallowed; + List get selections { + if (_selections is EqualUnmodifiableListView) return _selections; // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_disallowed); + return EqualUnmodifiableListView(_selections); } - @JsonKey(name: '\$type') - final String $type; - @override String toString() { - return 'GuidedStorageTarget.resize(diskId: $diskId, partitionNumber: $partitionNumber, newSize: $newSize, minimum: $minimum, recommended: $recommended, maximum: $maximum, allowed: $allowed, disallowed: $disallowed)'; + return 'SnapListResponse(status: $status, snaps: $snaps, selections: $selections)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$GuidedStorageTargetResizeImpl && - (identical(other.diskId, diskId) || other.diskId == diskId) && - (identical(other.partitionNumber, partitionNumber) || - other.partitionNumber == partitionNumber) && - (identical(other.newSize, newSize) || other.newSize == newSize) && - (identical(other.minimum, minimum) || other.minimum == minimum) && - (identical(other.recommended, recommended) || - other.recommended == recommended) && - (identical(other.maximum, maximum) || other.maximum == maximum) && - const DeepCollectionEquality().equals(other._allowed, _allowed) && + other is _$SnapListResponseImpl && + (identical(other.status, status) || other.status == status) && + const DeepCollectionEquality().equals(other._snaps, _snaps) && const DeepCollectionEquality() - .equals(other._disallowed, _disallowed)); + .equals(other._selections, _selections)); } @JsonKey(ignore: true) @override int get hashCode => Object.hash( runtimeType, - diskId, - partitionNumber, - newSize, - minimum, - recommended, - maximum, - const DeepCollectionEquality().hash(_allowed), - const DeepCollectionEquality().hash(_disallowed)); + status, + const DeepCollectionEquality().hash(_snaps), + const DeepCollectionEquality().hash(_selections)); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$GuidedStorageTargetResizeImplCopyWith<_$GuidedStorageTargetResizeImpl> - get copyWith => __$$GuidedStorageTargetResizeImplCopyWithImpl< - _$GuidedStorageTargetResizeImpl>(this, _$identity); + _$$SnapListResponseImplCopyWith<_$SnapListResponseImpl> get copyWith => + __$$SnapListResponseImplCopyWithImpl<_$SnapListResponseImpl>( + this, _$identity); @override - @optionalTypeArgs - TResult when({ - required TResult Function(String diskId, List allowed, - List disallowed) - reformat, - required TResult Function( - String diskId, - int partitionNumber, - int newSize, - int? minimum, - int? recommended, - int? maximum, - List allowed, - List disallowed) - resize, - required TResult Function( - String diskId, - Gap gap, - List allowed, - List disallowed) - useGap, - required TResult Function(List allowed, - List disallowed) - manual, - }) { - return resize(diskId, partitionNumber, newSize, minimum, recommended, - maximum, allowed, disallowed); + Map toJson() { + return _$$SnapListResponseImplToJson( + this, + ); } +} - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(String diskId, List allowed, - List disallowed)? - reformat, - TResult? Function( - String diskId, - int partitionNumber, - int newSize, - int? minimum, - int? recommended, - int? maximum, - List allowed, - List disallowed)? - resize, - TResult? Function(String diskId, Gap gap, List allowed, - List disallowed)? - useGap, - TResult? Function(List allowed, - List disallowed)? - manual, - }) { - return resize?.call(diskId, partitionNumber, newSize, minimum, recommended, - maximum, allowed, disallowed); - } +abstract class _SnapListResponse implements SnapListResponse { + const factory _SnapListResponse( + {required final SnapCheckState status, + final List snaps, + final List selections}) = _$SnapListResponseImpl; - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(String diskId, List allowed, - List disallowed)? - reformat, - TResult Function( - String diskId, - int partitionNumber, - int newSize, - int? minimum, - int? recommended, - int? maximum, - List allowed, - List disallowed)? - resize, - TResult Function(String diskId, Gap gap, List allowed, - List disallowed)? - useGap, - TResult Function(List allowed, - List disallowed)? - manual, - required TResult orElse(), - }) { - if (resize != null) { - return resize(diskId, partitionNumber, newSize, minimum, recommended, - maximum, allowed, disallowed); - } - return orElse(); - } + factory _SnapListResponse.fromJson(Map json) = + _$SnapListResponseImpl.fromJson; @override - @optionalTypeArgs - TResult map({ - required TResult Function(GuidedStorageTargetReformat value) reformat, - required TResult Function(GuidedStorageTargetResize value) resize, - required TResult Function(GuidedStorageTargetUseGap value) useGap, - required TResult Function(GuidedStorageTargetManual value) manual, - }) { - return resize(this); - } - + SnapCheckState get status; @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(GuidedStorageTargetReformat value)? reformat, - TResult? Function(GuidedStorageTargetResize value)? resize, - TResult? Function(GuidedStorageTargetUseGap value)? useGap, - TResult? Function(GuidedStorageTargetManual value)? manual, - }) { - return resize?.call(this); - } - + List get snaps; @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(GuidedStorageTargetReformat value)? reformat, - TResult Function(GuidedStorageTargetResize value)? resize, - TResult Function(GuidedStorageTargetUseGap value)? useGap, - TResult Function(GuidedStorageTargetManual value)? manual, - required TResult orElse(), - }) { - if (resize != null) { - return resize(this); - } - return orElse(); - } - + List get selections; @override - Map toJson() { - return _$$GuidedStorageTargetResizeImplToJson( - this, - ); - } + @JsonKey(ignore: true) + _$$SnapListResponseImplCopyWith<_$SnapListResponseImpl> get copyWith => + throw _privateConstructorUsedError; } -abstract class GuidedStorageTargetResize implements GuidedStorageTarget { - const factory GuidedStorageTargetResize( - {required final String diskId, - required final int partitionNumber, - required final int newSize, - required final int? minimum, - required final int? recommended, - required final int? maximum, - final List allowed, - final List disallowed}) = - _$GuidedStorageTargetResizeImpl; +TimeZoneInfo _$TimeZoneInfoFromJson(Map json) { + return _TimeZoneInfo.fromJson(json); +} - factory GuidedStorageTargetResize.fromJson(Map json) = - _$GuidedStorageTargetResizeImpl.fromJson; +/// @nodoc +mixin _$TimeZoneInfo { + String get timezone => throw _privateConstructorUsedError; + bool get fromGeoip => throw _privateConstructorUsedError; - String get diskId; - int get partitionNumber; - int get newSize; - int? get minimum; - int? get recommended; - int? get maximum; - @override - List get allowed; - @override - List get disallowed; - @override + Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) - _$$GuidedStorageTargetResizeImplCopyWith<_$GuidedStorageTargetResizeImpl> - get copyWith => throw _privateConstructorUsedError; + $TimeZoneInfoCopyWith get copyWith => + throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$GuidedStorageTargetUseGapImplCopyWith<$Res> - implements $GuidedStorageTargetCopyWith<$Res> { - factory _$$GuidedStorageTargetUseGapImplCopyWith( - _$GuidedStorageTargetUseGapImpl value, - $Res Function(_$GuidedStorageTargetUseGapImpl) then) = - __$$GuidedStorageTargetUseGapImplCopyWithImpl<$Res>; +abstract class $TimeZoneInfoCopyWith<$Res> { + factory $TimeZoneInfoCopyWith( + TimeZoneInfo value, $Res Function(TimeZoneInfo) then) = + _$TimeZoneInfoCopyWithImpl<$Res, TimeZoneInfo>; + @useResult + $Res call({String timezone, bool fromGeoip}); +} + +/// @nodoc +class _$TimeZoneInfoCopyWithImpl<$Res, $Val extends TimeZoneInfo> + implements $TimeZoneInfoCopyWith<$Res> { + _$TimeZoneInfoCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? timezone = null, + Object? fromGeoip = null, + }) { + return _then(_value.copyWith( + timezone: null == timezone + ? _value.timezone + : timezone // ignore: cast_nullable_to_non_nullable + as String, + fromGeoip: null == fromGeoip + ? _value.fromGeoip + : fromGeoip // ignore: cast_nullable_to_non_nullable + as bool, + ) as $Val); + } +} + +/// @nodoc +abstract class _$$TimeZoneInfoImplCopyWith<$Res> + implements $TimeZoneInfoCopyWith<$Res> { + factory _$$TimeZoneInfoImplCopyWith( + _$TimeZoneInfoImpl value, $Res Function(_$TimeZoneInfoImpl) then) = + __$$TimeZoneInfoImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {String diskId, - Gap gap, - List allowed, - List disallowed}); + $Res call({String timezone, bool fromGeoip}); } /// @nodoc -class __$$GuidedStorageTargetUseGapImplCopyWithImpl<$Res> - extends _$GuidedStorageTargetCopyWithImpl<$Res, - _$GuidedStorageTargetUseGapImpl> - implements _$$GuidedStorageTargetUseGapImplCopyWith<$Res> { - __$$GuidedStorageTargetUseGapImplCopyWithImpl( - _$GuidedStorageTargetUseGapImpl _value, - $Res Function(_$GuidedStorageTargetUseGapImpl) _then) +class __$$TimeZoneInfoImplCopyWithImpl<$Res> + extends _$TimeZoneInfoCopyWithImpl<$Res, _$TimeZoneInfoImpl> + implements _$$TimeZoneInfoImplCopyWith<$Res> { + __$$TimeZoneInfoImplCopyWithImpl( + _$TimeZoneInfoImpl _value, $Res Function(_$TimeZoneInfoImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? diskId = null, - Object? gap = freezed, - Object? allowed = null, - Object? disallowed = null, + Object? timezone = null, + Object? fromGeoip = null, }) { - return _then(_$GuidedStorageTargetUseGapImpl( - diskId: null == diskId - ? _value.diskId - : diskId // ignore: cast_nullable_to_non_nullable + return _then(_$TimeZoneInfoImpl( + timezone: null == timezone + ? _value.timezone + : timezone // ignore: cast_nullable_to_non_nullable as String, - gap: freezed == gap - ? _value.gap - : gap // ignore: cast_nullable_to_non_nullable - as Gap, - allowed: null == allowed - ? _value._allowed - : allowed // ignore: cast_nullable_to_non_nullable - as List, - disallowed: null == disallowed - ? _value._disallowed - : disallowed // ignore: cast_nullable_to_non_nullable - as List, + fromGeoip: null == fromGeoip + ? _value.fromGeoip + : fromGeoip // ignore: cast_nullable_to_non_nullable + as bool, )); } } /// @nodoc @JsonSerializable() -class _$GuidedStorageTargetUseGapImpl implements GuidedStorageTargetUseGap { - const _$GuidedStorageTargetUseGapImpl( - {required this.diskId, - required this.gap, - final List allowed = const [], - final List disallowed = const [], - final String? $type}) - : _allowed = allowed, - _disallowed = disallowed, - $type = $type ?? 'GuidedStorageTargetUseGap'; +class _$TimeZoneInfoImpl implements _TimeZoneInfo { + const _$TimeZoneInfoImpl({required this.timezone, required this.fromGeoip}); - factory _$GuidedStorageTargetUseGapImpl.fromJson(Map json) => - _$$GuidedStorageTargetUseGapImplFromJson(json); + factory _$TimeZoneInfoImpl.fromJson(Map json) => + _$$TimeZoneInfoImplFromJson(json); @override - final String diskId; - @override - final Gap gap; - final List _allowed; - @override - @JsonKey() - List get allowed { - if (_allowed is EqualUnmodifiableListView) return _allowed; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_allowed); - } - - final List _disallowed; + final String timezone; @override - @JsonKey() - List get disallowed { - if (_disallowed is EqualUnmodifiableListView) return _disallowed; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_disallowed); - } - - @JsonKey(name: '\$type') - final String $type; + final bool fromGeoip; @override String toString() { - return 'GuidedStorageTarget.useGap(diskId: $diskId, gap: $gap, allowed: $allowed, disallowed: $disallowed)'; + return 'TimeZoneInfo(timezone: $timezone, fromGeoip: $fromGeoip)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$GuidedStorageTargetUseGapImpl && - (identical(other.diskId, diskId) || other.diskId == diskId) && - const DeepCollectionEquality().equals(other.gap, gap) && - const DeepCollectionEquality().equals(other._allowed, _allowed) && - const DeepCollectionEquality() - .equals(other._disallowed, _disallowed)); + other is _$TimeZoneInfoImpl && + (identical(other.timezone, timezone) || + other.timezone == timezone) && + (identical(other.fromGeoip, fromGeoip) || + other.fromGeoip == fromGeoip)); } @JsonKey(ignore: true) @override - int get hashCode => Object.hash( - runtimeType, - diskId, - const DeepCollectionEquality().hash(gap), - const DeepCollectionEquality().hash(_allowed), - const DeepCollectionEquality().hash(_disallowed)); + int get hashCode => Object.hash(runtimeType, timezone, fromGeoip); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$GuidedStorageTargetUseGapImplCopyWith<_$GuidedStorageTargetUseGapImpl> - get copyWith => __$$GuidedStorageTargetUseGapImplCopyWithImpl< - _$GuidedStorageTargetUseGapImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(String diskId, List allowed, - List disallowed) - reformat, - required TResult Function( - String diskId, - int partitionNumber, - int newSize, - int? minimum, - int? recommended, - int? maximum, - List allowed, - List disallowed) - resize, - required TResult Function( - String diskId, - Gap gap, - List allowed, - List disallowed) - useGap, - required TResult Function(List allowed, - List disallowed) - manual, - }) { - return useGap(diskId, gap, allowed, disallowed); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(String diskId, List allowed, - List disallowed)? - reformat, - TResult? Function( - String diskId, - int partitionNumber, - int newSize, - int? minimum, - int? recommended, - int? maximum, - List allowed, - List disallowed)? - resize, - TResult? Function(String diskId, Gap gap, List allowed, - List disallowed)? - useGap, - TResult? Function(List allowed, - List disallowed)? - manual, - }) { - return useGap?.call(diskId, gap, allowed, disallowed); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(String diskId, List allowed, - List disallowed)? - reformat, - TResult Function( - String diskId, - int partitionNumber, - int newSize, - int? minimum, - int? recommended, - int? maximum, - List allowed, - List disallowed)? - resize, - TResult Function(String diskId, Gap gap, List allowed, - List disallowed)? - useGap, - TResult Function(List allowed, - List disallowed)? - manual, - required TResult orElse(), - }) { - if (useGap != null) { - return useGap(diskId, gap, allowed, disallowed); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(GuidedStorageTargetReformat value) reformat, - required TResult Function(GuidedStorageTargetResize value) resize, - required TResult Function(GuidedStorageTargetUseGap value) useGap, - required TResult Function(GuidedStorageTargetManual value) manual, - }) { - return useGap(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(GuidedStorageTargetReformat value)? reformat, - TResult? Function(GuidedStorageTargetResize value)? resize, - TResult? Function(GuidedStorageTargetUseGap value)? useGap, - TResult? Function(GuidedStorageTargetManual value)? manual, - }) { - return useGap?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(GuidedStorageTargetReformat value)? reformat, - TResult Function(GuidedStorageTargetResize value)? resize, - TResult Function(GuidedStorageTargetUseGap value)? useGap, - TResult Function(GuidedStorageTargetManual value)? manual, - required TResult orElse(), - }) { - if (useGap != null) { - return useGap(this); - } - return orElse(); - } + _$$TimeZoneInfoImplCopyWith<_$TimeZoneInfoImpl> get copyWith => + __$$TimeZoneInfoImplCopyWithImpl<_$TimeZoneInfoImpl>(this, _$identity); @override Map toJson() { - return _$$GuidedStorageTargetUseGapImplToJson( + return _$$TimeZoneInfoImplToJson( this, ); } } -abstract class GuidedStorageTargetUseGap implements GuidedStorageTarget { - const factory GuidedStorageTargetUseGap( - {required final String diskId, - required final Gap gap, - final List allowed, - final List disallowed}) = - _$GuidedStorageTargetUseGapImpl; +abstract class _TimeZoneInfo implements TimeZoneInfo { + const factory _TimeZoneInfo( + {required final String timezone, + required final bool fromGeoip}) = _$TimeZoneInfoImpl; - factory GuidedStorageTargetUseGap.fromJson(Map json) = - _$GuidedStorageTargetUseGapImpl.fromJson; + factory _TimeZoneInfo.fromJson(Map json) = + _$TimeZoneInfoImpl.fromJson; - String get diskId; - Gap get gap; @override - List get allowed; + String get timezone; @override - List get disallowed; + bool get fromGeoip; @override @JsonKey(ignore: true) - _$$GuidedStorageTargetUseGapImplCopyWith<_$GuidedStorageTargetUseGapImpl> - get copyWith => throw _privateConstructorUsedError; + _$$TimeZoneInfoImplCopyWith<_$TimeZoneInfoImpl> get copyWith => + throw _privateConstructorUsedError; +} + +UbuntuProInfo _$UbuntuProInfoFromJson(Map json) { + return _UbuntuProInfo.fromJson(json); } /// @nodoc -abstract class _$$GuidedStorageTargetManualImplCopyWith<$Res> - implements $GuidedStorageTargetCopyWith<$Res> { - factory _$$GuidedStorageTargetManualImplCopyWith( - _$GuidedStorageTargetManualImpl value, - $Res Function(_$GuidedStorageTargetManualImpl) then) = - __$$GuidedStorageTargetManualImplCopyWithImpl<$Res>; - @override +mixin _$UbuntuProInfo { + String get token => throw _privateConstructorUsedError; + + Map toJson() => throw _privateConstructorUsedError; + @JsonKey(ignore: true) + $UbuntuProInfoCopyWith get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $UbuntuProInfoCopyWith<$Res> { + factory $UbuntuProInfoCopyWith( + UbuntuProInfo value, $Res Function(UbuntuProInfo) then) = + _$UbuntuProInfoCopyWithImpl<$Res, UbuntuProInfo>; @useResult - $Res call( - {List allowed, - List disallowed}); + $Res call({String token}); } /// @nodoc -class __$$GuidedStorageTargetManualImplCopyWithImpl<$Res> - extends _$GuidedStorageTargetCopyWithImpl<$Res, - _$GuidedStorageTargetManualImpl> - implements _$$GuidedStorageTargetManualImplCopyWith<$Res> { - __$$GuidedStorageTargetManualImplCopyWithImpl( - _$GuidedStorageTargetManualImpl _value, - $Res Function(_$GuidedStorageTargetManualImpl) _then) - : super(_value, _then); +class _$UbuntuProInfoCopyWithImpl<$Res, $Val extends UbuntuProInfo> + implements $UbuntuProInfoCopyWith<$Res> { + _$UbuntuProInfoCopyWithImpl(this._value, this._then); - @pragma('vm:prefer-inline') - @override + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; + + @pragma('vm:prefer-inline') + @override $Res call({ - Object? allowed = null, - Object? disallowed = null, + Object? token = null, }) { - return _then(_$GuidedStorageTargetManualImpl( - allowed: null == allowed - ? _value._allowed - : allowed // ignore: cast_nullable_to_non_nullable - as List, - disallowed: null == disallowed - ? _value._disallowed - : disallowed // ignore: cast_nullable_to_non_nullable - as List, - )); + return _then(_value.copyWith( + token: null == token + ? _value.token + : token // ignore: cast_nullable_to_non_nullable + as String, + ) as $Val); } } /// @nodoc -@JsonSerializable() -class _$GuidedStorageTargetManualImpl implements GuidedStorageTargetManual { - const _$GuidedStorageTargetManualImpl( - {required final List allowed, - final List disallowed = const [], - final String? $type}) - : _allowed = allowed, - _disallowed = disallowed, - $type = $type ?? 'GuidedStorageTargetManual'; +abstract class _$$UbuntuProInfoImplCopyWith<$Res> + implements $UbuntuProInfoCopyWith<$Res> { + factory _$$UbuntuProInfoImplCopyWith( + _$UbuntuProInfoImpl value, $Res Function(_$UbuntuProInfoImpl) then) = + __$$UbuntuProInfoImplCopyWithImpl<$Res>; + @override + @useResult + $Res call({String token}); +} - factory _$GuidedStorageTargetManualImpl.fromJson(Map json) => - _$$GuidedStorageTargetManualImplFromJson(json); +/// @nodoc +class __$$UbuntuProInfoImplCopyWithImpl<$Res> + extends _$UbuntuProInfoCopyWithImpl<$Res, _$UbuntuProInfoImpl> + implements _$$UbuntuProInfoImplCopyWith<$Res> { + __$$UbuntuProInfoImplCopyWithImpl( + _$UbuntuProInfoImpl _value, $Res Function(_$UbuntuProInfoImpl) _then) + : super(_value, _then); - final List _allowed; + @pragma('vm:prefer-inline') @override - List get allowed { - if (_allowed is EqualUnmodifiableListView) return _allowed; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_allowed); + $Res call({ + Object? token = null, + }) { + return _then(_$UbuntuProInfoImpl( + token: null == token + ? _value.token + : token // ignore: cast_nullable_to_non_nullable + as String, + )); } +} - final List _disallowed; - @override - @JsonKey() - List get disallowed { - if (_disallowed is EqualUnmodifiableListView) return _disallowed; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_disallowed); - } +/// @nodoc +@JsonSerializable() +class _$UbuntuProInfoImpl implements _UbuntuProInfo { + const _$UbuntuProInfoImpl({required this.token}); - @JsonKey(name: '\$type') - final String $type; + factory _$UbuntuProInfoImpl.fromJson(Map json) => + _$$UbuntuProInfoImplFromJson(json); + + @override + final String token; @override String toString() { - return 'GuidedStorageTarget.manual(allowed: $allowed, disallowed: $disallowed)'; + return 'UbuntuProInfo(token: $token)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$GuidedStorageTargetManualImpl && - const DeepCollectionEquality().equals(other._allowed, _allowed) && - const DeepCollectionEquality() - .equals(other._disallowed, _disallowed)); + other is _$UbuntuProInfoImpl && + (identical(other.token, token) || other.token == token)); } @JsonKey(ignore: true) @override - int get hashCode => Object.hash( - runtimeType, - const DeepCollectionEquality().hash(_allowed), - const DeepCollectionEquality().hash(_disallowed)); + int get hashCode => Object.hash(runtimeType, token); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$GuidedStorageTargetManualImplCopyWith<_$GuidedStorageTargetManualImpl> - get copyWith => __$$GuidedStorageTargetManualImplCopyWithImpl< - _$GuidedStorageTargetManualImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(String diskId, List allowed, - List disallowed) - reformat, - required TResult Function( - String diskId, - int partitionNumber, - int newSize, - int? minimum, - int? recommended, - int? maximum, - List allowed, - List disallowed) - resize, - required TResult Function( - String diskId, - Gap gap, - List allowed, - List disallowed) - useGap, - required TResult Function(List allowed, - List disallowed) - manual, - }) { - return manual(allowed, disallowed); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(String diskId, List allowed, - List disallowed)? - reformat, - TResult? Function( - String diskId, - int partitionNumber, - int newSize, - int? minimum, - int? recommended, - int? maximum, - List allowed, - List disallowed)? - resize, - TResult? Function(String diskId, Gap gap, List allowed, - List disallowed)? - useGap, - TResult? Function(List allowed, - List disallowed)? - manual, - }) { - return manual?.call(allowed, disallowed); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(String diskId, List allowed, - List disallowed)? - reformat, - TResult Function( - String diskId, - int partitionNumber, - int newSize, - int? minimum, - int? recommended, - int? maximum, - List allowed, - List disallowed)? - resize, - TResult Function(String diskId, Gap gap, List allowed, - List disallowed)? - useGap, - TResult Function(List allowed, - List disallowed)? - manual, - required TResult orElse(), - }) { - if (manual != null) { - return manual(allowed, disallowed); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(GuidedStorageTargetReformat value) reformat, - required TResult Function(GuidedStorageTargetResize value) resize, - required TResult Function(GuidedStorageTargetUseGap value) useGap, - required TResult Function(GuidedStorageTargetManual value) manual, - }) { - return manual(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(GuidedStorageTargetReformat value)? reformat, - TResult? Function(GuidedStorageTargetResize value)? resize, - TResult? Function(GuidedStorageTargetUseGap value)? useGap, - TResult? Function(GuidedStorageTargetManual value)? manual, - }) { - return manual?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(GuidedStorageTargetReformat value)? reformat, - TResult Function(GuidedStorageTargetResize value)? resize, - TResult Function(GuidedStorageTargetUseGap value)? useGap, - TResult Function(GuidedStorageTargetManual value)? manual, - required TResult orElse(), - }) { - if (manual != null) { - return manual(this); - } - return orElse(); - } + _$$UbuntuProInfoImplCopyWith<_$UbuntuProInfoImpl> get copyWith => + __$$UbuntuProInfoImplCopyWithImpl<_$UbuntuProInfoImpl>(this, _$identity); @override Map toJson() { - return _$$GuidedStorageTargetManualImplToJson( + return _$$UbuntuProInfoImplToJson( this, ); } } -abstract class GuidedStorageTargetManual implements GuidedStorageTarget { - const factory GuidedStorageTargetManual( - {required final List allowed, - final List disallowed}) = - _$GuidedStorageTargetManualImpl; +abstract class _UbuntuProInfo implements UbuntuProInfo { + const factory _UbuntuProInfo({required final String token}) = + _$UbuntuProInfoImpl; - factory GuidedStorageTargetManual.fromJson(Map json) = - _$GuidedStorageTargetManualImpl.fromJson; + factory _UbuntuProInfo.fromJson(Map json) = + _$UbuntuProInfoImpl.fromJson; @override - List get allowed; - @override - List get disallowed; + String get token; @override @JsonKey(ignore: true) - _$$GuidedStorageTargetManualImplCopyWith<_$GuidedStorageTargetManualImpl> - get copyWith => throw _privateConstructorUsedError; + _$$UbuntuProInfoImplCopyWith<_$UbuntuProInfoImpl> get copyWith => + throw _privateConstructorUsedError; } -RecoveryKey _$RecoveryKeyFromJson(Map json) { - return _RecoveryKey.fromJson(json); +UbuntuProResponse _$UbuntuProResponseFromJson(Map json) { + return _UbuntuProResponse.fromJson(json); } /// @nodoc -mixin _$RecoveryKey { - String? get liveLocation => throw _privateConstructorUsedError; - String? get backupLocation => throw _privateConstructorUsedError; +mixin _$UbuntuProResponse { + String get token => throw _privateConstructorUsedError; + bool get hasNetwork => throw _privateConstructorUsedError; Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $RecoveryKeyCopyWith get copyWith => + $UbuntuProResponseCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class $RecoveryKeyCopyWith<$Res> { - factory $RecoveryKeyCopyWith( - RecoveryKey value, $Res Function(RecoveryKey) then) = - _$RecoveryKeyCopyWithImpl<$Res, RecoveryKey>; +abstract class $UbuntuProResponseCopyWith<$Res> { + factory $UbuntuProResponseCopyWith( + UbuntuProResponse value, $Res Function(UbuntuProResponse) then) = + _$UbuntuProResponseCopyWithImpl<$Res, UbuntuProResponse>; @useResult - $Res call({String? liveLocation, String? backupLocation}); + $Res call({String token, bool hasNetwork}); } /// @nodoc -class _$RecoveryKeyCopyWithImpl<$Res, $Val extends RecoveryKey> - implements $RecoveryKeyCopyWith<$Res> { - _$RecoveryKeyCopyWithImpl(this._value, this._then); +class _$UbuntuProResponseCopyWithImpl<$Res, $Val extends UbuntuProResponse> + implements $UbuntuProResponseCopyWith<$Res> { + _$UbuntuProResponseCopyWithImpl(this._value, this._then); // ignore: unused_field final $Val _value; @@ -7861,170 +6279,156 @@ class _$RecoveryKeyCopyWithImpl<$Res, $Val extends RecoveryKey> @pragma('vm:prefer-inline') @override $Res call({ - Object? liveLocation = freezed, - Object? backupLocation = freezed, + Object? token = null, + Object? hasNetwork = null, }) { return _then(_value.copyWith( - liveLocation: freezed == liveLocation - ? _value.liveLocation - : liveLocation // ignore: cast_nullable_to_non_nullable - as String?, - backupLocation: freezed == backupLocation - ? _value.backupLocation - : backupLocation // ignore: cast_nullable_to_non_nullable - as String?, + token: null == token + ? _value.token + : token // ignore: cast_nullable_to_non_nullable + as String, + hasNetwork: null == hasNetwork + ? _value.hasNetwork + : hasNetwork // ignore: cast_nullable_to_non_nullable + as bool, ) as $Val); } } /// @nodoc -abstract class _$$RecoveryKeyImplCopyWith<$Res> - implements $RecoveryKeyCopyWith<$Res> { - factory _$$RecoveryKeyImplCopyWith( - _$RecoveryKeyImpl value, $Res Function(_$RecoveryKeyImpl) then) = - __$$RecoveryKeyImplCopyWithImpl<$Res>; +abstract class _$$UbuntuProResponseImplCopyWith<$Res> + implements $UbuntuProResponseCopyWith<$Res> { + factory _$$UbuntuProResponseImplCopyWith(_$UbuntuProResponseImpl value, + $Res Function(_$UbuntuProResponseImpl) then) = + __$$UbuntuProResponseImplCopyWithImpl<$Res>; @override @useResult - $Res call({String? liveLocation, String? backupLocation}); + $Res call({String token, bool hasNetwork}); } /// @nodoc -class __$$RecoveryKeyImplCopyWithImpl<$Res> - extends _$RecoveryKeyCopyWithImpl<$Res, _$RecoveryKeyImpl> - implements _$$RecoveryKeyImplCopyWith<$Res> { - __$$RecoveryKeyImplCopyWithImpl( - _$RecoveryKeyImpl _value, $Res Function(_$RecoveryKeyImpl) _then) +class __$$UbuntuProResponseImplCopyWithImpl<$Res> + extends _$UbuntuProResponseCopyWithImpl<$Res, _$UbuntuProResponseImpl> + implements _$$UbuntuProResponseImplCopyWith<$Res> { + __$$UbuntuProResponseImplCopyWithImpl(_$UbuntuProResponseImpl _value, + $Res Function(_$UbuntuProResponseImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? liveLocation = freezed, - Object? backupLocation = freezed, + Object? token = null, + Object? hasNetwork = null, }) { - return _then(_$RecoveryKeyImpl( - liveLocation: freezed == liveLocation - ? _value.liveLocation - : liveLocation // ignore: cast_nullable_to_non_nullable - as String?, - backupLocation: freezed == backupLocation - ? _value.backupLocation - : backupLocation // ignore: cast_nullable_to_non_nullable - as String?, + return _then(_$UbuntuProResponseImpl( + token: null == token + ? _value.token + : token // ignore: cast_nullable_to_non_nullable + as String, + hasNetwork: null == hasNetwork + ? _value.hasNetwork + : hasNetwork // ignore: cast_nullable_to_non_nullable + as bool, )); } } /// @nodoc @JsonSerializable() -class _$RecoveryKeyImpl implements _RecoveryKey { - const _$RecoveryKeyImpl({this.liveLocation, this.backupLocation}); +class _$UbuntuProResponseImpl implements _UbuntuProResponse { + const _$UbuntuProResponseImpl( + {required this.token, required this.hasNetwork}); - factory _$RecoveryKeyImpl.fromJson(Map json) => - _$$RecoveryKeyImplFromJson(json); + factory _$UbuntuProResponseImpl.fromJson(Map json) => + _$$UbuntuProResponseImplFromJson(json); @override - final String? liveLocation; + final String token; @override - final String? backupLocation; + final bool hasNetwork; @override String toString() { - return 'RecoveryKey(liveLocation: $liveLocation, backupLocation: $backupLocation)'; + return 'UbuntuProResponse(token: $token, hasNetwork: $hasNetwork)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$RecoveryKeyImpl && - (identical(other.liveLocation, liveLocation) || - other.liveLocation == liveLocation) && - (identical(other.backupLocation, backupLocation) || - other.backupLocation == backupLocation)); + other is _$UbuntuProResponseImpl && + (identical(other.token, token) || other.token == token) && + (identical(other.hasNetwork, hasNetwork) || + other.hasNetwork == hasNetwork)); } @JsonKey(ignore: true) @override - int get hashCode => Object.hash(runtimeType, liveLocation, backupLocation); + int get hashCode => Object.hash(runtimeType, token, hasNetwork); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$RecoveryKeyImplCopyWith<_$RecoveryKeyImpl> get copyWith => - __$$RecoveryKeyImplCopyWithImpl<_$RecoveryKeyImpl>(this, _$identity); + _$$UbuntuProResponseImplCopyWith<_$UbuntuProResponseImpl> get copyWith => + __$$UbuntuProResponseImplCopyWithImpl<_$UbuntuProResponseImpl>( + this, _$identity); @override Map toJson() { - return _$$RecoveryKeyImplToJson( + return _$$UbuntuProResponseImplToJson( this, ); } } -abstract class _RecoveryKey implements RecoveryKey { - const factory _RecoveryKey( - {final String? liveLocation, - final String? backupLocation}) = _$RecoveryKeyImpl; +abstract class _UbuntuProResponse implements UbuntuProResponse { + const factory _UbuntuProResponse( + {required final String token, + required final bool hasNetwork}) = _$UbuntuProResponseImpl; - factory _RecoveryKey.fromJson(Map json) = - _$RecoveryKeyImpl.fromJson; + factory _UbuntuProResponse.fromJson(Map json) = + _$UbuntuProResponseImpl.fromJson; @override - String? get liveLocation; + String get token; @override - String? get backupLocation; + bool get hasNetwork; @override @JsonKey(ignore: true) - _$$RecoveryKeyImplCopyWith<_$RecoveryKeyImpl> get copyWith => + _$$UbuntuProResponseImplCopyWith<_$UbuntuProResponseImpl> get copyWith => throw _privateConstructorUsedError; } -GuidedChoiceV2 _$GuidedChoiceV2FromJson(Map json) { - return _GuidedChoiceV2.fromJson(json); +UbuntuProGeneralInfo _$UbuntuProGeneralInfoFromJson(Map json) { + return _UbuntuProGeneralInfo.fromJson(json); } /// @nodoc -mixin _$GuidedChoiceV2 { - GuidedStorageTarget get target => throw _privateConstructorUsedError; - GuidedCapability get capability => throw _privateConstructorUsedError; - String? get password => throw _privateConstructorUsedError; - RecoveryKey? get recoveryKey => - throw _privateConstructorUsedError; // TODO(Lukas): Change `generator.py` to accommodate for putting the -// SizingPolicy parameter together with the other required parameters. - SizingPolicy? get sizingPolicy => throw _privateConstructorUsedError; - bool get resetPartition => throw _privateConstructorUsedError; - int? get resetPartitionSize => throw _privateConstructorUsedError; +mixin _$UbuntuProGeneralInfo { + int? get eolEsmYear => throw _privateConstructorUsedError; + int get universePackages => throw _privateConstructorUsedError; + int get mainPackages => throw _privateConstructorUsedError; Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $GuidedChoiceV2CopyWith get copyWith => + $UbuntuProGeneralInfoCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class $GuidedChoiceV2CopyWith<$Res> { - factory $GuidedChoiceV2CopyWith( - GuidedChoiceV2 value, $Res Function(GuidedChoiceV2) then) = - _$GuidedChoiceV2CopyWithImpl<$Res, GuidedChoiceV2>; +abstract class $UbuntuProGeneralInfoCopyWith<$Res> { + factory $UbuntuProGeneralInfoCopyWith(UbuntuProGeneralInfo value, + $Res Function(UbuntuProGeneralInfo) then) = + _$UbuntuProGeneralInfoCopyWithImpl<$Res, UbuntuProGeneralInfo>; @useResult - $Res call( - {GuidedStorageTarget target, - GuidedCapability capability, - String? password, - RecoveryKey? recoveryKey, - SizingPolicy? sizingPolicy, - bool resetPartition, - int? resetPartitionSize}); - - $GuidedStorageTargetCopyWith<$Res> get target; - $RecoveryKeyCopyWith<$Res>? get recoveryKey; + $Res call({int? eolEsmYear, int universePackages, int mainPackages}); } /// @nodoc -class _$GuidedChoiceV2CopyWithImpl<$Res, $Val extends GuidedChoiceV2> - implements $GuidedChoiceV2CopyWith<$Res> { - _$GuidedChoiceV2CopyWithImpl(this._value, this._then); +class _$UbuntuProGeneralInfoCopyWithImpl<$Res, + $Val extends UbuntuProGeneralInfo> + implements $UbuntuProGeneralInfoCopyWith<$Res> { + _$UbuntuProGeneralInfoCopyWithImpl(this._value, this._then); // ignore: unused_field final $Val _value; @@ -8034,293 +6438,177 @@ class _$GuidedChoiceV2CopyWithImpl<$Res, $Val extends GuidedChoiceV2> @pragma('vm:prefer-inline') @override $Res call({ - Object? target = null, - Object? capability = null, - Object? password = freezed, - Object? recoveryKey = freezed, - Object? sizingPolicy = freezed, - Object? resetPartition = null, - Object? resetPartitionSize = freezed, + Object? eolEsmYear = freezed, + Object? universePackages = null, + Object? mainPackages = null, }) { return _then(_value.copyWith( - target: null == target - ? _value.target - : target // ignore: cast_nullable_to_non_nullable - as GuidedStorageTarget, - capability: null == capability - ? _value.capability - : capability // ignore: cast_nullable_to_non_nullable - as GuidedCapability, - password: freezed == password - ? _value.password - : password // ignore: cast_nullable_to_non_nullable - as String?, - recoveryKey: freezed == recoveryKey - ? _value.recoveryKey - : recoveryKey // ignore: cast_nullable_to_non_nullable - as RecoveryKey?, - sizingPolicy: freezed == sizingPolicy - ? _value.sizingPolicy - : sizingPolicy // ignore: cast_nullable_to_non_nullable - as SizingPolicy?, - resetPartition: null == resetPartition - ? _value.resetPartition - : resetPartition // ignore: cast_nullable_to_non_nullable - as bool, - resetPartitionSize: freezed == resetPartitionSize - ? _value.resetPartitionSize - : resetPartitionSize // ignore: cast_nullable_to_non_nullable + eolEsmYear: freezed == eolEsmYear + ? _value.eolEsmYear + : eolEsmYear // ignore: cast_nullable_to_non_nullable as int?, + universePackages: null == universePackages + ? _value.universePackages + : universePackages // ignore: cast_nullable_to_non_nullable + as int, + mainPackages: null == mainPackages + ? _value.mainPackages + : mainPackages // ignore: cast_nullable_to_non_nullable + as int, ) as $Val); } +} +/// @nodoc +abstract class _$$UbuntuProGeneralInfoImplCopyWith<$Res> + implements $UbuntuProGeneralInfoCopyWith<$Res> { + factory _$$UbuntuProGeneralInfoImplCopyWith(_$UbuntuProGeneralInfoImpl value, + $Res Function(_$UbuntuProGeneralInfoImpl) then) = + __$$UbuntuProGeneralInfoImplCopyWithImpl<$Res>; @override - @pragma('vm:prefer-inline') - $GuidedStorageTargetCopyWith<$Res> get target { - return $GuidedStorageTargetCopyWith<$Res>(_value.target, (value) { - return _then(_value.copyWith(target: value) as $Val); - }); - } - - @override - @pragma('vm:prefer-inline') - $RecoveryKeyCopyWith<$Res>? get recoveryKey { - if (_value.recoveryKey == null) { - return null; - } - - return $RecoveryKeyCopyWith<$Res>(_value.recoveryKey!, (value) { - return _then(_value.copyWith(recoveryKey: value) as $Val); - }); - } + @useResult + $Res call({int? eolEsmYear, int universePackages, int mainPackages}); } /// @nodoc -abstract class _$$GuidedChoiceV2ImplCopyWith<$Res> - implements $GuidedChoiceV2CopyWith<$Res> { - factory _$$GuidedChoiceV2ImplCopyWith(_$GuidedChoiceV2Impl value, - $Res Function(_$GuidedChoiceV2Impl) then) = - __$$GuidedChoiceV2ImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {GuidedStorageTarget target, - GuidedCapability capability, - String? password, - RecoveryKey? recoveryKey, - SizingPolicy? sizingPolicy, - bool resetPartition, - int? resetPartitionSize}); - - @override - $GuidedStorageTargetCopyWith<$Res> get target; - @override - $RecoveryKeyCopyWith<$Res>? get recoveryKey; -} - -/// @nodoc -class __$$GuidedChoiceV2ImplCopyWithImpl<$Res> - extends _$GuidedChoiceV2CopyWithImpl<$Res, _$GuidedChoiceV2Impl> - implements _$$GuidedChoiceV2ImplCopyWith<$Res> { - __$$GuidedChoiceV2ImplCopyWithImpl( - _$GuidedChoiceV2Impl _value, $Res Function(_$GuidedChoiceV2Impl) _then) +class __$$UbuntuProGeneralInfoImplCopyWithImpl<$Res> + extends _$UbuntuProGeneralInfoCopyWithImpl<$Res, _$UbuntuProGeneralInfoImpl> + implements _$$UbuntuProGeneralInfoImplCopyWith<$Res> { + __$$UbuntuProGeneralInfoImplCopyWithImpl(_$UbuntuProGeneralInfoImpl _value, + $Res Function(_$UbuntuProGeneralInfoImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? target = null, - Object? capability = null, - Object? password = freezed, - Object? recoveryKey = freezed, - Object? sizingPolicy = freezed, - Object? resetPartition = null, - Object? resetPartitionSize = freezed, + Object? eolEsmYear = freezed, + Object? universePackages = null, + Object? mainPackages = null, }) { - return _then(_$GuidedChoiceV2Impl( - target: null == target - ? _value.target - : target // ignore: cast_nullable_to_non_nullable - as GuidedStorageTarget, - capability: null == capability - ? _value.capability - : capability // ignore: cast_nullable_to_non_nullable - as GuidedCapability, - password: freezed == password - ? _value.password - : password // ignore: cast_nullable_to_non_nullable - as String?, - recoveryKey: freezed == recoveryKey - ? _value.recoveryKey - : recoveryKey // ignore: cast_nullable_to_non_nullable - as RecoveryKey?, - sizingPolicy: freezed == sizingPolicy - ? _value.sizingPolicy - : sizingPolicy // ignore: cast_nullable_to_non_nullable - as SizingPolicy?, - resetPartition: null == resetPartition - ? _value.resetPartition - : resetPartition // ignore: cast_nullable_to_non_nullable - as bool, - resetPartitionSize: freezed == resetPartitionSize - ? _value.resetPartitionSize - : resetPartitionSize // ignore: cast_nullable_to_non_nullable + return _then(_$UbuntuProGeneralInfoImpl( + eolEsmYear: freezed == eolEsmYear + ? _value.eolEsmYear + : eolEsmYear // ignore: cast_nullable_to_non_nullable as int?, + universePackages: null == universePackages + ? _value.universePackages + : universePackages // ignore: cast_nullable_to_non_nullable + as int, + mainPackages: null == mainPackages + ? _value.mainPackages + : mainPackages // ignore: cast_nullable_to_non_nullable + as int, )); } } /// @nodoc @JsonSerializable() -class _$GuidedChoiceV2Impl implements _GuidedChoiceV2 { - const _$GuidedChoiceV2Impl( - {required this.target, - required this.capability, - this.password, - this.recoveryKey, - required this.sizingPolicy, - this.resetPartition = false, - this.resetPartitionSize}); +class _$UbuntuProGeneralInfoImpl implements _UbuntuProGeneralInfo { + const _$UbuntuProGeneralInfoImpl( + {required this.eolEsmYear, + required this.universePackages, + required this.mainPackages}); - factory _$GuidedChoiceV2Impl.fromJson(Map json) => - _$$GuidedChoiceV2ImplFromJson(json); + factory _$UbuntuProGeneralInfoImpl.fromJson(Map json) => + _$$UbuntuProGeneralInfoImplFromJson(json); @override - final GuidedStorageTarget target; - @override - final GuidedCapability capability; - @override - final String? password; - @override - final RecoveryKey? recoveryKey; -// TODO(Lukas): Change `generator.py` to accommodate for putting the -// SizingPolicy parameter together with the other required parameters. - @override - final SizingPolicy? sizingPolicy; + final int? eolEsmYear; @override - @JsonKey() - final bool resetPartition; + final int universePackages; @override - final int? resetPartitionSize; + final int mainPackages; @override String toString() { - return 'GuidedChoiceV2(target: $target, capability: $capability, password: $password, recoveryKey: $recoveryKey, sizingPolicy: $sizingPolicy, resetPartition: $resetPartition, resetPartitionSize: $resetPartitionSize)'; + return 'UbuntuProGeneralInfo(eolEsmYear: $eolEsmYear, universePackages: $universePackages, mainPackages: $mainPackages)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$GuidedChoiceV2Impl && - (identical(other.target, target) || other.target == target) && - (identical(other.capability, capability) || - other.capability == capability) && - (identical(other.password, password) || - other.password == password) && - (identical(other.recoveryKey, recoveryKey) || - other.recoveryKey == recoveryKey) && - (identical(other.sizingPolicy, sizingPolicy) || - other.sizingPolicy == sizingPolicy) && - (identical(other.resetPartition, resetPartition) || - other.resetPartition == resetPartition) && - (identical(other.resetPartitionSize, resetPartitionSize) || - other.resetPartitionSize == resetPartitionSize)); + other is _$UbuntuProGeneralInfoImpl && + (identical(other.eolEsmYear, eolEsmYear) || + other.eolEsmYear == eolEsmYear) && + (identical(other.universePackages, universePackages) || + other.universePackages == universePackages) && + (identical(other.mainPackages, mainPackages) || + other.mainPackages == mainPackages)); } @JsonKey(ignore: true) @override - int get hashCode => Object.hash(runtimeType, target, capability, password, - recoveryKey, sizingPolicy, resetPartition, resetPartitionSize); + int get hashCode => + Object.hash(runtimeType, eolEsmYear, universePackages, mainPackages); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$GuidedChoiceV2ImplCopyWith<_$GuidedChoiceV2Impl> get copyWith => - __$$GuidedChoiceV2ImplCopyWithImpl<_$GuidedChoiceV2Impl>( - this, _$identity); + _$$UbuntuProGeneralInfoImplCopyWith<_$UbuntuProGeneralInfoImpl> + get copyWith => + __$$UbuntuProGeneralInfoImplCopyWithImpl<_$UbuntuProGeneralInfoImpl>( + this, _$identity); @override Map toJson() { - return _$$GuidedChoiceV2ImplToJson( + return _$$UbuntuProGeneralInfoImplToJson( this, ); } } -abstract class _GuidedChoiceV2 implements GuidedChoiceV2 { - const factory _GuidedChoiceV2( - {required final GuidedStorageTarget target, - required final GuidedCapability capability, - final String? password, - final RecoveryKey? recoveryKey, - required final SizingPolicy? sizingPolicy, - final bool resetPartition, - final int? resetPartitionSize}) = _$GuidedChoiceV2Impl; +abstract class _UbuntuProGeneralInfo implements UbuntuProGeneralInfo { + const factory _UbuntuProGeneralInfo( + {required final int? eolEsmYear, + required final int universePackages, + required final int mainPackages}) = _$UbuntuProGeneralInfoImpl; - factory _GuidedChoiceV2.fromJson(Map json) = - _$GuidedChoiceV2Impl.fromJson; + factory _UbuntuProGeneralInfo.fromJson(Map json) = + _$UbuntuProGeneralInfoImpl.fromJson; @override - GuidedStorageTarget get target; - @override - GuidedCapability get capability; - @override - String? get password; - @override - RecoveryKey? get recoveryKey; - @override // TODO(Lukas): Change `generator.py` to accommodate for putting the -// SizingPolicy parameter together with the other required parameters. - SizingPolicy? get sizingPolicy; + int? get eolEsmYear; @override - bool get resetPartition; + int get universePackages; @override - int? get resetPartitionSize; + int get mainPackages; @override @JsonKey(ignore: true) - _$$GuidedChoiceV2ImplCopyWith<_$GuidedChoiceV2Impl> get copyWith => - throw _privateConstructorUsedError; + _$$UbuntuProGeneralInfoImplCopyWith<_$UbuntuProGeneralInfoImpl> + get copyWith => throw _privateConstructorUsedError; } -GuidedStorageResponseV2 _$GuidedStorageResponseV2FromJson( - Map json) { - return _GuidedStorageResponseV2.fromJson(json); +UPCSInitiateResponse _$UPCSInitiateResponseFromJson(Map json) { + return _UPCSInitiateResponse.fromJson(json); } /// @nodoc -mixin _$GuidedStorageResponseV2 { - ProbeStatus get status => throw _privateConstructorUsedError; - ErrorReportRef? get errorReport => throw _privateConstructorUsedError; - GuidedChoiceV2? get configured => throw _privateConstructorUsedError; - List get targets => throw _privateConstructorUsedError; +mixin _$UPCSInitiateResponse { + String get userCode => throw _privateConstructorUsedError; + int get validitySeconds => throw _privateConstructorUsedError; Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $GuidedStorageResponseV2CopyWith get copyWith => + $UPCSInitiateResponseCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class $GuidedStorageResponseV2CopyWith<$Res> { - factory $GuidedStorageResponseV2CopyWith(GuidedStorageResponseV2 value, - $Res Function(GuidedStorageResponseV2) then) = - _$GuidedStorageResponseV2CopyWithImpl<$Res, GuidedStorageResponseV2>; +abstract class $UPCSInitiateResponseCopyWith<$Res> { + factory $UPCSInitiateResponseCopyWith(UPCSInitiateResponse value, + $Res Function(UPCSInitiateResponse) then) = + _$UPCSInitiateResponseCopyWithImpl<$Res, UPCSInitiateResponse>; @useResult - $Res call( - {ProbeStatus status, - ErrorReportRef? errorReport, - GuidedChoiceV2? configured, - List targets}); - - $ErrorReportRefCopyWith<$Res>? get errorReport; - $GuidedChoiceV2CopyWith<$Res>? get configured; + $Res call({String userCode, int validitySeconds}); } /// @nodoc -class _$GuidedStorageResponseV2CopyWithImpl<$Res, - $Val extends GuidedStorageResponseV2> - implements $GuidedStorageResponseV2CopyWith<$Res> { - _$GuidedStorageResponseV2CopyWithImpl(this._value, this._then); +class _$UPCSInitiateResponseCopyWithImpl<$Res, + $Val extends UPCSInitiateResponse> + implements $UPCSInitiateResponseCopyWith<$Res> { + _$UPCSInitiateResponseCopyWithImpl(this._value, this._then); // ignore: unused_field final $Val _value; @@ -8330,235 +6618,156 @@ class _$GuidedStorageResponseV2CopyWithImpl<$Res, @pragma('vm:prefer-inline') @override $Res call({ - Object? status = null, - Object? errorReport = freezed, - Object? configured = freezed, - Object? targets = null, + Object? userCode = null, + Object? validitySeconds = null, }) { return _then(_value.copyWith( - status: null == status - ? _value.status - : status // ignore: cast_nullable_to_non_nullable - as ProbeStatus, - errorReport: freezed == errorReport - ? _value.errorReport - : errorReport // ignore: cast_nullable_to_non_nullable - as ErrorReportRef?, - configured: freezed == configured - ? _value.configured - : configured // ignore: cast_nullable_to_non_nullable - as GuidedChoiceV2?, - targets: null == targets - ? _value.targets - : targets // ignore: cast_nullable_to_non_nullable - as List, - ) as $Val); - } - - @override - @pragma('vm:prefer-inline') - $ErrorReportRefCopyWith<$Res>? get errorReport { - if (_value.errorReport == null) { - return null; - } - - return $ErrorReportRefCopyWith<$Res>(_value.errorReport!, (value) { - return _then(_value.copyWith(errorReport: value) as $Val); - }); - } - - @override - @pragma('vm:prefer-inline') - $GuidedChoiceV2CopyWith<$Res>? get configured { - if (_value.configured == null) { - return null; - } - - return $GuidedChoiceV2CopyWith<$Res>(_value.configured!, (value) { - return _then(_value.copyWith(configured: value) as $Val); - }); + userCode: null == userCode + ? _value.userCode + : userCode // ignore: cast_nullable_to_non_nullable + as String, + validitySeconds: null == validitySeconds + ? _value.validitySeconds + : validitySeconds // ignore: cast_nullable_to_non_nullable + as int, + ) as $Val); } } /// @nodoc -abstract class _$$GuidedStorageResponseV2ImplCopyWith<$Res> - implements $GuidedStorageResponseV2CopyWith<$Res> { - factory _$$GuidedStorageResponseV2ImplCopyWith( - _$GuidedStorageResponseV2Impl value, - $Res Function(_$GuidedStorageResponseV2Impl) then) = - __$$GuidedStorageResponseV2ImplCopyWithImpl<$Res>; +abstract class _$$UPCSInitiateResponseImplCopyWith<$Res> + implements $UPCSInitiateResponseCopyWith<$Res> { + factory _$$UPCSInitiateResponseImplCopyWith(_$UPCSInitiateResponseImpl value, + $Res Function(_$UPCSInitiateResponseImpl) then) = + __$$UPCSInitiateResponseImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {ProbeStatus status, - ErrorReportRef? errorReport, - GuidedChoiceV2? configured, - List targets}); - - @override - $ErrorReportRefCopyWith<$Res>? get errorReport; - @override - $GuidedChoiceV2CopyWith<$Res>? get configured; + $Res call({String userCode, int validitySeconds}); } /// @nodoc -class __$$GuidedStorageResponseV2ImplCopyWithImpl<$Res> - extends _$GuidedStorageResponseV2CopyWithImpl<$Res, - _$GuidedStorageResponseV2Impl> - implements _$$GuidedStorageResponseV2ImplCopyWith<$Res> { - __$$GuidedStorageResponseV2ImplCopyWithImpl( - _$GuidedStorageResponseV2Impl _value, - $Res Function(_$GuidedStorageResponseV2Impl) _then) +class __$$UPCSInitiateResponseImplCopyWithImpl<$Res> + extends _$UPCSInitiateResponseCopyWithImpl<$Res, _$UPCSInitiateResponseImpl> + implements _$$UPCSInitiateResponseImplCopyWith<$Res> { + __$$UPCSInitiateResponseImplCopyWithImpl(_$UPCSInitiateResponseImpl _value, + $Res Function(_$UPCSInitiateResponseImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? status = null, - Object? errorReport = freezed, - Object? configured = freezed, - Object? targets = null, + Object? userCode = null, + Object? validitySeconds = null, }) { - return _then(_$GuidedStorageResponseV2Impl( - status: null == status - ? _value.status - : status // ignore: cast_nullable_to_non_nullable - as ProbeStatus, - errorReport: freezed == errorReport - ? _value.errorReport - : errorReport // ignore: cast_nullable_to_non_nullable - as ErrorReportRef?, - configured: freezed == configured - ? _value.configured - : configured // ignore: cast_nullable_to_non_nullable - as GuidedChoiceV2?, - targets: null == targets - ? _value._targets - : targets // ignore: cast_nullable_to_non_nullable - as List, + return _then(_$UPCSInitiateResponseImpl( + userCode: null == userCode + ? _value.userCode + : userCode // ignore: cast_nullable_to_non_nullable + as String, + validitySeconds: null == validitySeconds + ? _value.validitySeconds + : validitySeconds // ignore: cast_nullable_to_non_nullable + as int, )); } } /// @nodoc @JsonSerializable() -class _$GuidedStorageResponseV2Impl implements _GuidedStorageResponseV2 { - const _$GuidedStorageResponseV2Impl( - {required this.status, - this.errorReport, - this.configured, - final List targets = const []}) - : _targets = targets; +class _$UPCSInitiateResponseImpl implements _UPCSInitiateResponse { + const _$UPCSInitiateResponseImpl( + {required this.userCode, required this.validitySeconds}); - factory _$GuidedStorageResponseV2Impl.fromJson(Map json) => - _$$GuidedStorageResponseV2ImplFromJson(json); + factory _$UPCSInitiateResponseImpl.fromJson(Map json) => + _$$UPCSInitiateResponseImplFromJson(json); @override - final ProbeStatus status; - @override - final ErrorReportRef? errorReport; - @override - final GuidedChoiceV2? configured; - final List _targets; + final String userCode; @override - @JsonKey() - List get targets { - if (_targets is EqualUnmodifiableListView) return _targets; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_targets); - } + final int validitySeconds; @override String toString() { - return 'GuidedStorageResponseV2(status: $status, errorReport: $errorReport, configured: $configured, targets: $targets)'; + return 'UPCSInitiateResponse(userCode: $userCode, validitySeconds: $validitySeconds)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$GuidedStorageResponseV2Impl && - (identical(other.status, status) || other.status == status) && - (identical(other.errorReport, errorReport) || - other.errorReport == errorReport) && - (identical(other.configured, configured) || - other.configured == configured) && - const DeepCollectionEquality().equals(other._targets, _targets)); + other is _$UPCSInitiateResponseImpl && + (identical(other.userCode, userCode) || + other.userCode == userCode) && + (identical(other.validitySeconds, validitySeconds) || + other.validitySeconds == validitySeconds)); } @JsonKey(ignore: true) @override - int get hashCode => Object.hash(runtimeType, status, errorReport, configured, - const DeepCollectionEquality().hash(_targets)); + int get hashCode => Object.hash(runtimeType, userCode, validitySeconds); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$GuidedStorageResponseV2ImplCopyWith<_$GuidedStorageResponseV2Impl> - get copyWith => __$$GuidedStorageResponseV2ImplCopyWithImpl< - _$GuidedStorageResponseV2Impl>(this, _$identity); + _$$UPCSInitiateResponseImplCopyWith<_$UPCSInitiateResponseImpl> + get copyWith => + __$$UPCSInitiateResponseImplCopyWithImpl<_$UPCSInitiateResponseImpl>( + this, _$identity); @override Map toJson() { - return _$$GuidedStorageResponseV2ImplToJson( + return _$$UPCSInitiateResponseImplToJson( this, ); } } -abstract class _GuidedStorageResponseV2 implements GuidedStorageResponseV2 { - const factory _GuidedStorageResponseV2( - {required final ProbeStatus status, - final ErrorReportRef? errorReport, - final GuidedChoiceV2? configured, - final List targets}) = _$GuidedStorageResponseV2Impl; +abstract class _UPCSInitiateResponse implements UPCSInitiateResponse { + const factory _UPCSInitiateResponse( + {required final String userCode, + required final int validitySeconds}) = _$UPCSInitiateResponseImpl; - factory _GuidedStorageResponseV2.fromJson(Map json) = - _$GuidedStorageResponseV2Impl.fromJson; + factory _UPCSInitiateResponse.fromJson(Map json) = + _$UPCSInitiateResponseImpl.fromJson; @override - ProbeStatus get status; - @override - ErrorReportRef? get errorReport; - @override - GuidedChoiceV2? get configured; + String get userCode; @override - List get targets; + int get validitySeconds; @override @JsonKey(ignore: true) - _$$GuidedStorageResponseV2ImplCopyWith<_$GuidedStorageResponseV2Impl> + _$$UPCSInitiateResponseImplCopyWith<_$UPCSInitiateResponseImpl> get copyWith => throw _privateConstructorUsedError; } -AddPartitionV2 _$AddPartitionV2FromJson(Map json) { - return _AddPartitionV2.fromJson(json); +UPCSWaitResponse _$UPCSWaitResponseFromJson(Map json) { + return _UPCSWaitResponse.fromJson(json); } /// @nodoc -mixin _$AddPartitionV2 { - String get diskId => throw _privateConstructorUsedError; - Partition get partition => throw _privateConstructorUsedError; - Gap get gap => throw _privateConstructorUsedError; +mixin _$UPCSWaitResponse { + UPCSWaitStatus get status => throw _privateConstructorUsedError; + String? get contractToken => throw _privateConstructorUsedError; Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $AddPartitionV2CopyWith get copyWith => + $UPCSWaitResponseCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class $AddPartitionV2CopyWith<$Res> { - factory $AddPartitionV2CopyWith( - AddPartitionV2 value, $Res Function(AddPartitionV2) then) = - _$AddPartitionV2CopyWithImpl<$Res, AddPartitionV2>; +abstract class $UPCSWaitResponseCopyWith<$Res> { + factory $UPCSWaitResponseCopyWith( + UPCSWaitResponse value, $Res Function(UPCSWaitResponse) then) = + _$UPCSWaitResponseCopyWithImpl<$Res, UPCSWaitResponse>; @useResult - $Res call({String diskId, Partition partition, Gap gap}); + $Res call({UPCSWaitStatus status, String? contractToken}); } /// @nodoc -class _$AddPartitionV2CopyWithImpl<$Res, $Val extends AddPartitionV2> - implements $AddPartitionV2CopyWith<$Res> { - _$AddPartitionV2CopyWithImpl(this._value, this._then); +class _$UPCSWaitResponseCopyWithImpl<$Res, $Val extends UPCSWaitResponse> + implements $UPCSWaitResponseCopyWith<$Res> { + _$UPCSWaitResponseCopyWithImpl(this._value, this._then); // ignore: unused_field final $Val _value; @@ -8568,173 +6777,155 @@ class _$AddPartitionV2CopyWithImpl<$Res, $Val extends AddPartitionV2> @pragma('vm:prefer-inline') @override $Res call({ - Object? diskId = null, - Object? partition = freezed, - Object? gap = freezed, + Object? status = null, + Object? contractToken = freezed, }) { return _then(_value.copyWith( - diskId: null == diskId - ? _value.diskId - : diskId // ignore: cast_nullable_to_non_nullable - as String, - partition: freezed == partition - ? _value.partition - : partition // ignore: cast_nullable_to_non_nullable - as Partition, - gap: freezed == gap - ? _value.gap - : gap // ignore: cast_nullable_to_non_nullable - as Gap, + status: null == status + ? _value.status + : status // ignore: cast_nullable_to_non_nullable + as UPCSWaitStatus, + contractToken: freezed == contractToken + ? _value.contractToken + : contractToken // ignore: cast_nullable_to_non_nullable + as String?, ) as $Val); } } /// @nodoc -abstract class _$$AddPartitionV2ImplCopyWith<$Res> - implements $AddPartitionV2CopyWith<$Res> { - factory _$$AddPartitionV2ImplCopyWith(_$AddPartitionV2Impl value, - $Res Function(_$AddPartitionV2Impl) then) = - __$$AddPartitionV2ImplCopyWithImpl<$Res>; +abstract class _$$UPCSWaitResponseImplCopyWith<$Res> + implements $UPCSWaitResponseCopyWith<$Res> { + factory _$$UPCSWaitResponseImplCopyWith(_$UPCSWaitResponseImpl value, + $Res Function(_$UPCSWaitResponseImpl) then) = + __$$UPCSWaitResponseImplCopyWithImpl<$Res>; @override @useResult - $Res call({String diskId, Partition partition, Gap gap}); + $Res call({UPCSWaitStatus status, String? contractToken}); } /// @nodoc -class __$$AddPartitionV2ImplCopyWithImpl<$Res> - extends _$AddPartitionV2CopyWithImpl<$Res, _$AddPartitionV2Impl> - implements _$$AddPartitionV2ImplCopyWith<$Res> { - __$$AddPartitionV2ImplCopyWithImpl( - _$AddPartitionV2Impl _value, $Res Function(_$AddPartitionV2Impl) _then) +class __$$UPCSWaitResponseImplCopyWithImpl<$Res> + extends _$UPCSWaitResponseCopyWithImpl<$Res, _$UPCSWaitResponseImpl> + implements _$$UPCSWaitResponseImplCopyWith<$Res> { + __$$UPCSWaitResponseImplCopyWithImpl(_$UPCSWaitResponseImpl _value, + $Res Function(_$UPCSWaitResponseImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? diskId = null, - Object? partition = freezed, - Object? gap = freezed, + Object? status = null, + Object? contractToken = freezed, }) { - return _then(_$AddPartitionV2Impl( - diskId: null == diskId - ? _value.diskId - : diskId // ignore: cast_nullable_to_non_nullable - as String, - partition: freezed == partition - ? _value.partition - : partition // ignore: cast_nullable_to_non_nullable - as Partition, - gap: freezed == gap - ? _value.gap - : gap // ignore: cast_nullable_to_non_nullable - as Gap, + return _then(_$UPCSWaitResponseImpl( + status: null == status + ? _value.status + : status // ignore: cast_nullable_to_non_nullable + as UPCSWaitStatus, + contractToken: freezed == contractToken + ? _value.contractToken + : contractToken // ignore: cast_nullable_to_non_nullable + as String?, )); } } /// @nodoc @JsonSerializable() -class _$AddPartitionV2Impl implements _AddPartitionV2 { - const _$AddPartitionV2Impl( - {required this.diskId, required this.partition, required this.gap}); +class _$UPCSWaitResponseImpl implements _UPCSWaitResponse { + const _$UPCSWaitResponseImpl( + {required this.status, required this.contractToken}); - factory _$AddPartitionV2Impl.fromJson(Map json) => - _$$AddPartitionV2ImplFromJson(json); + factory _$UPCSWaitResponseImpl.fromJson(Map json) => + _$$UPCSWaitResponseImplFromJson(json); @override - final String diskId; - @override - final Partition partition; + final UPCSWaitStatus status; @override - final Gap gap; + final String? contractToken; @override String toString() { - return 'AddPartitionV2(diskId: $diskId, partition: $partition, gap: $gap)'; + return 'UPCSWaitResponse(status: $status, contractToken: $contractToken)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$AddPartitionV2Impl && - (identical(other.diskId, diskId) || other.diskId == diskId) && - const DeepCollectionEquality().equals(other.partition, partition) && - const DeepCollectionEquality().equals(other.gap, gap)); + other is _$UPCSWaitResponseImpl && + (identical(other.status, status) || other.status == status) && + (identical(other.contractToken, contractToken) || + other.contractToken == contractToken)); } @JsonKey(ignore: true) @override - int get hashCode => Object.hash( - runtimeType, - diskId, - const DeepCollectionEquality().hash(partition), - const DeepCollectionEquality().hash(gap)); + int get hashCode => Object.hash(runtimeType, status, contractToken); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$AddPartitionV2ImplCopyWith<_$AddPartitionV2Impl> get copyWith => - __$$AddPartitionV2ImplCopyWithImpl<_$AddPartitionV2Impl>( + _$$UPCSWaitResponseImplCopyWith<_$UPCSWaitResponseImpl> get copyWith => + __$$UPCSWaitResponseImplCopyWithImpl<_$UPCSWaitResponseImpl>( this, _$identity); @override Map toJson() { - return _$$AddPartitionV2ImplToJson( + return _$$UPCSWaitResponseImplToJson( this, ); } } -abstract class _AddPartitionV2 implements AddPartitionV2 { - const factory _AddPartitionV2( - {required final String diskId, - required final Partition partition, - required final Gap gap}) = _$AddPartitionV2Impl; +abstract class _UPCSWaitResponse implements UPCSWaitResponse { + const factory _UPCSWaitResponse( + {required final UPCSWaitStatus status, + required final String? contractToken}) = _$UPCSWaitResponseImpl; - factory _AddPartitionV2.fromJson(Map json) = - _$AddPartitionV2Impl.fromJson; + factory _UPCSWaitResponse.fromJson(Map json) = + _$UPCSWaitResponseImpl.fromJson; @override - String get diskId; - @override - Partition get partition; + UPCSWaitStatus get status; @override - Gap get gap; + String? get contractToken; @override @JsonKey(ignore: true) - _$$AddPartitionV2ImplCopyWith<_$AddPartitionV2Impl> get copyWith => + _$$UPCSWaitResponseImplCopyWith<_$UPCSWaitResponseImpl> get copyWith => throw _privateConstructorUsedError; } -ModifyPartitionV2 _$ModifyPartitionV2FromJson(Map json) { - return _ModifyPartitionV2.fromJson(json); +UbuntuProService _$UbuntuProServiceFromJson(Map json) { + return _UbuntuProService.fromJson(json); } /// @nodoc -mixin _$ModifyPartitionV2 { - String get diskId => throw _privateConstructorUsedError; - Partition get partition => throw _privateConstructorUsedError; +mixin _$UbuntuProService { + String get name => throw _privateConstructorUsedError; + String get description => throw _privateConstructorUsedError; + bool get autoEnabled => throw _privateConstructorUsedError; Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $ModifyPartitionV2CopyWith get copyWith => + $UbuntuProServiceCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class $ModifyPartitionV2CopyWith<$Res> { - factory $ModifyPartitionV2CopyWith( - ModifyPartitionV2 value, $Res Function(ModifyPartitionV2) then) = - _$ModifyPartitionV2CopyWithImpl<$Res, ModifyPartitionV2>; +abstract class $UbuntuProServiceCopyWith<$Res> { + factory $UbuntuProServiceCopyWith( + UbuntuProService value, $Res Function(UbuntuProService) then) = + _$UbuntuProServiceCopyWithImpl<$Res, UbuntuProService>; @useResult - $Res call({String diskId, Partition partition}); + $Res call({String name, String description, bool autoEnabled}); } /// @nodoc -class _$ModifyPartitionV2CopyWithImpl<$Res, $Val extends ModifyPartitionV2> - implements $ModifyPartitionV2CopyWith<$Res> { - _$ModifyPartitionV2CopyWithImpl(this._value, this._then); +class _$UbuntuProServiceCopyWithImpl<$Res, $Val extends UbuntuProService> + implements $UbuntuProServiceCopyWith<$Res> { + _$UbuntuProServiceCopyWithImpl(this._value, this._then); // ignore: unused_field final $Val _value; @@ -8744,154 +6935,181 @@ class _$ModifyPartitionV2CopyWithImpl<$Res, $Val extends ModifyPartitionV2> @pragma('vm:prefer-inline') @override $Res call({ - Object? diskId = null, - Object? partition = freezed, + Object? name = null, + Object? description = null, + Object? autoEnabled = null, }) { return _then(_value.copyWith( - diskId: null == diskId - ? _value.diskId - : diskId // ignore: cast_nullable_to_non_nullable + name: null == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable as String, - partition: freezed == partition - ? _value.partition - : partition // ignore: cast_nullable_to_non_nullable - as Partition, + description: null == description + ? _value.description + : description // ignore: cast_nullable_to_non_nullable + as String, + autoEnabled: null == autoEnabled + ? _value.autoEnabled + : autoEnabled // ignore: cast_nullable_to_non_nullable + as bool, ) as $Val); } } /// @nodoc -abstract class _$$ModifyPartitionV2ImplCopyWith<$Res> - implements $ModifyPartitionV2CopyWith<$Res> { - factory _$$ModifyPartitionV2ImplCopyWith(_$ModifyPartitionV2Impl value, - $Res Function(_$ModifyPartitionV2Impl) then) = - __$$ModifyPartitionV2ImplCopyWithImpl<$Res>; +abstract class _$$UbuntuProServiceImplCopyWith<$Res> + implements $UbuntuProServiceCopyWith<$Res> { + factory _$$UbuntuProServiceImplCopyWith(_$UbuntuProServiceImpl value, + $Res Function(_$UbuntuProServiceImpl) then) = + __$$UbuntuProServiceImplCopyWithImpl<$Res>; @override @useResult - $Res call({String diskId, Partition partition}); + $Res call({String name, String description, bool autoEnabled}); } /// @nodoc -class __$$ModifyPartitionV2ImplCopyWithImpl<$Res> - extends _$ModifyPartitionV2CopyWithImpl<$Res, _$ModifyPartitionV2Impl> - implements _$$ModifyPartitionV2ImplCopyWith<$Res> { - __$$ModifyPartitionV2ImplCopyWithImpl(_$ModifyPartitionV2Impl _value, - $Res Function(_$ModifyPartitionV2Impl) _then) +class __$$UbuntuProServiceImplCopyWithImpl<$Res> + extends _$UbuntuProServiceCopyWithImpl<$Res, _$UbuntuProServiceImpl> + implements _$$UbuntuProServiceImplCopyWith<$Res> { + __$$UbuntuProServiceImplCopyWithImpl(_$UbuntuProServiceImpl _value, + $Res Function(_$UbuntuProServiceImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? diskId = null, - Object? partition = freezed, + Object? name = null, + Object? description = null, + Object? autoEnabled = null, }) { - return _then(_$ModifyPartitionV2Impl( - diskId: null == diskId - ? _value.diskId - : diskId // ignore: cast_nullable_to_non_nullable + return _then(_$UbuntuProServiceImpl( + name: null == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable as String, - partition: freezed == partition - ? _value.partition - : partition // ignore: cast_nullable_to_non_nullable - as Partition, + description: null == description + ? _value.description + : description // ignore: cast_nullable_to_non_nullable + as String, + autoEnabled: null == autoEnabled + ? _value.autoEnabled + : autoEnabled // ignore: cast_nullable_to_non_nullable + as bool, )); } } /// @nodoc @JsonSerializable() -class _$ModifyPartitionV2Impl implements _ModifyPartitionV2 { - const _$ModifyPartitionV2Impl( - {required this.diskId, required this.partition}); +class _$UbuntuProServiceImpl implements _UbuntuProService { + const _$UbuntuProServiceImpl( + {required this.name, + required this.description, + required this.autoEnabled}); - factory _$ModifyPartitionV2Impl.fromJson(Map json) => - _$$ModifyPartitionV2ImplFromJson(json); + factory _$UbuntuProServiceImpl.fromJson(Map json) => + _$$UbuntuProServiceImplFromJson(json); @override - final String diskId; + final String name; @override - final Partition partition; + final String description; + @override + final bool autoEnabled; @override String toString() { - return 'ModifyPartitionV2(diskId: $diskId, partition: $partition)'; + return 'UbuntuProService(name: $name, description: $description, autoEnabled: $autoEnabled)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$ModifyPartitionV2Impl && - (identical(other.diskId, diskId) || other.diskId == diskId) && - const DeepCollectionEquality().equals(other.partition, partition)); + other is _$UbuntuProServiceImpl && + (identical(other.name, name) || other.name == name) && + (identical(other.description, description) || + other.description == description) && + (identical(other.autoEnabled, autoEnabled) || + other.autoEnabled == autoEnabled)); } @JsonKey(ignore: true) @override - int get hashCode => Object.hash( - runtimeType, diskId, const DeepCollectionEquality().hash(partition)); + int get hashCode => Object.hash(runtimeType, name, description, autoEnabled); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$ModifyPartitionV2ImplCopyWith<_$ModifyPartitionV2Impl> get copyWith => - __$$ModifyPartitionV2ImplCopyWithImpl<_$ModifyPartitionV2Impl>( + _$$UbuntuProServiceImplCopyWith<_$UbuntuProServiceImpl> get copyWith => + __$$UbuntuProServiceImplCopyWithImpl<_$UbuntuProServiceImpl>( this, _$identity); @override Map toJson() { - return _$$ModifyPartitionV2ImplToJson( + return _$$UbuntuProServiceImplToJson( this, ); } } -abstract class _ModifyPartitionV2 implements ModifyPartitionV2 { - const factory _ModifyPartitionV2( - {required final String diskId, - required final Partition partition}) = _$ModifyPartitionV2Impl; +abstract class _UbuntuProService implements UbuntuProService { + const factory _UbuntuProService( + {required final String name, + required final String description, + required final bool autoEnabled}) = _$UbuntuProServiceImpl; - factory _ModifyPartitionV2.fromJson(Map json) = - _$ModifyPartitionV2Impl.fromJson; + factory _UbuntuProService.fromJson(Map json) = + _$UbuntuProServiceImpl.fromJson; @override - String get diskId; + String get name; @override - Partition get partition; + String get description; + @override + bool get autoEnabled; @override @JsonKey(ignore: true) - _$$ModifyPartitionV2ImplCopyWith<_$ModifyPartitionV2Impl> get copyWith => + _$$UbuntuProServiceImplCopyWith<_$UbuntuProServiceImpl> get copyWith => throw _privateConstructorUsedError; } -ReformatDisk _$ReformatDiskFromJson(Map json) { - return _ReformatDisk.fromJson(json); +UbuntuProSubscription _$UbuntuProSubscriptionFromJson( + Map json) { + return _UbuntuProSubscription.fromJson(json); } /// @nodoc -mixin _$ReformatDisk { - String get diskId => throw _privateConstructorUsedError; - String? get ptable => throw _privateConstructorUsedError; +mixin _$UbuntuProSubscription { + String get contractName => throw _privateConstructorUsedError; + String get accountName => throw _privateConstructorUsedError; + String get contractToken => throw _privateConstructorUsedError; + List get services => throw _privateConstructorUsedError; Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $ReformatDiskCopyWith get copyWith => + $UbuntuProSubscriptionCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class $ReformatDiskCopyWith<$Res> { - factory $ReformatDiskCopyWith( - ReformatDisk value, $Res Function(ReformatDisk) then) = - _$ReformatDiskCopyWithImpl<$Res, ReformatDisk>; - @useResult - $Res call({String diskId, String? ptable}); +abstract class $UbuntuProSubscriptionCopyWith<$Res> { + factory $UbuntuProSubscriptionCopyWith(UbuntuProSubscription value, + $Res Function(UbuntuProSubscription) then) = + _$UbuntuProSubscriptionCopyWithImpl<$Res, UbuntuProSubscription>; + @useResult + $Res call( + {String contractName, + String accountName, + String contractToken, + List services}); } /// @nodoc -class _$ReformatDiskCopyWithImpl<$Res, $Val extends ReformatDisk> - implements $ReformatDiskCopyWith<$Res> { - _$ReformatDiskCopyWithImpl(this._value, this._then); +class _$UbuntuProSubscriptionCopyWithImpl<$Res, + $Val extends UbuntuProSubscription> + implements $UbuntuProSubscriptionCopyWith<$Res> { + _$UbuntuProSubscriptionCopyWithImpl(this._value, this._then); // ignore: unused_field final $Val _value; @@ -8901,157 +7119,210 @@ class _$ReformatDiskCopyWithImpl<$Res, $Val extends ReformatDisk> @pragma('vm:prefer-inline') @override $Res call({ - Object? diskId = null, - Object? ptable = freezed, + Object? contractName = null, + Object? accountName = null, + Object? contractToken = null, + Object? services = null, }) { return _then(_value.copyWith( - diskId: null == diskId - ? _value.diskId - : diskId // ignore: cast_nullable_to_non_nullable + contractName: null == contractName + ? _value.contractName + : contractName // ignore: cast_nullable_to_non_nullable as String, - ptable: freezed == ptable - ? _value.ptable - : ptable // ignore: cast_nullable_to_non_nullable - as String?, + accountName: null == accountName + ? _value.accountName + : accountName // ignore: cast_nullable_to_non_nullable + as String, + contractToken: null == contractToken + ? _value.contractToken + : contractToken // ignore: cast_nullable_to_non_nullable + as String, + services: null == services + ? _value.services + : services // ignore: cast_nullable_to_non_nullable + as List, ) as $Val); } } /// @nodoc -abstract class _$$ReformatDiskImplCopyWith<$Res> - implements $ReformatDiskCopyWith<$Res> { - factory _$$ReformatDiskImplCopyWith( - _$ReformatDiskImpl value, $Res Function(_$ReformatDiskImpl) then) = - __$$ReformatDiskImplCopyWithImpl<$Res>; +abstract class _$$UbuntuProSubscriptionImplCopyWith<$Res> + implements $UbuntuProSubscriptionCopyWith<$Res> { + factory _$$UbuntuProSubscriptionImplCopyWith( + _$UbuntuProSubscriptionImpl value, + $Res Function(_$UbuntuProSubscriptionImpl) then) = + __$$UbuntuProSubscriptionImplCopyWithImpl<$Res>; @override @useResult - $Res call({String diskId, String? ptable}); + $Res call( + {String contractName, + String accountName, + String contractToken, + List services}); } /// @nodoc -class __$$ReformatDiskImplCopyWithImpl<$Res> - extends _$ReformatDiskCopyWithImpl<$Res, _$ReformatDiskImpl> - implements _$$ReformatDiskImplCopyWith<$Res> { - __$$ReformatDiskImplCopyWithImpl( - _$ReformatDiskImpl _value, $Res Function(_$ReformatDiskImpl) _then) +class __$$UbuntuProSubscriptionImplCopyWithImpl<$Res> + extends _$UbuntuProSubscriptionCopyWithImpl<$Res, + _$UbuntuProSubscriptionImpl> + implements _$$UbuntuProSubscriptionImplCopyWith<$Res> { + __$$UbuntuProSubscriptionImplCopyWithImpl(_$UbuntuProSubscriptionImpl _value, + $Res Function(_$UbuntuProSubscriptionImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? diskId = null, - Object? ptable = freezed, + Object? contractName = null, + Object? accountName = null, + Object? contractToken = null, + Object? services = null, }) { - return _then(_$ReformatDiskImpl( - diskId: null == diskId - ? _value.diskId - : diskId // ignore: cast_nullable_to_non_nullable + return _then(_$UbuntuProSubscriptionImpl( + contractName: null == contractName + ? _value.contractName + : contractName // ignore: cast_nullable_to_non_nullable as String, - ptable: freezed == ptable - ? _value.ptable - : ptable // ignore: cast_nullable_to_non_nullable - as String?, + accountName: null == accountName + ? _value.accountName + : accountName // ignore: cast_nullable_to_non_nullable + as String, + contractToken: null == contractToken + ? _value.contractToken + : contractToken // ignore: cast_nullable_to_non_nullable + as String, + services: null == services + ? _value._services + : services // ignore: cast_nullable_to_non_nullable + as List, )); } } /// @nodoc @JsonSerializable() -class _$ReformatDiskImpl implements _ReformatDisk { - const _$ReformatDiskImpl({required this.diskId, this.ptable}); +class _$UbuntuProSubscriptionImpl implements _UbuntuProSubscription { + const _$UbuntuProSubscriptionImpl( + {required this.contractName, + required this.accountName, + required this.contractToken, + required final List services}) + : _services = services; - factory _$ReformatDiskImpl.fromJson(Map json) => - _$$ReformatDiskImplFromJson(json); + factory _$UbuntuProSubscriptionImpl.fromJson(Map json) => + _$$UbuntuProSubscriptionImplFromJson(json); @override - final String diskId; + final String contractName; @override - final String? ptable; + final String accountName; + @override + final String contractToken; + final List _services; + @override + List get services { + if (_services is EqualUnmodifiableListView) return _services; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_services); + } @override String toString() { - return 'ReformatDisk(diskId: $diskId, ptable: $ptable)'; + return 'UbuntuProSubscription(contractName: $contractName, accountName: $accountName, contractToken: $contractToken, services: $services)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$ReformatDiskImpl && - (identical(other.diskId, diskId) || other.diskId == diskId) && - (identical(other.ptable, ptable) || other.ptable == ptable)); + other is _$UbuntuProSubscriptionImpl && + (identical(other.contractName, contractName) || + other.contractName == contractName) && + (identical(other.accountName, accountName) || + other.accountName == accountName) && + (identical(other.contractToken, contractToken) || + other.contractToken == contractToken) && + const DeepCollectionEquality().equals(other._services, _services)); } @JsonKey(ignore: true) @override - int get hashCode => Object.hash(runtimeType, diskId, ptable); + int get hashCode => Object.hash(runtimeType, contractName, accountName, + contractToken, const DeepCollectionEquality().hash(_services)); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$ReformatDiskImplCopyWith<_$ReformatDiskImpl> get copyWith => - __$$ReformatDiskImplCopyWithImpl<_$ReformatDiskImpl>(this, _$identity); + _$$UbuntuProSubscriptionImplCopyWith<_$UbuntuProSubscriptionImpl> + get copyWith => __$$UbuntuProSubscriptionImplCopyWithImpl< + _$UbuntuProSubscriptionImpl>(this, _$identity); @override Map toJson() { - return _$$ReformatDiskImplToJson( + return _$$UbuntuProSubscriptionImplToJson( this, ); } } -abstract class _ReformatDisk implements ReformatDisk { - const factory _ReformatDisk( - {required final String diskId, - final String? ptable}) = _$ReformatDiskImpl; +abstract class _UbuntuProSubscription implements UbuntuProSubscription { + const factory _UbuntuProSubscription( + {required final String contractName, + required final String accountName, + required final String contractToken, + required final List services}) = + _$UbuntuProSubscriptionImpl; - factory _ReformatDisk.fromJson(Map json) = - _$ReformatDiskImpl.fromJson; + factory _UbuntuProSubscription.fromJson(Map json) = + _$UbuntuProSubscriptionImpl.fromJson; @override - String get diskId; + String get contractName; @override - String? get ptable; + String get accountName; + @override + String get contractToken; + @override + List get services; @override @JsonKey(ignore: true) - _$$ReformatDiskImplCopyWith<_$ReformatDiskImpl> get copyWith => - throw _privateConstructorUsedError; + _$$UbuntuProSubscriptionImplCopyWith<_$UbuntuProSubscriptionImpl> + get copyWith => throw _privateConstructorUsedError; } -IdentityData _$IdentityDataFromJson(Map json) { - return _IdentityData.fromJson(json); +UbuntuProCheckTokenAnswer _$UbuntuProCheckTokenAnswerFromJson( + Map json) { + return _UbuntuProCheckTokenAnswer.fromJson(json); } /// @nodoc -mixin _$IdentityData { - String get realname => throw _privateConstructorUsedError; - String get username => throw _privateConstructorUsedError; - String get cryptedPassword => throw _privateConstructorUsedError; - String get hostname => throw _privateConstructorUsedError; +mixin _$UbuntuProCheckTokenAnswer { + UbuntuProCheckTokenStatus get status => throw _privateConstructorUsedError; + UbuntuProSubscription? get subscription => throw _privateConstructorUsedError; Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $IdentityDataCopyWith get copyWith => + $UbuntuProCheckTokenAnswerCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class $IdentityDataCopyWith<$Res> { - factory $IdentityDataCopyWith( - IdentityData value, $Res Function(IdentityData) then) = - _$IdentityDataCopyWithImpl<$Res, IdentityData>; +abstract class $UbuntuProCheckTokenAnswerCopyWith<$Res> { + factory $UbuntuProCheckTokenAnswerCopyWith(UbuntuProCheckTokenAnswer value, + $Res Function(UbuntuProCheckTokenAnswer) then) = + _$UbuntuProCheckTokenAnswerCopyWithImpl<$Res, UbuntuProCheckTokenAnswer>; @useResult $Res call( - {String realname, - String username, - String cryptedPassword, - String hostname}); + {UbuntuProCheckTokenStatus status, UbuntuProSubscription? subscription}); + + $UbuntuProSubscriptionCopyWith<$Res>? get subscription; } /// @nodoc -class _$IdentityDataCopyWithImpl<$Res, $Val extends IdentityData> - implements $IdentityDataCopyWith<$Res> { - _$IdentityDataCopyWithImpl(this._value, this._then); +class _$UbuntuProCheckTokenAnswerCopyWithImpl<$Res, + $Val extends UbuntuProCheckTokenAnswer> + implements $UbuntuProCheckTokenAnswerCopyWith<$Res> { + _$UbuntuProCheckTokenAnswerCopyWithImpl(this._value, this._then); // ignore: unused_field final $Val _value; @@ -9061,199 +7332,175 @@ class _$IdentityDataCopyWithImpl<$Res, $Val extends IdentityData> @pragma('vm:prefer-inline') @override $Res call({ - Object? realname = null, - Object? username = null, - Object? cryptedPassword = null, - Object? hostname = null, + Object? status = null, + Object? subscription = freezed, }) { return _then(_value.copyWith( - realname: null == realname - ? _value.realname - : realname // ignore: cast_nullable_to_non_nullable - as String, - username: null == username - ? _value.username - : username // ignore: cast_nullable_to_non_nullable - as String, - cryptedPassword: null == cryptedPassword - ? _value.cryptedPassword - : cryptedPassword // ignore: cast_nullable_to_non_nullable - as String, - hostname: null == hostname - ? _value.hostname - : hostname // ignore: cast_nullable_to_non_nullable - as String, + status: null == status + ? _value.status + : status // ignore: cast_nullable_to_non_nullable + as UbuntuProCheckTokenStatus, + subscription: freezed == subscription + ? _value.subscription + : subscription // ignore: cast_nullable_to_non_nullable + as UbuntuProSubscription?, ) as $Val); } -} -/// @nodoc -abstract class _$$IdentityDataImplCopyWith<$Res> - implements $IdentityDataCopyWith<$Res> { - factory _$$IdentityDataImplCopyWith( - _$IdentityDataImpl value, $Res Function(_$IdentityDataImpl) then) = - __$$IdentityDataImplCopyWithImpl<$Res>; @override - @useResult - $Res call( - {String realname, - String username, - String cryptedPassword, - String hostname}); + @pragma('vm:prefer-inline') + $UbuntuProSubscriptionCopyWith<$Res>? get subscription { + if (_value.subscription == null) { + return null; + } + + return $UbuntuProSubscriptionCopyWith<$Res>(_value.subscription!, (value) { + return _then(_value.copyWith(subscription: value) as $Val); + }); + } } /// @nodoc -class __$$IdentityDataImplCopyWithImpl<$Res> - extends _$IdentityDataCopyWithImpl<$Res, _$IdentityDataImpl> - implements _$$IdentityDataImplCopyWith<$Res> { - __$$IdentityDataImplCopyWithImpl( - _$IdentityDataImpl _value, $Res Function(_$IdentityDataImpl) _then) +abstract class _$$UbuntuProCheckTokenAnswerImplCopyWith<$Res> + implements $UbuntuProCheckTokenAnswerCopyWith<$Res> { + factory _$$UbuntuProCheckTokenAnswerImplCopyWith( + _$UbuntuProCheckTokenAnswerImpl value, + $Res Function(_$UbuntuProCheckTokenAnswerImpl) then) = + __$$UbuntuProCheckTokenAnswerImplCopyWithImpl<$Res>; + @override + @useResult + $Res call( + {UbuntuProCheckTokenStatus status, UbuntuProSubscription? subscription}); + + @override + $UbuntuProSubscriptionCopyWith<$Res>? get subscription; +} + +/// @nodoc +class __$$UbuntuProCheckTokenAnswerImplCopyWithImpl<$Res> + extends _$UbuntuProCheckTokenAnswerCopyWithImpl<$Res, + _$UbuntuProCheckTokenAnswerImpl> + implements _$$UbuntuProCheckTokenAnswerImplCopyWith<$Res> { + __$$UbuntuProCheckTokenAnswerImplCopyWithImpl( + _$UbuntuProCheckTokenAnswerImpl _value, + $Res Function(_$UbuntuProCheckTokenAnswerImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? realname = null, - Object? username = null, - Object? cryptedPassword = null, - Object? hostname = null, + Object? status = null, + Object? subscription = freezed, }) { - return _then(_$IdentityDataImpl( - realname: null == realname - ? _value.realname - : realname // ignore: cast_nullable_to_non_nullable - as String, - username: null == username - ? _value.username - : username // ignore: cast_nullable_to_non_nullable - as String, - cryptedPassword: null == cryptedPassword - ? _value.cryptedPassword - : cryptedPassword // ignore: cast_nullable_to_non_nullable - as String, - hostname: null == hostname - ? _value.hostname - : hostname // ignore: cast_nullable_to_non_nullable - as String, + return _then(_$UbuntuProCheckTokenAnswerImpl( + status: null == status + ? _value.status + : status // ignore: cast_nullable_to_non_nullable + as UbuntuProCheckTokenStatus, + subscription: freezed == subscription + ? _value.subscription + : subscription // ignore: cast_nullable_to_non_nullable + as UbuntuProSubscription?, )); } } /// @nodoc @JsonSerializable() -class _$IdentityDataImpl implements _IdentityData { - const _$IdentityDataImpl( - {this.realname = '', - this.username = '', - this.cryptedPassword = '', - this.hostname = ''}); +class _$UbuntuProCheckTokenAnswerImpl implements _UbuntuProCheckTokenAnswer { + const _$UbuntuProCheckTokenAnswerImpl( + {required this.status, required this.subscription}); - factory _$IdentityDataImpl.fromJson(Map json) => - _$$IdentityDataImplFromJson(json); + factory _$UbuntuProCheckTokenAnswerImpl.fromJson(Map json) => + _$$UbuntuProCheckTokenAnswerImplFromJson(json); @override - @JsonKey() - final String realname; - @override - @JsonKey() - final String username; - @override - @JsonKey() - final String cryptedPassword; + final UbuntuProCheckTokenStatus status; @override - @JsonKey() - final String hostname; + final UbuntuProSubscription? subscription; @override String toString() { - return 'IdentityData(realname: $realname, username: $username, cryptedPassword: $cryptedPassword, hostname: $hostname)'; + return 'UbuntuProCheckTokenAnswer(status: $status, subscription: $subscription)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$IdentityDataImpl && - (identical(other.realname, realname) || - other.realname == realname) && - (identical(other.username, username) || - other.username == username) && - (identical(other.cryptedPassword, cryptedPassword) || - other.cryptedPassword == cryptedPassword) && - (identical(other.hostname, hostname) || - other.hostname == hostname)); + other is _$UbuntuProCheckTokenAnswerImpl && + (identical(other.status, status) || other.status == status) && + (identical(other.subscription, subscription) || + other.subscription == subscription)); } @JsonKey(ignore: true) @override - int get hashCode => - Object.hash(runtimeType, realname, username, cryptedPassword, hostname); + int get hashCode => Object.hash(runtimeType, status, subscription); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$IdentityDataImplCopyWith<_$IdentityDataImpl> get copyWith => - __$$IdentityDataImplCopyWithImpl<_$IdentityDataImpl>(this, _$identity); + _$$UbuntuProCheckTokenAnswerImplCopyWith<_$UbuntuProCheckTokenAnswerImpl> + get copyWith => __$$UbuntuProCheckTokenAnswerImplCopyWithImpl< + _$UbuntuProCheckTokenAnswerImpl>(this, _$identity); @override Map toJson() { - return _$$IdentityDataImplToJson( + return _$$UbuntuProCheckTokenAnswerImplToJson( this, ); } } -abstract class _IdentityData implements IdentityData { - const factory _IdentityData( - {final String realname, - final String username, - final String cryptedPassword, - final String hostname}) = _$IdentityDataImpl; +abstract class _UbuntuProCheckTokenAnswer implements UbuntuProCheckTokenAnswer { + const factory _UbuntuProCheckTokenAnswer( + {required final UbuntuProCheckTokenStatus status, + required final UbuntuProSubscription? subscription}) = + _$UbuntuProCheckTokenAnswerImpl; - factory _IdentityData.fromJson(Map json) = - _$IdentityDataImpl.fromJson; + factory _UbuntuProCheckTokenAnswer.fromJson(Map json) = + _$UbuntuProCheckTokenAnswerImpl.fromJson; @override - String get realname; - @override - String get username; - @override - String get cryptedPassword; + UbuntuProCheckTokenStatus get status; @override - String get hostname; + UbuntuProSubscription? get subscription; @override @JsonKey(ignore: true) - _$$IdentityDataImplCopyWith<_$IdentityDataImpl> get copyWith => - throw _privateConstructorUsedError; + _$$UbuntuProCheckTokenAnswerImplCopyWith<_$UbuntuProCheckTokenAnswerImpl> + get copyWith => throw _privateConstructorUsedError; } -SSHData _$SSHDataFromJson(Map json) { - return _SSHData.fromJson(json); +TaskProgress _$TaskProgressFromJson(Map json) { + return _TaskProgress.fromJson(json); } /// @nodoc -mixin _$SSHData { - bool get installServer => throw _privateConstructorUsedError; - bool get allowPw => throw _privateConstructorUsedError; - List get authorizedKeys => throw _privateConstructorUsedError; +mixin _$TaskProgress { + String get label => throw _privateConstructorUsedError; + int get done => throw _privateConstructorUsedError; + int get total => throw _privateConstructorUsedError; Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $SSHDataCopyWith get copyWith => throw _privateConstructorUsedError; + $TaskProgressCopyWith get copyWith => + throw _privateConstructorUsedError; } /// @nodoc -abstract class $SSHDataCopyWith<$Res> { - factory $SSHDataCopyWith(SSHData value, $Res Function(SSHData) then) = - _$SSHDataCopyWithImpl<$Res, SSHData>; +abstract class $TaskProgressCopyWith<$Res> { + factory $TaskProgressCopyWith( + TaskProgress value, $Res Function(TaskProgress) then) = + _$TaskProgressCopyWithImpl<$Res, TaskProgress>; @useResult - $Res call({bool installServer, bool allowPw, List authorizedKeys}); + $Res call({String label, int done, int total}); } /// @nodoc -class _$SSHDataCopyWithImpl<$Res, $Val extends SSHData> - implements $SSHDataCopyWith<$Res> { - _$SSHDataCopyWithImpl(this._value, this._then); +class _$TaskProgressCopyWithImpl<$Res, $Val extends TaskProgress> + implements $TaskProgressCopyWith<$Res> { + _$TaskProgressCopyWithImpl(this._value, this._then); // ignore: unused_field final $Val _value; @@ -9263,181 +7510,178 @@ class _$SSHDataCopyWithImpl<$Res, $Val extends SSHData> @pragma('vm:prefer-inline') @override $Res call({ - Object? installServer = null, - Object? allowPw = null, - Object? authorizedKeys = null, + Object? label = null, + Object? done = null, + Object? total = null, }) { return _then(_value.copyWith( - installServer: null == installServer - ? _value.installServer - : installServer // ignore: cast_nullable_to_non_nullable - as bool, - allowPw: null == allowPw - ? _value.allowPw - : allowPw // ignore: cast_nullable_to_non_nullable - as bool, - authorizedKeys: null == authorizedKeys - ? _value.authorizedKeys - : authorizedKeys // ignore: cast_nullable_to_non_nullable - as List, + label: null == label + ? _value.label + : label // ignore: cast_nullable_to_non_nullable + as String, + done: null == done + ? _value.done + : done // ignore: cast_nullable_to_non_nullable + as int, + total: null == total + ? _value.total + : total // ignore: cast_nullable_to_non_nullable + as int, ) as $Val); } } /// @nodoc -abstract class _$$SSHDataImplCopyWith<$Res> implements $SSHDataCopyWith<$Res> { - factory _$$SSHDataImplCopyWith( - _$SSHDataImpl value, $Res Function(_$SSHDataImpl) then) = - __$$SSHDataImplCopyWithImpl<$Res>; +abstract class _$$TaskProgressImplCopyWith<$Res> + implements $TaskProgressCopyWith<$Res> { + factory _$$TaskProgressImplCopyWith( + _$TaskProgressImpl value, $Res Function(_$TaskProgressImpl) then) = + __$$TaskProgressImplCopyWithImpl<$Res>; @override @useResult - $Res call({bool installServer, bool allowPw, List authorizedKeys}); + $Res call({String label, int done, int total}); } /// @nodoc -class __$$SSHDataImplCopyWithImpl<$Res> - extends _$SSHDataCopyWithImpl<$Res, _$SSHDataImpl> - implements _$$SSHDataImplCopyWith<$Res> { - __$$SSHDataImplCopyWithImpl( - _$SSHDataImpl _value, $Res Function(_$SSHDataImpl) _then) +class __$$TaskProgressImplCopyWithImpl<$Res> + extends _$TaskProgressCopyWithImpl<$Res, _$TaskProgressImpl> + implements _$$TaskProgressImplCopyWith<$Res> { + __$$TaskProgressImplCopyWithImpl( + _$TaskProgressImpl _value, $Res Function(_$TaskProgressImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? installServer = null, - Object? allowPw = null, - Object? authorizedKeys = null, + Object? label = null, + Object? done = null, + Object? total = null, }) { - return _then(_$SSHDataImpl( - installServer: null == installServer - ? _value.installServer - : installServer // ignore: cast_nullable_to_non_nullable - as bool, - allowPw: null == allowPw - ? _value.allowPw - : allowPw // ignore: cast_nullable_to_non_nullable - as bool, - authorizedKeys: null == authorizedKeys - ? _value._authorizedKeys - : authorizedKeys // ignore: cast_nullable_to_non_nullable - as List, - )); - } -} - -/// @nodoc -@JsonSerializable() -class _$SSHDataImpl implements _SSHData { - const _$SSHDataImpl( - {required this.installServer, - required this.allowPw, - final List authorizedKeys = const []}) - : _authorizedKeys = authorizedKeys; + return _then(_$TaskProgressImpl( + label: null == label + ? _value.label + : label // ignore: cast_nullable_to_non_nullable + as String, + done: null == done + ? _value.done + : done // ignore: cast_nullable_to_non_nullable + as int, + total: null == total + ? _value.total + : total // ignore: cast_nullable_to_non_nullable + as int, + )); + } +} - factory _$SSHDataImpl.fromJson(Map json) => - _$$SSHDataImplFromJson(json); +/// @nodoc +@JsonSerializable() +class _$TaskProgressImpl implements _TaskProgress { + const _$TaskProgressImpl({this.label = '', this.done = 0, this.total = 0}); + + factory _$TaskProgressImpl.fromJson(Map json) => + _$$TaskProgressImplFromJson(json); @override - final bool installServer; + @JsonKey() + final String label; @override - final bool allowPw; - final List _authorizedKeys; + @JsonKey() + final int done; @override @JsonKey() - List get authorizedKeys { - if (_authorizedKeys is EqualUnmodifiableListView) return _authorizedKeys; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_authorizedKeys); - } + final int total; @override String toString() { - return 'SSHData(installServer: $installServer, allowPw: $allowPw, authorizedKeys: $authorizedKeys)'; + return 'TaskProgress(label: $label, done: $done, total: $total)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$SSHDataImpl && - (identical(other.installServer, installServer) || - other.installServer == installServer) && - (identical(other.allowPw, allowPw) || other.allowPw == allowPw) && - const DeepCollectionEquality() - .equals(other._authorizedKeys, _authorizedKeys)); + other is _$TaskProgressImpl && + (identical(other.label, label) || other.label == label) && + (identical(other.done, done) || other.done == done) && + (identical(other.total, total) || other.total == total)); } @JsonKey(ignore: true) @override - int get hashCode => Object.hash(runtimeType, installServer, allowPw, - const DeepCollectionEquality().hash(_authorizedKeys)); + int get hashCode => Object.hash(runtimeType, label, done, total); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$SSHDataImplCopyWith<_$SSHDataImpl> get copyWith => - __$$SSHDataImplCopyWithImpl<_$SSHDataImpl>(this, _$identity); + _$$TaskProgressImplCopyWith<_$TaskProgressImpl> get copyWith => + __$$TaskProgressImplCopyWithImpl<_$TaskProgressImpl>(this, _$identity); @override Map toJson() { - return _$$SSHDataImplToJson( + return _$$TaskProgressImplToJson( this, ); } } -abstract class _SSHData implements SSHData { - const factory _SSHData( - {required final bool installServer, - required final bool allowPw, - final List authorizedKeys}) = _$SSHDataImpl; +abstract class _TaskProgress implements TaskProgress { + const factory _TaskProgress( + {final String label, + final int done, + final int total}) = _$TaskProgressImpl; - factory _SSHData.fromJson(Map json) = _$SSHDataImpl.fromJson; + factory _TaskProgress.fromJson(Map json) = + _$TaskProgressImpl.fromJson; @override - bool get installServer; + String get label; @override - bool get allowPw; + int get done; @override - List get authorizedKeys; + int get total; @override @JsonKey(ignore: true) - _$$SSHDataImplCopyWith<_$SSHDataImpl> get copyWith => + _$$TaskProgressImplCopyWith<_$TaskProgressImpl> get copyWith => throw _privateConstructorUsedError; } -SSHIdentity _$SSHIdentityFromJson(Map json) { - return _SSHIdentity.fromJson(json); +Task _$TaskFromJson(Map json) { + return _Task.fromJson(json); } /// @nodoc -mixin _$SSHIdentity { - String get keyType => throw _privateConstructorUsedError; - String get key => throw _privateConstructorUsedError; - String get keyComment => throw _privateConstructorUsedError; - String get keyFingerprint => throw _privateConstructorUsedError; +mixin _$Task { + String get id => throw _privateConstructorUsedError; + String get kind => throw _privateConstructorUsedError; + String get summary => throw _privateConstructorUsedError; + TaskStatus get status => throw _privateConstructorUsedError; + TaskProgress get progress => throw _privateConstructorUsedError; Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $SSHIdentityCopyWith get copyWith => - throw _privateConstructorUsedError; + $TaskCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class $SSHIdentityCopyWith<$Res> { - factory $SSHIdentityCopyWith( - SSHIdentity value, $Res Function(SSHIdentity) then) = - _$SSHIdentityCopyWithImpl<$Res, SSHIdentity>; +abstract class $TaskCopyWith<$Res> { + factory $TaskCopyWith(Task value, $Res Function(Task) then) = + _$TaskCopyWithImpl<$Res, Task>; @useResult $Res call( - {String keyType, String key, String keyComment, String keyFingerprint}); + {String id, + String kind, + String summary, + TaskStatus status, + TaskProgress progress}); + + $TaskProgressCopyWith<$Res> get progress; } /// @nodoc -class _$SSHIdentityCopyWithImpl<$Res, $Val extends SSHIdentity> - implements $SSHIdentityCopyWith<$Res> { - _$SSHIdentityCopyWithImpl(this._value, this._then); +class _$TaskCopyWithImpl<$Res, $Val extends Task> + implements $TaskCopyWith<$Res> { + _$TaskCopyWithImpl(this._value, this._then); // ignore: unused_field final $Val _value; @@ -9447,193 +7691,231 @@ class _$SSHIdentityCopyWithImpl<$Res, $Val extends SSHIdentity> @pragma('vm:prefer-inline') @override $Res call({ - Object? keyType = null, - Object? key = null, - Object? keyComment = null, - Object? keyFingerprint = null, + Object? id = null, + Object? kind = null, + Object? summary = null, + Object? status = null, + Object? progress = null, }) { return _then(_value.copyWith( - keyType: null == keyType - ? _value.keyType - : keyType // ignore: cast_nullable_to_non_nullable - as String, - key: null == key - ? _value.key - : key // ignore: cast_nullable_to_non_nullable + id: null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable as String, - keyComment: null == keyComment - ? _value.keyComment - : keyComment // ignore: cast_nullable_to_non_nullable + kind: null == kind + ? _value.kind + : kind // ignore: cast_nullable_to_non_nullable as String, - keyFingerprint: null == keyFingerprint - ? _value.keyFingerprint - : keyFingerprint // ignore: cast_nullable_to_non_nullable + summary: null == summary + ? _value.summary + : summary // ignore: cast_nullable_to_non_nullable as String, + status: null == status + ? _value.status + : status // ignore: cast_nullable_to_non_nullable + as TaskStatus, + progress: null == progress + ? _value.progress + : progress // ignore: cast_nullable_to_non_nullable + as TaskProgress, ) as $Val); } + + @override + @pragma('vm:prefer-inline') + $TaskProgressCopyWith<$Res> get progress { + return $TaskProgressCopyWith<$Res>(_value.progress, (value) { + return _then(_value.copyWith(progress: value) as $Val); + }); + } } /// @nodoc -abstract class _$$SSHIdentityImplCopyWith<$Res> - implements $SSHIdentityCopyWith<$Res> { - factory _$$SSHIdentityImplCopyWith( - _$SSHIdentityImpl value, $Res Function(_$SSHIdentityImpl) then) = - __$$SSHIdentityImplCopyWithImpl<$Res>; +abstract class _$$TaskImplCopyWith<$Res> implements $TaskCopyWith<$Res> { + factory _$$TaskImplCopyWith( + _$TaskImpl value, $Res Function(_$TaskImpl) then) = + __$$TaskImplCopyWithImpl<$Res>; @override @useResult $Res call( - {String keyType, String key, String keyComment, String keyFingerprint}); + {String id, + String kind, + String summary, + TaskStatus status, + TaskProgress progress}); + + @override + $TaskProgressCopyWith<$Res> get progress; } /// @nodoc -class __$$SSHIdentityImplCopyWithImpl<$Res> - extends _$SSHIdentityCopyWithImpl<$Res, _$SSHIdentityImpl> - implements _$$SSHIdentityImplCopyWith<$Res> { - __$$SSHIdentityImplCopyWithImpl( - _$SSHIdentityImpl _value, $Res Function(_$SSHIdentityImpl) _then) +class __$$TaskImplCopyWithImpl<$Res> + extends _$TaskCopyWithImpl<$Res, _$TaskImpl> + implements _$$TaskImplCopyWith<$Res> { + __$$TaskImplCopyWithImpl(_$TaskImpl _value, $Res Function(_$TaskImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? keyType = null, - Object? key = null, - Object? keyComment = null, - Object? keyFingerprint = null, + Object? id = null, + Object? kind = null, + Object? summary = null, + Object? status = null, + Object? progress = null, }) { - return _then(_$SSHIdentityImpl( - keyType: null == keyType - ? _value.keyType - : keyType // ignore: cast_nullable_to_non_nullable - as String, - key: null == key - ? _value.key - : key // ignore: cast_nullable_to_non_nullable + return _then(_$TaskImpl( + id: null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable as String, - keyComment: null == keyComment - ? _value.keyComment - : keyComment // ignore: cast_nullable_to_non_nullable + kind: null == kind + ? _value.kind + : kind // ignore: cast_nullable_to_non_nullable as String, - keyFingerprint: null == keyFingerprint - ? _value.keyFingerprint - : keyFingerprint // ignore: cast_nullable_to_non_nullable + summary: null == summary + ? _value.summary + : summary // ignore: cast_nullable_to_non_nullable as String, + status: null == status + ? _value.status + : status // ignore: cast_nullable_to_non_nullable + as TaskStatus, + progress: null == progress + ? _value.progress + : progress // ignore: cast_nullable_to_non_nullable + as TaskProgress, )); } } /// @nodoc @JsonSerializable() -class _$SSHIdentityImpl implements _SSHIdentity { - const _$SSHIdentityImpl( - {required this.keyType, - required this.key, - required this.keyComment, - required this.keyFingerprint}); - - factory _$SSHIdentityImpl.fromJson(Map json) => - _$$SSHIdentityImplFromJson(json); +class _$TaskImpl implements _Task { + const _$TaskImpl( + {required this.id, + required this.kind, + required this.summary, + required this.status, + required this.progress}); + + factory _$TaskImpl.fromJson(Map json) => + _$$TaskImplFromJson(json); @override - final String keyType; + final String id; @override - final String key; + final String kind; @override - final String keyComment; + final String summary; @override - final String keyFingerprint; + final TaskStatus status; + @override + final TaskProgress progress; @override String toString() { - return 'SSHIdentity(keyType: $keyType, key: $key, keyComment: $keyComment, keyFingerprint: $keyFingerprint)'; + return 'Task(id: $id, kind: $kind, summary: $summary, status: $status, progress: $progress)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$SSHIdentityImpl && - (identical(other.keyType, keyType) || other.keyType == keyType) && - (identical(other.key, key) || other.key == key) && - (identical(other.keyComment, keyComment) || - other.keyComment == keyComment) && - (identical(other.keyFingerprint, keyFingerprint) || - other.keyFingerprint == keyFingerprint)); + other is _$TaskImpl && + (identical(other.id, id) || other.id == id) && + (identical(other.kind, kind) || other.kind == kind) && + (identical(other.summary, summary) || other.summary == summary) && + (identical(other.status, status) || other.status == status) && + (identical(other.progress, progress) || + other.progress == progress)); } @JsonKey(ignore: true) @override int get hashCode => - Object.hash(runtimeType, keyType, key, keyComment, keyFingerprint); + Object.hash(runtimeType, id, kind, summary, status, progress); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$SSHIdentityImplCopyWith<_$SSHIdentityImpl> get copyWith => - __$$SSHIdentityImplCopyWithImpl<_$SSHIdentityImpl>(this, _$identity); + _$$TaskImplCopyWith<_$TaskImpl> get copyWith => + __$$TaskImplCopyWithImpl<_$TaskImpl>(this, _$identity); @override Map toJson() { - return _$$SSHIdentityImplToJson( + return _$$TaskImplToJson( this, ); } } -abstract class _SSHIdentity implements SSHIdentity { - const factory _SSHIdentity( - {required final String keyType, - required final String key, - required final String keyComment, - required final String keyFingerprint}) = _$SSHIdentityImpl; +abstract class _Task implements Task { + const factory _Task( + {required final String id, + required final String kind, + required final String summary, + required final TaskStatus status, + required final TaskProgress progress}) = _$TaskImpl; - factory _SSHIdentity.fromJson(Map json) = - _$SSHIdentityImpl.fromJson; + factory _Task.fromJson(Map json) = _$TaskImpl.fromJson; @override - String get keyType; + String get id; @override - String get key; + String get kind; @override - String get keyComment; + String get summary; @override - String get keyFingerprint; + TaskStatus get status; + @override + TaskProgress get progress; @override @JsonKey(ignore: true) - _$$SSHIdentityImplCopyWith<_$SSHIdentityImpl> get copyWith => + _$$TaskImplCopyWith<_$TaskImpl> get copyWith => throw _privateConstructorUsedError; } -SSHFetchIdResponse _$SSHFetchIdResponseFromJson(Map json) { - return _SSHFetchIdResponse.fromJson(json); +Change _$ChangeFromJson(Map json) { + return _Change.fromJson(json); } /// @nodoc -mixin _$SSHFetchIdResponse { - SSHFetchIdStatus get status => throw _privateConstructorUsedError; - List? get identities => throw _privateConstructorUsedError; - String? get error => throw _privateConstructorUsedError; +mixin _$Change { + String get id => throw _privateConstructorUsedError; + String get kind => throw _privateConstructorUsedError; + String get summary => throw _privateConstructorUsedError; + TaskStatus get status => throw _privateConstructorUsedError; + List get tasks => throw _privateConstructorUsedError; + bool get ready => throw _privateConstructorUsedError; + String? get err => throw _privateConstructorUsedError; + dynamic get data => throw _privateConstructorUsedError; Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $SSHFetchIdResponseCopyWith get copyWith => - throw _privateConstructorUsedError; + $ChangeCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class $SSHFetchIdResponseCopyWith<$Res> { - factory $SSHFetchIdResponseCopyWith( - SSHFetchIdResponse value, $Res Function(SSHFetchIdResponse) then) = - _$SSHFetchIdResponseCopyWithImpl<$Res, SSHFetchIdResponse>; +abstract class $ChangeCopyWith<$Res> { + factory $ChangeCopyWith(Change value, $Res Function(Change) then) = + _$ChangeCopyWithImpl<$Res, Change>; @useResult $Res call( - {SSHFetchIdStatus status, List? identities, String? error}); + {String id, + String kind, + String summary, + TaskStatus status, + List tasks, + bool ready, + String? err, + dynamic data}); } /// @nodoc -class _$SSHFetchIdResponseCopyWithImpl<$Res, $Val extends SSHFetchIdResponse> - implements $SSHFetchIdResponseCopyWith<$Res> { - _$SSHFetchIdResponseCopyWithImpl(this._value, this._then); +class _$ChangeCopyWithImpl<$Res, $Val extends Change> + implements $ChangeCopyWith<$Res> { + _$ChangeCopyWithImpl(this._value, this._then); // ignore: unused_field final $Val _value; @@ -9643,193 +7925,278 @@ class _$SSHFetchIdResponseCopyWithImpl<$Res, $Val extends SSHFetchIdResponse> @pragma('vm:prefer-inline') @override $Res call({ + Object? id = null, + Object? kind = null, + Object? summary = null, Object? status = null, - Object? identities = freezed, - Object? error = freezed, + Object? tasks = null, + Object? ready = null, + Object? err = freezed, + Object? data = freezed, }) { return _then(_value.copyWith( + id: null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as String, + kind: null == kind + ? _value.kind + : kind // ignore: cast_nullable_to_non_nullable + as String, + summary: null == summary + ? _value.summary + : summary // ignore: cast_nullable_to_non_nullable + as String, status: null == status ? _value.status : status // ignore: cast_nullable_to_non_nullable - as SSHFetchIdStatus, - identities: freezed == identities - ? _value.identities - : identities // ignore: cast_nullable_to_non_nullable - as List?, - error: freezed == error - ? _value.error - : error // ignore: cast_nullable_to_non_nullable + as TaskStatus, + tasks: null == tasks + ? _value.tasks + : tasks // ignore: cast_nullable_to_non_nullable + as List, + ready: null == ready + ? _value.ready + : ready // ignore: cast_nullable_to_non_nullable + as bool, + err: freezed == err + ? _value.err + : err // ignore: cast_nullable_to_non_nullable as String?, + data: freezed == data + ? _value.data + : data // ignore: cast_nullable_to_non_nullable + as dynamic, ) as $Val); } } /// @nodoc -abstract class _$$SSHFetchIdResponseImplCopyWith<$Res> - implements $SSHFetchIdResponseCopyWith<$Res> { - factory _$$SSHFetchIdResponseImplCopyWith(_$SSHFetchIdResponseImpl value, - $Res Function(_$SSHFetchIdResponseImpl) then) = - __$$SSHFetchIdResponseImplCopyWithImpl<$Res>; +abstract class _$$ChangeImplCopyWith<$Res> implements $ChangeCopyWith<$Res> { + factory _$$ChangeImplCopyWith( + _$ChangeImpl value, $Res Function(_$ChangeImpl) then) = + __$$ChangeImplCopyWithImpl<$Res>; @override @useResult $Res call( - {SSHFetchIdStatus status, List? identities, String? error}); + {String id, + String kind, + String summary, + TaskStatus status, + List tasks, + bool ready, + String? err, + dynamic data}); } /// @nodoc -class __$$SSHFetchIdResponseImplCopyWithImpl<$Res> - extends _$SSHFetchIdResponseCopyWithImpl<$Res, _$SSHFetchIdResponseImpl> - implements _$$SSHFetchIdResponseImplCopyWith<$Res> { - __$$SSHFetchIdResponseImplCopyWithImpl(_$SSHFetchIdResponseImpl _value, - $Res Function(_$SSHFetchIdResponseImpl) _then) +class __$$ChangeImplCopyWithImpl<$Res> + extends _$ChangeCopyWithImpl<$Res, _$ChangeImpl> + implements _$$ChangeImplCopyWith<$Res> { + __$$ChangeImplCopyWithImpl( + _$ChangeImpl _value, $Res Function(_$ChangeImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ + Object? id = null, + Object? kind = null, + Object? summary = null, Object? status = null, - Object? identities = freezed, - Object? error = freezed, + Object? tasks = null, + Object? ready = null, + Object? err = freezed, + Object? data = freezed, }) { - return _then(_$SSHFetchIdResponseImpl( + return _then(_$ChangeImpl( + id: null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as String, + kind: null == kind + ? _value.kind + : kind // ignore: cast_nullable_to_non_nullable + as String, + summary: null == summary + ? _value.summary + : summary // ignore: cast_nullable_to_non_nullable + as String, status: null == status ? _value.status : status // ignore: cast_nullable_to_non_nullable - as SSHFetchIdStatus, - identities: freezed == identities - ? _value._identities - : identities // ignore: cast_nullable_to_non_nullable - as List?, - error: freezed == error - ? _value.error - : error // ignore: cast_nullable_to_non_nullable + as TaskStatus, + tasks: null == tasks + ? _value._tasks + : tasks // ignore: cast_nullable_to_non_nullable + as List, + ready: null == ready + ? _value.ready + : ready // ignore: cast_nullable_to_non_nullable + as bool, + err: freezed == err + ? _value.err + : err // ignore: cast_nullable_to_non_nullable as String?, + data: freezed == data + ? _value.data + : data // ignore: cast_nullable_to_non_nullable + as dynamic, )); } } /// @nodoc @JsonSerializable() -class _$SSHFetchIdResponseImpl implements _SSHFetchIdResponse { - const _$SSHFetchIdResponseImpl( - {required this.status, - required final List? identities, - required this.error}) - : _identities = identities; +class _$ChangeImpl implements _Change { + const _$ChangeImpl( + {required this.id, + required this.kind, + required this.summary, + required this.status, + required final List tasks, + required this.ready, + this.err, + this.data}) + : _tasks = tasks; - factory _$SSHFetchIdResponseImpl.fromJson(Map json) => - _$$SSHFetchIdResponseImplFromJson(json); + factory _$ChangeImpl.fromJson(Map json) => + _$$ChangeImplFromJson(json); @override - final SSHFetchIdStatus status; - final List? _identities; + final String id; @override - List? get identities { - final value = _identities; - if (value == null) return null; - if (_identities is EqualUnmodifiableListView) return _identities; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(value); + final String kind; + @override + final String summary; + @override + final TaskStatus status; + final List _tasks; + @override + List get tasks { + if (_tasks is EqualUnmodifiableListView) return _tasks; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_tasks); } @override - final String? error; + final bool ready; + @override + final String? err; + @override + final dynamic data; @override String toString() { - return 'SSHFetchIdResponse(status: $status, identities: $identities, error: $error)'; + return 'Change(id: $id, kind: $kind, summary: $summary, status: $status, tasks: $tasks, ready: $ready, err: $err, data: $data)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$SSHFetchIdResponseImpl && + other is _$ChangeImpl && + (identical(other.id, id) || other.id == id) && + (identical(other.kind, kind) || other.kind == kind) && + (identical(other.summary, summary) || other.summary == summary) && (identical(other.status, status) || other.status == status) && - const DeepCollectionEquality() - .equals(other._identities, _identities) && - (identical(other.error, error) || other.error == error)); + const DeepCollectionEquality().equals(other._tasks, _tasks) && + (identical(other.ready, ready) || other.ready == ready) && + (identical(other.err, err) || other.err == err) && + const DeepCollectionEquality().equals(other.data, data)); } @JsonKey(ignore: true) @override - int get hashCode => Object.hash(runtimeType, status, - const DeepCollectionEquality().hash(_identities), error); + int get hashCode => Object.hash( + runtimeType, + id, + kind, + summary, + status, + const DeepCollectionEquality().hash(_tasks), + ready, + err, + const DeepCollectionEquality().hash(data)); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$SSHFetchIdResponseImplCopyWith<_$SSHFetchIdResponseImpl> get copyWith => - __$$SSHFetchIdResponseImplCopyWithImpl<_$SSHFetchIdResponseImpl>( - this, _$identity); + _$$ChangeImplCopyWith<_$ChangeImpl> get copyWith => + __$$ChangeImplCopyWithImpl<_$ChangeImpl>(this, _$identity); @override Map toJson() { - return _$$SSHFetchIdResponseImplToJson( + return _$$ChangeImplToJson( this, ); } } -abstract class _SSHFetchIdResponse implements SSHFetchIdResponse { - const factory _SSHFetchIdResponse( - {required final SSHFetchIdStatus status, - required final List? identities, - required final String? error}) = _$SSHFetchIdResponseImpl; +abstract class _Change implements Change { + const factory _Change( + {required final String id, + required final String kind, + required final String summary, + required final TaskStatus status, + required final List tasks, + required final bool ready, + final String? err, + final dynamic data}) = _$ChangeImpl; - factory _SSHFetchIdResponse.fromJson(Map json) = - _$SSHFetchIdResponseImpl.fromJson; + factory _Change.fromJson(Map json) = _$ChangeImpl.fromJson; @override - SSHFetchIdStatus get status; + String get id; @override - List? get identities; + String get kind; @override - String? get error; + String get summary; + @override + TaskStatus get status; + @override + List get tasks; + @override + bool get ready; + @override + String? get err; + @override + dynamic get data; @override @JsonKey(ignore: true) - _$$SSHFetchIdResponseImplCopyWith<_$SSHFetchIdResponseImpl> get copyWith => + _$$ChangeImplCopyWith<_$ChangeImpl> get copyWith => throw _privateConstructorUsedError; } -ChannelSnapInfo _$ChannelSnapInfoFromJson(Map json) { - return _ChannelSnapInfo.fromJson(json); +MirrorCheckResponse _$MirrorCheckResponseFromJson(Map json) { + return _MirrorCheckResponse.fromJson(json); } /// @nodoc -mixin _$ChannelSnapInfo { - String get channelName => throw _privateConstructorUsedError; - String get revision => throw _privateConstructorUsedError; - String get confinement => throw _privateConstructorUsedError; - String get version => throw _privateConstructorUsedError; - int get size => throw _privateConstructorUsedError; - DateTime get releasedAt => throw _privateConstructorUsedError; +mixin _$MirrorCheckResponse { + String get url => throw _privateConstructorUsedError; + MirrorCheckStatus get status => throw _privateConstructorUsedError; + String get output => throw _privateConstructorUsedError; Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $ChannelSnapInfoCopyWith get copyWith => + $MirrorCheckResponseCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class $ChannelSnapInfoCopyWith<$Res> { - factory $ChannelSnapInfoCopyWith( - ChannelSnapInfo value, $Res Function(ChannelSnapInfo) then) = - _$ChannelSnapInfoCopyWithImpl<$Res, ChannelSnapInfo>; +abstract class $MirrorCheckResponseCopyWith<$Res> { + factory $MirrorCheckResponseCopyWith( + MirrorCheckResponse value, $Res Function(MirrorCheckResponse) then) = + _$MirrorCheckResponseCopyWithImpl<$Res, MirrorCheckResponse>; @useResult - $Res call( - {String channelName, - String revision, - String confinement, - String version, - int size, - DateTime releasedAt}); + $Res call({String url, MirrorCheckStatus status, String output}); } /// @nodoc -class _$ChannelSnapInfoCopyWithImpl<$Res, $Val extends ChannelSnapInfo> - implements $ChannelSnapInfoCopyWith<$Res> { - _$ChannelSnapInfoCopyWithImpl(this._value, this._then); +class _$MirrorCheckResponseCopyWithImpl<$Res, $Val extends MirrorCheckResponse> + implements $MirrorCheckResponseCopyWith<$Res> { + _$MirrorCheckResponseCopyWithImpl(this._value, this._then); // ignore: unused_field final $Val _value; @@ -9839,248 +8206,175 @@ class _$ChannelSnapInfoCopyWithImpl<$Res, $Val extends ChannelSnapInfo> @pragma('vm:prefer-inline') @override $Res call({ - Object? channelName = null, - Object? revision = null, - Object? confinement = null, - Object? version = null, - Object? size = null, - Object? releasedAt = null, + Object? url = null, + Object? status = null, + Object? output = null, }) { return _then(_value.copyWith( - channelName: null == channelName - ? _value.channelName - : channelName // ignore: cast_nullable_to_non_nullable - as String, - revision: null == revision - ? _value.revision - : revision // ignore: cast_nullable_to_non_nullable - as String, - confinement: null == confinement - ? _value.confinement - : confinement // ignore: cast_nullable_to_non_nullable + url: null == url + ? _value.url + : url // ignore: cast_nullable_to_non_nullable as String, - version: null == version - ? _value.version - : version // ignore: cast_nullable_to_non_nullable + status: null == status + ? _value.status + : status // ignore: cast_nullable_to_non_nullable + as MirrorCheckStatus, + output: null == output + ? _value.output + : output // ignore: cast_nullable_to_non_nullable as String, - size: null == size - ? _value.size - : size // ignore: cast_nullable_to_non_nullable - as int, - releasedAt: null == releasedAt - ? _value.releasedAt - : releasedAt // ignore: cast_nullable_to_non_nullable - as DateTime, ) as $Val); } } /// @nodoc -abstract class _$$ChannelSnapInfoImplCopyWith<$Res> - implements $ChannelSnapInfoCopyWith<$Res> { - factory _$$ChannelSnapInfoImplCopyWith(_$ChannelSnapInfoImpl value, - $Res Function(_$ChannelSnapInfoImpl) then) = - __$$ChannelSnapInfoImplCopyWithImpl<$Res>; +abstract class _$$MirrorCheckResponseImplCopyWith<$Res> + implements $MirrorCheckResponseCopyWith<$Res> { + factory _$$MirrorCheckResponseImplCopyWith(_$MirrorCheckResponseImpl value, + $Res Function(_$MirrorCheckResponseImpl) then) = + __$$MirrorCheckResponseImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {String channelName, - String revision, - String confinement, - String version, - int size, - DateTime releasedAt}); + $Res call({String url, MirrorCheckStatus status, String output}); } /// @nodoc -class __$$ChannelSnapInfoImplCopyWithImpl<$Res> - extends _$ChannelSnapInfoCopyWithImpl<$Res, _$ChannelSnapInfoImpl> - implements _$$ChannelSnapInfoImplCopyWith<$Res> { - __$$ChannelSnapInfoImplCopyWithImpl( - _$ChannelSnapInfoImpl _value, $Res Function(_$ChannelSnapInfoImpl) _then) +class __$$MirrorCheckResponseImplCopyWithImpl<$Res> + extends _$MirrorCheckResponseCopyWithImpl<$Res, _$MirrorCheckResponseImpl> + implements _$$MirrorCheckResponseImplCopyWith<$Res> { + __$$MirrorCheckResponseImplCopyWithImpl(_$MirrorCheckResponseImpl _value, + $Res Function(_$MirrorCheckResponseImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? channelName = null, - Object? revision = null, - Object? confinement = null, - Object? version = null, - Object? size = null, - Object? releasedAt = null, + Object? url = null, + Object? status = null, + Object? output = null, }) { - return _then(_$ChannelSnapInfoImpl( - channelName: null == channelName - ? _value.channelName - : channelName // ignore: cast_nullable_to_non_nullable - as String, - revision: null == revision - ? _value.revision - : revision // ignore: cast_nullable_to_non_nullable - as String, - confinement: null == confinement - ? _value.confinement - : confinement // ignore: cast_nullable_to_non_nullable + return _then(_$MirrorCheckResponseImpl( + url: null == url + ? _value.url + : url // ignore: cast_nullable_to_non_nullable as String, - version: null == version - ? _value.version - : version // ignore: cast_nullable_to_non_nullable + status: null == status + ? _value.status + : status // ignore: cast_nullable_to_non_nullable + as MirrorCheckStatus, + output: null == output + ? _value.output + : output // ignore: cast_nullable_to_non_nullable as String, - size: null == size - ? _value.size - : size // ignore: cast_nullable_to_non_nullable - as int, - releasedAt: null == releasedAt - ? _value.releasedAt - : releasedAt // ignore: cast_nullable_to_non_nullable - as DateTime, )); } } /// @nodoc @JsonSerializable() -class _$ChannelSnapInfoImpl implements _ChannelSnapInfo { - const _$ChannelSnapInfoImpl( - {required this.channelName, - required this.revision, - required this.confinement, - required this.version, - required this.size, - required this.releasedAt}); +class _$MirrorCheckResponseImpl implements _MirrorCheckResponse { + const _$MirrorCheckResponseImpl( + {required this.url, required this.status, required this.output}); - factory _$ChannelSnapInfoImpl.fromJson(Map json) => - _$$ChannelSnapInfoImplFromJson(json); + factory _$MirrorCheckResponseImpl.fromJson(Map json) => + _$$MirrorCheckResponseImplFromJson(json); @override - final String channelName; + final String url; @override - final String revision; - @override - final String confinement; - @override - final String version; - @override - final int size; + final MirrorCheckStatus status; @override - final DateTime releasedAt; + final String output; @override String toString() { - return 'ChannelSnapInfo(channelName: $channelName, revision: $revision, confinement: $confinement, version: $version, size: $size, releasedAt: $releasedAt)'; + return 'MirrorCheckResponse(url: $url, status: $status, output: $output)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$ChannelSnapInfoImpl && - (identical(other.channelName, channelName) || - other.channelName == channelName) && - (identical(other.revision, revision) || - other.revision == revision) && - (identical(other.confinement, confinement) || - other.confinement == confinement) && - (identical(other.version, version) || other.version == version) && - (identical(other.size, size) || other.size == size) && - (identical(other.releasedAt, releasedAt) || - other.releasedAt == releasedAt)); + other is _$MirrorCheckResponseImpl && + (identical(other.url, url) || other.url == url) && + (identical(other.status, status) || other.status == status) && + (identical(other.output, output) || other.output == output)); } @JsonKey(ignore: true) @override - int get hashCode => Object.hash(runtimeType, channelName, revision, - confinement, version, size, releasedAt); + int get hashCode => Object.hash(runtimeType, url, status, output); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$ChannelSnapInfoImplCopyWith<_$ChannelSnapInfoImpl> get copyWith => - __$$ChannelSnapInfoImplCopyWithImpl<_$ChannelSnapInfoImpl>( + _$$MirrorCheckResponseImplCopyWith<_$MirrorCheckResponseImpl> get copyWith => + __$$MirrorCheckResponseImplCopyWithImpl<_$MirrorCheckResponseImpl>( this, _$identity); @override Map toJson() { - return _$$ChannelSnapInfoImplToJson( + return _$$MirrorCheckResponseImplToJson( this, ); } } -abstract class _ChannelSnapInfo implements ChannelSnapInfo { - const factory _ChannelSnapInfo( - {required final String channelName, - required final String revision, - required final String confinement, - required final String version, - required final int size, - required final DateTime releasedAt}) = _$ChannelSnapInfoImpl; +abstract class _MirrorCheckResponse implements MirrorCheckResponse { + const factory _MirrorCheckResponse( + {required final String url, + required final MirrorCheckStatus status, + required final String output}) = _$MirrorCheckResponseImpl; - factory _ChannelSnapInfo.fromJson(Map json) = - _$ChannelSnapInfoImpl.fromJson; + factory _MirrorCheckResponse.fromJson(Map json) = + _$MirrorCheckResponseImpl.fromJson; @override - String get channelName; - @override - String get revision; - @override - String get confinement; - @override - String get version; + String get url; @override - int get size; + MirrorCheckStatus get status; @override - DateTime get releasedAt; + String get output; @override @JsonKey(ignore: true) - _$$ChannelSnapInfoImplCopyWith<_$ChannelSnapInfoImpl> get copyWith => + _$$MirrorCheckResponseImplCopyWith<_$MirrorCheckResponseImpl> get copyWith => throw _privateConstructorUsedError; } -SnapInfo _$SnapInfoFromJson(Map json) { - return _SnapInfo.fromJson(json); +MirrorPost _$MirrorPostFromJson(Map json) { + return _MirrorPost.fromJson(json); } /// @nodoc -mixin _$SnapInfo { - String get name => throw _privateConstructorUsedError; - String get summary => throw _privateConstructorUsedError; - String get publisher => throw _privateConstructorUsedError; - bool get verified => throw _privateConstructorUsedError; - bool get starred => throw _privateConstructorUsedError; - String get description => throw _privateConstructorUsedError; - String get confinement => throw _privateConstructorUsedError; - String get license => throw _privateConstructorUsedError; - List get channels => throw _privateConstructorUsedError; +mixin _$MirrorPost { + String? get elected => throw _privateConstructorUsedError; + List? get candidates => throw _privateConstructorUsedError; + String? get staged => throw _privateConstructorUsedError; + bool? get useDuringInstallation => throw _privateConstructorUsedError; Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $SnapInfoCopyWith get copyWith => + $MirrorPostCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class $SnapInfoCopyWith<$Res> { - factory $SnapInfoCopyWith(SnapInfo value, $Res Function(SnapInfo) then) = - _$SnapInfoCopyWithImpl<$Res, SnapInfo>; +abstract class $MirrorPostCopyWith<$Res> { + factory $MirrorPostCopyWith( + MirrorPost value, $Res Function(MirrorPost) then) = + _$MirrorPostCopyWithImpl<$Res, MirrorPost>; @useResult $Res call( - {String name, - String summary, - String publisher, - bool verified, - bool starred, - String description, - String confinement, - String license, - List channels}); + {String? elected, + List? candidates, + String? staged, + bool? useDuringInstallation}); } /// @nodoc -class _$SnapInfoCopyWithImpl<$Res, $Val extends SnapInfo> - implements $SnapInfoCopyWith<$Res> { - _$SnapInfoCopyWithImpl(this._value, this._then); +class _$MirrorPostCopyWithImpl<$Res, $Val extends MirrorPost> + implements $MirrorPostCopyWith<$Res> { + _$MirrorPostCopyWithImpl(this._value, this._then); // ignore: unused_field final $Val _value; @@ -10090,315 +8384,214 @@ class _$SnapInfoCopyWithImpl<$Res, $Val extends SnapInfo> @pragma('vm:prefer-inline') @override $Res call({ - Object? name = null, - Object? summary = null, - Object? publisher = null, - Object? verified = null, - Object? starred = null, - Object? description = null, - Object? confinement = null, - Object? license = null, - Object? channels = null, + Object? elected = freezed, + Object? candidates = freezed, + Object? staged = freezed, + Object? useDuringInstallation = freezed, }) { return _then(_value.copyWith( - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - summary: null == summary - ? _value.summary - : summary // ignore: cast_nullable_to_non_nullable - as String, - publisher: null == publisher - ? _value.publisher - : publisher // ignore: cast_nullable_to_non_nullable - as String, - verified: null == verified - ? _value.verified - : verified // ignore: cast_nullable_to_non_nullable - as bool, - starred: null == starred - ? _value.starred - : starred // ignore: cast_nullable_to_non_nullable - as bool, - description: null == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String, - confinement: null == confinement - ? _value.confinement - : confinement // ignore: cast_nullable_to_non_nullable - as String, - license: null == license - ? _value.license - : license // ignore: cast_nullable_to_non_nullable - as String, - channels: null == channels - ? _value.channels - : channels // ignore: cast_nullable_to_non_nullable - as List, + elected: freezed == elected + ? _value.elected + : elected // ignore: cast_nullable_to_non_nullable + as String?, + candidates: freezed == candidates + ? _value.candidates + : candidates // ignore: cast_nullable_to_non_nullable + as List?, + staged: freezed == staged + ? _value.staged + : staged // ignore: cast_nullable_to_non_nullable + as String?, + useDuringInstallation: freezed == useDuringInstallation + ? _value.useDuringInstallation + : useDuringInstallation // ignore: cast_nullable_to_non_nullable + as bool?, ) as $Val); } } /// @nodoc -abstract class _$$SnapInfoImplCopyWith<$Res> - implements $SnapInfoCopyWith<$Res> { - factory _$$SnapInfoImplCopyWith( - _$SnapInfoImpl value, $Res Function(_$SnapInfoImpl) then) = - __$$SnapInfoImplCopyWithImpl<$Res>; +abstract class _$$MirrorPostImplCopyWith<$Res> + implements $MirrorPostCopyWith<$Res> { + factory _$$MirrorPostImplCopyWith( + _$MirrorPostImpl value, $Res Function(_$MirrorPostImpl) then) = + __$$MirrorPostImplCopyWithImpl<$Res>; @override @useResult $Res call( - {String name, - String summary, - String publisher, - bool verified, - bool starred, - String description, - String confinement, - String license, - List channels}); + {String? elected, + List? candidates, + String? staged, + bool? useDuringInstallation}); } /// @nodoc -class __$$SnapInfoImplCopyWithImpl<$Res> - extends _$SnapInfoCopyWithImpl<$Res, _$SnapInfoImpl> - implements _$$SnapInfoImplCopyWith<$Res> { - __$$SnapInfoImplCopyWithImpl( - _$SnapInfoImpl _value, $Res Function(_$SnapInfoImpl) _then) +class __$$MirrorPostImplCopyWithImpl<$Res> + extends _$MirrorPostCopyWithImpl<$Res, _$MirrorPostImpl> + implements _$$MirrorPostImplCopyWith<$Res> { + __$$MirrorPostImplCopyWithImpl( + _$MirrorPostImpl _value, $Res Function(_$MirrorPostImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? name = null, - Object? summary = null, - Object? publisher = null, - Object? verified = null, - Object? starred = null, - Object? description = null, - Object? confinement = null, - Object? license = null, - Object? channels = null, + Object? elected = freezed, + Object? candidates = freezed, + Object? staged = freezed, + Object? useDuringInstallation = freezed, }) { - return _then(_$SnapInfoImpl( - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - summary: null == summary - ? _value.summary - : summary // ignore: cast_nullable_to_non_nullable - as String, - publisher: null == publisher - ? _value.publisher - : publisher // ignore: cast_nullable_to_non_nullable - as String, - verified: null == verified - ? _value.verified - : verified // ignore: cast_nullable_to_non_nullable - as bool, - starred: null == starred - ? _value.starred - : starred // ignore: cast_nullable_to_non_nullable - as bool, - description: null == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String, - confinement: null == confinement - ? _value.confinement - : confinement // ignore: cast_nullable_to_non_nullable - as String, - license: null == license - ? _value.license - : license // ignore: cast_nullable_to_non_nullable - as String, - channels: null == channels - ? _value._channels - : channels // ignore: cast_nullable_to_non_nullable - as List, + return _then(_$MirrorPostImpl( + elected: freezed == elected + ? _value.elected + : elected // ignore: cast_nullable_to_non_nullable + as String?, + candidates: freezed == candidates + ? _value._candidates + : candidates // ignore: cast_nullable_to_non_nullable + as List?, + staged: freezed == staged + ? _value.staged + : staged // ignore: cast_nullable_to_non_nullable + as String?, + useDuringInstallation: freezed == useDuringInstallation + ? _value.useDuringInstallation + : useDuringInstallation // ignore: cast_nullable_to_non_nullable + as bool?, )); } } /// @nodoc @JsonSerializable() -class _$SnapInfoImpl implements _SnapInfo { - const _$SnapInfoImpl( - {required this.name, - this.summary = '', - this.publisher = '', - this.verified = false, - this.starred = false, - this.description = '', - this.confinement = '', - this.license = '', - final List channels = const []}) - : _channels = channels; +class _$MirrorPostImpl implements _MirrorPost { + const _$MirrorPostImpl( + {this.elected, + final List? candidates, + this.staged, + this.useDuringInstallation}) + : _candidates = candidates; - factory _$SnapInfoImpl.fromJson(Map json) => - _$$SnapInfoImplFromJson(json); + factory _$MirrorPostImpl.fromJson(Map json) => + _$$MirrorPostImplFromJson(json); @override - final String name; - @override - @JsonKey() - final String summary; - @override - @JsonKey() - final String publisher; - @override - @JsonKey() - final bool verified; - @override - @JsonKey() - final bool starred; - @override - @JsonKey() - final String description; - @override - @JsonKey() - final String confinement; - @override - @JsonKey() - final String license; - final List _channels; + final String? elected; + final List? _candidates; @override - @JsonKey() - List get channels { - if (_channels is EqualUnmodifiableListView) return _channels; + List? get candidates { + final value = _candidates; + if (value == null) return null; + if (_candidates is EqualUnmodifiableListView) return _candidates; // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_channels); + return EqualUnmodifiableListView(value); } + @override + final String? staged; + @override + final bool? useDuringInstallation; + @override String toString() { - return 'SnapInfo(name: $name, summary: $summary, publisher: $publisher, verified: $verified, starred: $starred, description: $description, confinement: $confinement, license: $license, channels: $channels)'; + return 'MirrorPost(elected: $elected, candidates: $candidates, staged: $staged, useDuringInstallation: $useDuringInstallation)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$SnapInfoImpl && - (identical(other.name, name) || other.name == name) && - (identical(other.summary, summary) || other.summary == summary) && - (identical(other.publisher, publisher) || - other.publisher == publisher) && - (identical(other.verified, verified) || - other.verified == verified) && - (identical(other.starred, starred) || other.starred == starred) && - (identical(other.description, description) || - other.description == description) && - (identical(other.confinement, confinement) || - other.confinement == confinement) && - (identical(other.license, license) || other.license == license) && - const DeepCollectionEquality().equals(other._channels, _channels)); + other is _$MirrorPostImpl && + (identical(other.elected, elected) || other.elected == elected) && + const DeepCollectionEquality() + .equals(other._candidates, _candidates) && + (identical(other.staged, staged) || other.staged == staged) && + (identical(other.useDuringInstallation, useDuringInstallation) || + other.useDuringInstallation == useDuringInstallation)); } @JsonKey(ignore: true) @override int get hashCode => Object.hash( runtimeType, - name, - summary, - publisher, - verified, - starred, - description, - confinement, - license, - const DeepCollectionEquality().hash(_channels)); + elected, + const DeepCollectionEquality().hash(_candidates), + staged, + useDuringInstallation); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$SnapInfoImplCopyWith<_$SnapInfoImpl> get copyWith => - __$$SnapInfoImplCopyWithImpl<_$SnapInfoImpl>(this, _$identity); + _$$MirrorPostImplCopyWith<_$MirrorPostImpl> get copyWith => + __$$MirrorPostImplCopyWithImpl<_$MirrorPostImpl>(this, _$identity); @override Map toJson() { - return _$$SnapInfoImplToJson( + return _$$MirrorPostImplToJson( this, ); } } -abstract class _SnapInfo implements SnapInfo { - const factory _SnapInfo( - {required final String name, - final String summary, - final String publisher, - final bool verified, - final bool starred, - final String description, - final String confinement, - final String license, - final List channels}) = _$SnapInfoImpl; +abstract class _MirrorPost implements MirrorPost { + const factory _MirrorPost( + {final String? elected, + final List? candidates, + final String? staged, + final bool? useDuringInstallation}) = _$MirrorPostImpl; - factory _SnapInfo.fromJson(Map json) = - _$SnapInfoImpl.fromJson; + factory _MirrorPost.fromJson(Map json) = + _$MirrorPostImpl.fromJson; @override - String get name; - @override - String get summary; - @override - String get publisher; - @override - bool get verified; - @override - bool get starred; - @override - String get description; + String? get elected; @override - String get confinement; + List? get candidates; @override - String get license; + String? get staged; @override - List get channels; + bool? get useDuringInstallation; @override @JsonKey(ignore: true) - _$$SnapInfoImplCopyWith<_$SnapInfoImpl> get copyWith => + _$$MirrorPostImplCopyWith<_$MirrorPostImpl> get copyWith => throw _privateConstructorUsedError; } -DriversResponse _$DriversResponseFromJson(Map json) { - return _DriversResponse.fromJson(json); +MirrorGet _$MirrorGetFromJson(Map json) { + return _MirrorGet.fromJson(json); } /// @nodoc -mixin _$DriversResponse { - bool get install => throw _privateConstructorUsedError; - List? get drivers => throw _privateConstructorUsedError; - bool get localOnly => throw _privateConstructorUsedError; - bool get searchDrivers => throw _privateConstructorUsedError; +mixin _$MirrorGet { + bool get relevant => throw _privateConstructorUsedError; + String? get elected => throw _privateConstructorUsedError; + List get candidates => throw _privateConstructorUsedError; + String? get staged => throw _privateConstructorUsedError; + bool get useDuringInstallation => throw _privateConstructorUsedError; Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $DriversResponseCopyWith get copyWith => + $MirrorGetCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class $DriversResponseCopyWith<$Res> { - factory $DriversResponseCopyWith( - DriversResponse value, $Res Function(DriversResponse) then) = - _$DriversResponseCopyWithImpl<$Res, DriversResponse>; +abstract class $MirrorGetCopyWith<$Res> { + factory $MirrorGetCopyWith(MirrorGet value, $Res Function(MirrorGet) then) = + _$MirrorGetCopyWithImpl<$Res, MirrorGet>; @useResult $Res call( - {bool install, - List? drivers, - bool localOnly, - bool searchDrivers}); + {bool relevant, + String? elected, + List candidates, + String? staged, + bool useDuringInstallation}); } /// @nodoc -class _$DriversResponseCopyWithImpl<$Res, $Val extends DriversResponse> - implements $DriversResponseCopyWith<$Res> { - _$DriversResponseCopyWithImpl(this._value, this._then); +class _$MirrorGetCopyWithImpl<$Res, $Val extends MirrorGet> + implements $MirrorGetCopyWith<$Res> { + _$MirrorGetCopyWithImpl(this._value, this._then); // ignore: unused_field final $Val _value; @@ -10408,79 +8601,90 @@ class _$DriversResponseCopyWithImpl<$Res, $Val extends DriversResponse> @pragma('vm:prefer-inline') @override $Res call({ - Object? install = null, - Object? drivers = freezed, - Object? localOnly = null, - Object? searchDrivers = null, + Object? relevant = null, + Object? elected = freezed, + Object? candidates = null, + Object? staged = freezed, + Object? useDuringInstallation = null, }) { return _then(_value.copyWith( - install: null == install - ? _value.install - : install // ignore: cast_nullable_to_non_nullable - as bool, - drivers: freezed == drivers - ? _value.drivers - : drivers // ignore: cast_nullable_to_non_nullable - as List?, - localOnly: null == localOnly - ? _value.localOnly - : localOnly // ignore: cast_nullable_to_non_nullable + relevant: null == relevant + ? _value.relevant + : relevant // ignore: cast_nullable_to_non_nullable as bool, - searchDrivers: null == searchDrivers - ? _value.searchDrivers - : searchDrivers // ignore: cast_nullable_to_non_nullable + elected: freezed == elected + ? _value.elected + : elected // ignore: cast_nullable_to_non_nullable + as String?, + candidates: null == candidates + ? _value.candidates + : candidates // ignore: cast_nullable_to_non_nullable + as List, + staged: freezed == staged + ? _value.staged + : staged // ignore: cast_nullable_to_non_nullable + as String?, + useDuringInstallation: null == useDuringInstallation + ? _value.useDuringInstallation + : useDuringInstallation // ignore: cast_nullable_to_non_nullable as bool, ) as $Val); } } /// @nodoc -abstract class _$$DriversResponseImplCopyWith<$Res> - implements $DriversResponseCopyWith<$Res> { - factory _$$DriversResponseImplCopyWith(_$DriversResponseImpl value, - $Res Function(_$DriversResponseImpl) then) = - __$$DriversResponseImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {bool install, - List? drivers, - bool localOnly, - bool searchDrivers}); +abstract class _$$MirrorGetImplCopyWith<$Res> + implements $MirrorGetCopyWith<$Res> { + factory _$$MirrorGetImplCopyWith( + _$MirrorGetImpl value, $Res Function(_$MirrorGetImpl) then) = + __$$MirrorGetImplCopyWithImpl<$Res>; + @override + @useResult + $Res call( + {bool relevant, + String? elected, + List candidates, + String? staged, + bool useDuringInstallation}); } /// @nodoc -class __$$DriversResponseImplCopyWithImpl<$Res> - extends _$DriversResponseCopyWithImpl<$Res, _$DriversResponseImpl> - implements _$$DriversResponseImplCopyWith<$Res> { - __$$DriversResponseImplCopyWithImpl( - _$DriversResponseImpl _value, $Res Function(_$DriversResponseImpl) _then) +class __$$MirrorGetImplCopyWithImpl<$Res> + extends _$MirrorGetCopyWithImpl<$Res, _$MirrorGetImpl> + implements _$$MirrorGetImplCopyWith<$Res> { + __$$MirrorGetImplCopyWithImpl( + _$MirrorGetImpl _value, $Res Function(_$MirrorGetImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? install = null, - Object? drivers = freezed, - Object? localOnly = null, - Object? searchDrivers = null, + Object? relevant = null, + Object? elected = freezed, + Object? candidates = null, + Object? staged = freezed, + Object? useDuringInstallation = null, }) { - return _then(_$DriversResponseImpl( - install: null == install - ? _value.install - : install // ignore: cast_nullable_to_non_nullable - as bool, - drivers: freezed == drivers - ? _value._drivers - : drivers // ignore: cast_nullable_to_non_nullable - as List?, - localOnly: null == localOnly - ? _value.localOnly - : localOnly // ignore: cast_nullable_to_non_nullable + return _then(_$MirrorGetImpl( + relevant: null == relevant + ? _value.relevant + : relevant // ignore: cast_nullable_to_non_nullable as bool, - searchDrivers: null == searchDrivers - ? _value.searchDrivers - : searchDrivers // ignore: cast_nullable_to_non_nullable + elected: freezed == elected + ? _value.elected + : elected // ignore: cast_nullable_to_non_nullable + as String?, + candidates: null == candidates + ? _value._candidates + : candidates // ignore: cast_nullable_to_non_nullable + as List, + staged: freezed == staged + ? _value.staged + : staged // ignore: cast_nullable_to_non_nullable + as String?, + useDuringInstallation: null == useDuringInstallation + ? _value.useDuringInstallation + : useDuringInstallation // ignore: cast_nullable_to_non_nullable as bool, )); } @@ -10488,123 +8692,135 @@ class __$$DriversResponseImplCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -class _$DriversResponseImpl implements _DriversResponse { - const _$DriversResponseImpl( - {required this.install, - required final List? drivers, - required this.localOnly, - required this.searchDrivers}) - : _drivers = drivers; +class _$MirrorGetImpl implements _MirrorGet { + const _$MirrorGetImpl( + {required this.relevant, + required this.elected, + required final List candidates, + required this.staged, + required this.useDuringInstallation}) + : _candidates = candidates; - factory _$DriversResponseImpl.fromJson(Map json) => - _$$DriversResponseImplFromJson(json); + factory _$MirrorGetImpl.fromJson(Map json) => + _$$MirrorGetImplFromJson(json); @override - final bool install; - final List? _drivers; + final bool relevant; @override - List? get drivers { - final value = _drivers; - if (value == null) return null; - if (_drivers is EqualUnmodifiableListView) return _drivers; + final String? elected; + final List _candidates; + @override + List get candidates { + if (_candidates is EqualUnmodifiableListView) return _candidates; // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(value); + return EqualUnmodifiableListView(_candidates); } @override - final bool localOnly; + final String? staged; @override - final bool searchDrivers; + final bool useDuringInstallation; @override String toString() { - return 'DriversResponse(install: $install, drivers: $drivers, localOnly: $localOnly, searchDrivers: $searchDrivers)'; + return 'MirrorGet(relevant: $relevant, elected: $elected, candidates: $candidates, staged: $staged, useDuringInstallation: $useDuringInstallation)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$DriversResponseImpl && - (identical(other.install, install) || other.install == install) && - const DeepCollectionEquality().equals(other._drivers, _drivers) && - (identical(other.localOnly, localOnly) || - other.localOnly == localOnly) && - (identical(other.searchDrivers, searchDrivers) || - other.searchDrivers == searchDrivers)); + other is _$MirrorGetImpl && + (identical(other.relevant, relevant) || + other.relevant == relevant) && + (identical(other.elected, elected) || other.elected == elected) && + const DeepCollectionEquality() + .equals(other._candidates, _candidates) && + (identical(other.staged, staged) || other.staged == staged) && + (identical(other.useDuringInstallation, useDuringInstallation) || + other.useDuringInstallation == useDuringInstallation)); } @JsonKey(ignore: true) @override - int get hashCode => Object.hash(runtimeType, install, - const DeepCollectionEquality().hash(_drivers), localOnly, searchDrivers); + int get hashCode => Object.hash( + runtimeType, + relevant, + elected, + const DeepCollectionEquality().hash(_candidates), + staged, + useDuringInstallation); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$DriversResponseImplCopyWith<_$DriversResponseImpl> get copyWith => - __$$DriversResponseImplCopyWithImpl<_$DriversResponseImpl>( - this, _$identity); + _$$MirrorGetImplCopyWith<_$MirrorGetImpl> get copyWith => + __$$MirrorGetImplCopyWithImpl<_$MirrorGetImpl>(this, _$identity); @override Map toJson() { - return _$$DriversResponseImplToJson( + return _$$MirrorGetImplToJson( this, ); } } -abstract class _DriversResponse implements DriversResponse { - const factory _DriversResponse( - {required final bool install, - required final List? drivers, - required final bool localOnly, - required final bool searchDrivers}) = _$DriversResponseImpl; +abstract class _MirrorGet implements MirrorGet { + const factory _MirrorGet( + {required final bool relevant, + required final String? elected, + required final List candidates, + required final String? staged, + required final bool useDuringInstallation}) = _$MirrorGetImpl; - factory _DriversResponse.fromJson(Map json) = - _$DriversResponseImpl.fromJson; + factory _MirrorGet.fromJson(Map json) = + _$MirrorGetImpl.fromJson; @override - bool get install; + bool get relevant; @override - List? get drivers; + String? get elected; @override - bool get localOnly; + List get candidates; @override - bool get searchDrivers; + String? get staged; + @override + bool get useDuringInstallation; @override @JsonKey(ignore: true) - _$$DriversResponseImplCopyWith<_$DriversResponseImpl> get copyWith => + _$$MirrorGetImplCopyWith<_$MirrorGetImpl> get copyWith => throw _privateConstructorUsedError; } -OEMResponse _$OEMResponseFromJson(Map json) { - return _OEMResponse.fromJson(json); +AdConnectionInfo _$AdConnectionInfoFromJson(Map json) { + return _AdConnectionInfo.fromJson(json); } /// @nodoc -mixin _$OEMResponse { - List? get metapackages => throw _privateConstructorUsedError; +mixin _$AdConnectionInfo { + String get adminName => throw _privateConstructorUsedError; + String get domainName => throw _privateConstructorUsedError; + String get password => throw _privateConstructorUsedError; Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $OEMResponseCopyWith get copyWith => + $AdConnectionInfoCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class $OEMResponseCopyWith<$Res> { - factory $OEMResponseCopyWith( - OEMResponse value, $Res Function(OEMResponse) then) = - _$OEMResponseCopyWithImpl<$Res, OEMResponse>; +abstract class $AdConnectionInfoCopyWith<$Res> { + factory $AdConnectionInfoCopyWith( + AdConnectionInfo value, $Res Function(AdConnectionInfo) then) = + _$AdConnectionInfoCopyWithImpl<$Res, AdConnectionInfo>; @useResult - $Res call({List? metapackages}); + $Res call({String adminName, String domainName, String password}); } /// @nodoc -class _$OEMResponseCopyWithImpl<$Res, $Val extends OEMResponse> - implements $OEMResponseCopyWith<$Res> { - _$OEMResponseCopyWithImpl(this._value, this._then); +class _$AdConnectionInfoCopyWithImpl<$Res, $Val extends AdConnectionInfo> + implements $AdConnectionInfoCopyWith<$Res> { + _$AdConnectionInfoCopyWithImpl(this._value, this._then); // ignore: unused_field final $Val _value; @@ -10614,144 +8830,182 @@ class _$OEMResponseCopyWithImpl<$Res, $Val extends OEMResponse> @pragma('vm:prefer-inline') @override $Res call({ - Object? metapackages = freezed, + Object? adminName = null, + Object? domainName = null, + Object? password = null, }) { return _then(_value.copyWith( - metapackages: freezed == metapackages - ? _value.metapackages - : metapackages // ignore: cast_nullable_to_non_nullable - as List?, + adminName: null == adminName + ? _value.adminName + : adminName // ignore: cast_nullable_to_non_nullable + as String, + domainName: null == domainName + ? _value.domainName + : domainName // ignore: cast_nullable_to_non_nullable + as String, + password: null == password + ? _value.password + : password // ignore: cast_nullable_to_non_nullable + as String, ) as $Val); } } /// @nodoc -abstract class _$$OEMResponseImplCopyWith<$Res> - implements $OEMResponseCopyWith<$Res> { - factory _$$OEMResponseImplCopyWith( - _$OEMResponseImpl value, $Res Function(_$OEMResponseImpl) then) = - __$$OEMResponseImplCopyWithImpl<$Res>; +abstract class _$$AdConnectionInfoImplCopyWith<$Res> + implements $AdConnectionInfoCopyWith<$Res> { + factory _$$AdConnectionInfoImplCopyWith(_$AdConnectionInfoImpl value, + $Res Function(_$AdConnectionInfoImpl) then) = + __$$AdConnectionInfoImplCopyWithImpl<$Res>; @override @useResult - $Res call({List? metapackages}); + $Res call({String adminName, String domainName, String password}); } /// @nodoc -class __$$OEMResponseImplCopyWithImpl<$Res> - extends _$OEMResponseCopyWithImpl<$Res, _$OEMResponseImpl> - implements _$$OEMResponseImplCopyWith<$Res> { - __$$OEMResponseImplCopyWithImpl( - _$OEMResponseImpl _value, $Res Function(_$OEMResponseImpl) _then) +class __$$AdConnectionInfoImplCopyWithImpl<$Res> + extends _$AdConnectionInfoCopyWithImpl<$Res, _$AdConnectionInfoImpl> + implements _$$AdConnectionInfoImplCopyWith<$Res> { + __$$AdConnectionInfoImplCopyWithImpl(_$AdConnectionInfoImpl _value, + $Res Function(_$AdConnectionInfoImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? metapackages = freezed, + Object? adminName = null, + Object? domainName = null, + Object? password = null, }) { - return _then(_$OEMResponseImpl( - metapackages: freezed == metapackages - ? _value._metapackages - : metapackages // ignore: cast_nullable_to_non_nullable - as List?, - )); - } -} - -/// @nodoc -@JsonSerializable() -class _$OEMResponseImpl implements _OEMResponse { - const _$OEMResponseImpl({required final List? metapackages}) - : _metapackages = metapackages; + return _then(_$AdConnectionInfoImpl( + adminName: null == adminName + ? _value.adminName + : adminName // ignore: cast_nullable_to_non_nullable + as String, + domainName: null == domainName + ? _value.domainName + : domainName // ignore: cast_nullable_to_non_nullable + as String, + password: null == password + ? _value.password + : password // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} - factory _$OEMResponseImpl.fromJson(Map json) => - _$$OEMResponseImplFromJson(json); +/// @nodoc +@JsonSerializable() +class _$AdConnectionInfoImpl implements _AdConnectionInfo { + const _$AdConnectionInfoImpl( + {this.adminName = '', this.domainName = '', this.password = ''}); + + factory _$AdConnectionInfoImpl.fromJson(Map json) => + _$$AdConnectionInfoImplFromJson(json); - final List? _metapackages; @override - List? get metapackages { - final value = _metapackages; - if (value == null) return null; - if (_metapackages is EqualUnmodifiableListView) return _metapackages; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(value); - } + @JsonKey() + final String adminName; + @override + @JsonKey() + final String domainName; + @override + @JsonKey() + final String password; @override String toString() { - return 'OEMResponse(metapackages: $metapackages)'; + return 'AdConnectionInfo(adminName: $adminName, domainName: $domainName, password: $password)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$OEMResponseImpl && - const DeepCollectionEquality() - .equals(other._metapackages, _metapackages)); + other is _$AdConnectionInfoImpl && + (identical(other.adminName, adminName) || + other.adminName == adminName) && + (identical(other.domainName, domainName) || + other.domainName == domainName) && + (identical(other.password, password) || + other.password == password)); } @JsonKey(ignore: true) @override - int get hashCode => Object.hash( - runtimeType, const DeepCollectionEquality().hash(_metapackages)); + int get hashCode => Object.hash(runtimeType, adminName, domainName, password); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$OEMResponseImplCopyWith<_$OEMResponseImpl> get copyWith => - __$$OEMResponseImplCopyWithImpl<_$OEMResponseImpl>(this, _$identity); + _$$AdConnectionInfoImplCopyWith<_$AdConnectionInfoImpl> get copyWith => + __$$AdConnectionInfoImplCopyWithImpl<_$AdConnectionInfoImpl>( + this, _$identity); @override Map toJson() { - return _$$OEMResponseImplToJson( + return _$$AdConnectionInfoImplToJson( this, ); } } -abstract class _OEMResponse implements OEMResponse { - const factory _OEMResponse({required final List? metapackages}) = - _$OEMResponseImpl; +abstract class _AdConnectionInfo implements AdConnectionInfo { + const factory _AdConnectionInfo( + {final String adminName, + final String domainName, + final String password}) = _$AdConnectionInfoImpl; - factory _OEMResponse.fromJson(Map json) = - _$OEMResponseImpl.fromJson; + factory _AdConnectionInfo.fromJson(Map json) = + _$AdConnectionInfoImpl.fromJson; @override - List? get metapackages; + String get adminName; + @override + String get domainName; + @override + String get password; @override @JsonKey(ignore: true) - _$$OEMResponseImplCopyWith<_$OEMResponseImpl> get copyWith => + _$$AdConnectionInfoImplCopyWith<_$AdConnectionInfoImpl> get copyWith => throw _privateConstructorUsedError; } -CodecsData _$CodecsDataFromJson(Map json) { - return _CodecsData.fromJson(json); +OsProber _$OsProberFromJson(Map json) { + return _OsProber.fromJson(json); } /// @nodoc -mixin _$CodecsData { - bool get install => throw _privateConstructorUsedError; +mixin _$OsProber { + String get long => throw _privateConstructorUsedError; + String get label => throw _privateConstructorUsedError; + String get type => throw _privateConstructorUsedError; + String? get subpath => throw _privateConstructorUsedError; + String? get version => throw _privateConstructorUsedError; Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $CodecsDataCopyWith get copyWith => + $OsProberCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class $CodecsDataCopyWith<$Res> { - factory $CodecsDataCopyWith( - CodecsData value, $Res Function(CodecsData) then) = - _$CodecsDataCopyWithImpl<$Res, CodecsData>; +abstract class $OsProberCopyWith<$Res> { + factory $OsProberCopyWith(OsProber value, $Res Function(OsProber) then) = + _$OsProberCopyWithImpl<$Res, OsProber>; @useResult - $Res call({bool install}); + $Res call( + {String long, + String label, + String type, + String? subpath, + String? version}); } /// @nodoc -class _$CodecsDataCopyWithImpl<$Res, $Val extends CodecsData> - implements $CodecsDataCopyWith<$Res> { - _$CodecsDataCopyWithImpl(this._value, this._then); +class _$OsProberCopyWithImpl<$Res, $Val extends OsProber> + implements $OsProberCopyWith<$Res> { + _$OsProberCopyWithImpl(this._value, this._then); // ignore: unused_field final $Val _value; @@ -10761,133 +9015,304 @@ class _$CodecsDataCopyWithImpl<$Res, $Val extends CodecsData> @pragma('vm:prefer-inline') @override $Res call({ - Object? install = null, + Object? long = null, + Object? label = null, + Object? type = null, + Object? subpath = freezed, + Object? version = freezed, }) { return _then(_value.copyWith( - install: null == install - ? _value.install - : install // ignore: cast_nullable_to_non_nullable - as bool, + long: null == long + ? _value.long + : long // ignore: cast_nullable_to_non_nullable + as String, + label: null == label + ? _value.label + : label // ignore: cast_nullable_to_non_nullable + as String, + type: null == type + ? _value.type + : type // ignore: cast_nullable_to_non_nullable + as String, + subpath: freezed == subpath + ? _value.subpath + : subpath // ignore: cast_nullable_to_non_nullable + as String?, + version: freezed == version + ? _value.version + : version // ignore: cast_nullable_to_non_nullable + as String?, ) as $Val); } } /// @nodoc -abstract class _$$CodecsDataImplCopyWith<$Res> - implements $CodecsDataCopyWith<$Res> { - factory _$$CodecsDataImplCopyWith( - _$CodecsDataImpl value, $Res Function(_$CodecsDataImpl) then) = - __$$CodecsDataImplCopyWithImpl<$Res>; +abstract class _$$OsProberImplCopyWith<$Res> + implements $OsProberCopyWith<$Res> { + factory _$$OsProberImplCopyWith( + _$OsProberImpl value, $Res Function(_$OsProberImpl) then) = + __$$OsProberImplCopyWithImpl<$Res>; @override @useResult - $Res call({bool install}); + $Res call( + {String long, + String label, + String type, + String? subpath, + String? version}); } /// @nodoc -class __$$CodecsDataImplCopyWithImpl<$Res> - extends _$CodecsDataCopyWithImpl<$Res, _$CodecsDataImpl> - implements _$$CodecsDataImplCopyWith<$Res> { - __$$CodecsDataImplCopyWithImpl( - _$CodecsDataImpl _value, $Res Function(_$CodecsDataImpl) _then) +class __$$OsProberImplCopyWithImpl<$Res> + extends _$OsProberCopyWithImpl<$Res, _$OsProberImpl> + implements _$$OsProberImplCopyWith<$Res> { + __$$OsProberImplCopyWithImpl( + _$OsProberImpl _value, $Res Function(_$OsProberImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? install = null, + Object? long = null, + Object? label = null, + Object? type = null, + Object? subpath = freezed, + Object? version = freezed, }) { - return _then(_$CodecsDataImpl( - install: null == install - ? _value.install - : install // ignore: cast_nullable_to_non_nullable - as bool, + return _then(_$OsProberImpl( + long: null == long + ? _value.long + : long // ignore: cast_nullable_to_non_nullable + as String, + label: null == label + ? _value.label + : label // ignore: cast_nullable_to_non_nullable + as String, + type: null == type + ? _value.type + : type // ignore: cast_nullable_to_non_nullable + as String, + subpath: freezed == subpath + ? _value.subpath + : subpath // ignore: cast_nullable_to_non_nullable + as String?, + version: freezed == version + ? _value.version + : version // ignore: cast_nullable_to_non_nullable + as String?, )); } } /// @nodoc @JsonSerializable() -class _$CodecsDataImpl implements _CodecsData { - const _$CodecsDataImpl({required this.install}); +class _$OsProberImpl implements _OsProber { + const _$OsProberImpl( + {required this.long, + required this.label, + required this.type, + this.subpath, + this.version}); - factory _$CodecsDataImpl.fromJson(Map json) => - _$$CodecsDataImplFromJson(json); + factory _$OsProberImpl.fromJson(Map json) => + _$$OsProberImplFromJson(json); @override - final bool install; + final String long; + @override + final String label; + @override + final String type; + @override + final String? subpath; + @override + final String? version; @override String toString() { - return 'CodecsData(install: $install)'; + return 'OsProber(long: $long, label: $label, type: $type, subpath: $subpath, version: $version)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$CodecsDataImpl && - (identical(other.install, install) || other.install == install)); + other is _$OsProberImpl && + (identical(other.long, long) || other.long == long) && + (identical(other.label, label) || other.label == label) && + (identical(other.type, type) || other.type == type) && + (identical(other.subpath, subpath) || other.subpath == subpath) && + (identical(other.version, version) || other.version == version)); } @JsonKey(ignore: true) @override - int get hashCode => Object.hash(runtimeType, install); + int get hashCode => + Object.hash(runtimeType, long, label, type, subpath, version); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$CodecsDataImplCopyWith<_$CodecsDataImpl> get copyWith => - __$$CodecsDataImplCopyWithImpl<_$CodecsDataImpl>(this, _$identity); + _$$OsProberImplCopyWith<_$OsProberImpl> get copyWith => + __$$OsProberImplCopyWithImpl<_$OsProberImpl>(this, _$identity); @override Map toJson() { - return _$$CodecsDataImplToJson( + return _$$OsProberImplToJson( this, ); } } -abstract class _CodecsData implements CodecsData { - const factory _CodecsData({required final bool install}) = _$CodecsDataImpl; - - factory _CodecsData.fromJson(Map json) = - _$CodecsDataImpl.fromJson; - +abstract class _OsProber implements OsProber { + const factory _OsProber( + {required final String long, + required final String label, + required final String type, + final String? subpath, + final String? version}) = _$OsProberImpl; + + factory _OsProber.fromJson(Map json) = + _$OsProberImpl.fromJson; + @override - bool get install; + String get long; + @override + String get label; + @override + String get type; + @override + String? get subpath; + @override + String? get version; @override @JsonKey(ignore: true) - _$$CodecsDataImplCopyWith<_$CodecsDataImpl> get copyWith => + _$$OsProberImplCopyWith<_$OsProberImpl> get copyWith => throw _privateConstructorUsedError; } -DriversPayload _$DriversPayloadFromJson(Map json) { - return _DriversPayload.fromJson(json); +PartitionOrGap _$PartitionOrGapFromJson(Map json) { + switch (json['\$type']) { + case 'Partition': + return Partition.fromJson(json); + case 'Gap': + return Gap.fromJson(json); + + default: + throw CheckedFromJsonException(json, '\$type', 'PartitionOrGap', + 'Invalid union type "${json['\$type']}"!'); + } } /// @nodoc -mixin _$DriversPayload { - bool get install => throw _privateConstructorUsedError; - +mixin _$PartitionOrGap { + int? get size => throw _privateConstructorUsedError; + int? get offset => throw _privateConstructorUsedError; + @optionalTypeArgs + TResult when({ + required TResult Function( + int? size, + int? number, + bool? preserve, + String? wipe, + List annotations, + String? mount, + String? format, + bool? grubDevice, + bool? boot, + OsProber? os, + int? offset, + int? estimatedMinSize, + bool? resize, + String? path, + bool isInUse) + partition, + required TResult Function(int offset, int size, GapUsable usable) gap, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function( + int? size, + int? number, + bool? preserve, + String? wipe, + List annotations, + String? mount, + String? format, + bool? grubDevice, + bool? boot, + OsProber? os, + int? offset, + int? estimatedMinSize, + bool? resize, + String? path, + bool isInUse)? + partition, + TResult? Function(int offset, int size, GapUsable usable)? gap, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeWhen({ + TResult Function( + int? size, + int? number, + bool? preserve, + String? wipe, + List annotations, + String? mount, + String? format, + bool? grubDevice, + bool? boot, + OsProber? os, + int? offset, + int? estimatedMinSize, + bool? resize, + String? path, + bool isInUse)? + partition, + TResult Function(int offset, int size, GapUsable usable)? gap, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult map({ + required TResult Function(Partition value) partition, + required TResult Function(Gap value) gap, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(Partition value)? partition, + TResult? Function(Gap value)? gap, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeMap({ + TResult Function(Partition value)? partition, + TResult Function(Gap value)? gap, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $DriversPayloadCopyWith get copyWith => + $PartitionOrGapCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class $DriversPayloadCopyWith<$Res> { - factory $DriversPayloadCopyWith( - DriversPayload value, $Res Function(DriversPayload) then) = - _$DriversPayloadCopyWithImpl<$Res, DriversPayload>; +abstract class $PartitionOrGapCopyWith<$Res> { + factory $PartitionOrGapCopyWith( + PartitionOrGap value, $Res Function(PartitionOrGap) then) = + _$PartitionOrGapCopyWithImpl<$Res, PartitionOrGap>; @useResult - $Res call({bool install}); + $Res call({int size, int offset}); } /// @nodoc -class _$DriversPayloadCopyWithImpl<$Res, $Val extends DriversPayload> - implements $DriversPayloadCopyWith<$Res> { - _$DriversPayloadCopyWithImpl(this._value, this._then); +class _$PartitionOrGapCopyWithImpl<$Res, $Val extends PartitionOrGap> + implements $PartitionOrGapCopyWith<$Res> { + _$PartitionOrGapCopyWithImpl(this._value, this._then); // ignore: unused_field final $Val _value; @@ -10897,665 +9322,724 @@ class _$DriversPayloadCopyWithImpl<$Res, $Val extends DriversPayload> @pragma('vm:prefer-inline') @override $Res call({ - Object? install = null, + Object? size = null, + Object? offset = null, }) { return _then(_value.copyWith( - install: null == install - ? _value.install - : install // ignore: cast_nullable_to_non_nullable - as bool, + size: null == size + ? _value.size! + : size // ignore: cast_nullable_to_non_nullable + as int, + offset: null == offset + ? _value.offset! + : offset // ignore: cast_nullable_to_non_nullable + as int, ) as $Val); } } /// @nodoc -abstract class _$$DriversPayloadImplCopyWith<$Res> - implements $DriversPayloadCopyWith<$Res> { - factory _$$DriversPayloadImplCopyWith(_$DriversPayloadImpl value, - $Res Function(_$DriversPayloadImpl) then) = - __$$DriversPayloadImplCopyWithImpl<$Res>; +abstract class _$$PartitionImplCopyWith<$Res> + implements $PartitionOrGapCopyWith<$Res> { + factory _$$PartitionImplCopyWith( + _$PartitionImpl value, $Res Function(_$PartitionImpl) then) = + __$$PartitionImplCopyWithImpl<$Res>; @override @useResult - $Res call({bool install}); + $Res call( + {int? size, + int? number, + bool? preserve, + String? wipe, + List annotations, + String? mount, + String? format, + bool? grubDevice, + bool? boot, + OsProber? os, + int? offset, + int? estimatedMinSize, + bool? resize, + String? path, + bool isInUse}); + + $OsProberCopyWith<$Res>? get os; } /// @nodoc -class __$$DriversPayloadImplCopyWithImpl<$Res> - extends _$DriversPayloadCopyWithImpl<$Res, _$DriversPayloadImpl> - implements _$$DriversPayloadImplCopyWith<$Res> { - __$$DriversPayloadImplCopyWithImpl( - _$DriversPayloadImpl _value, $Res Function(_$DriversPayloadImpl) _then) +class __$$PartitionImplCopyWithImpl<$Res> + extends _$PartitionOrGapCopyWithImpl<$Res, _$PartitionImpl> + implements _$$PartitionImplCopyWith<$Res> { + __$$PartitionImplCopyWithImpl( + _$PartitionImpl _value, $Res Function(_$PartitionImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? install = null, + Object? size = freezed, + Object? number = freezed, + Object? preserve = freezed, + Object? wipe = freezed, + Object? annotations = null, + Object? mount = freezed, + Object? format = freezed, + Object? grubDevice = freezed, + Object? boot = freezed, + Object? os = freezed, + Object? offset = freezed, + Object? estimatedMinSize = freezed, + Object? resize = freezed, + Object? path = freezed, + Object? isInUse = null, }) { - return _then(_$DriversPayloadImpl( - install: null == install - ? _value.install - : install // ignore: cast_nullable_to_non_nullable - as bool, - )); - } -} - -/// @nodoc -@JsonSerializable() -class _$DriversPayloadImpl implements _DriversPayload { - const _$DriversPayloadImpl({required this.install}); - - factory _$DriversPayloadImpl.fromJson(Map json) => - _$$DriversPayloadImplFromJson(json); - - @override - final bool install; - - @override - String toString() { - return 'DriversPayload(install: $install)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$DriversPayloadImpl && - (identical(other.install, install) || other.install == install)); - } - - @JsonKey(ignore: true) - @override - int get hashCode => Object.hash(runtimeType, install); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$DriversPayloadImplCopyWith<_$DriversPayloadImpl> get copyWith => - __$$DriversPayloadImplCopyWithImpl<_$DriversPayloadImpl>( - this, _$identity); - - @override - Map toJson() { - return _$$DriversPayloadImplToJson( - this, - ); + return _then(_$PartitionImpl( + size: freezed == size + ? _value.size + : size // ignore: cast_nullable_to_non_nullable + as int?, + number: freezed == number + ? _value.number + : number // ignore: cast_nullable_to_non_nullable + as int?, + preserve: freezed == preserve + ? _value.preserve + : preserve // ignore: cast_nullable_to_non_nullable + as bool?, + wipe: freezed == wipe + ? _value.wipe + : wipe // ignore: cast_nullable_to_non_nullable + as String?, + annotations: null == annotations + ? _value._annotations + : annotations // ignore: cast_nullable_to_non_nullable + as List, + mount: freezed == mount + ? _value.mount + : mount // ignore: cast_nullable_to_non_nullable + as String?, + format: freezed == format + ? _value.format + : format // ignore: cast_nullable_to_non_nullable + as String?, + grubDevice: freezed == grubDevice + ? _value.grubDevice + : grubDevice // ignore: cast_nullable_to_non_nullable + as bool?, + boot: freezed == boot + ? _value.boot + : boot // ignore: cast_nullable_to_non_nullable + as bool?, + os: freezed == os + ? _value.os + : os // ignore: cast_nullable_to_non_nullable + as OsProber?, + offset: freezed == offset + ? _value.offset + : offset // ignore: cast_nullable_to_non_nullable + as int?, + estimatedMinSize: freezed == estimatedMinSize + ? _value.estimatedMinSize + : estimatedMinSize // ignore: cast_nullable_to_non_nullable + as int?, + resize: freezed == resize + ? _value.resize + : resize // ignore: cast_nullable_to_non_nullable + as bool?, + path: freezed == path + ? _value.path + : path // ignore: cast_nullable_to_non_nullable + as String?, + isInUse: null == isInUse + ? _value.isInUse + : isInUse // ignore: cast_nullable_to_non_nullable + as bool, + )); } -} -abstract class _DriversPayload implements DriversPayload { - const factory _DriversPayload({required final bool install}) = - _$DriversPayloadImpl; - - factory _DriversPayload.fromJson(Map json) = - _$DriversPayloadImpl.fromJson; - - @override - bool get install; @override - @JsonKey(ignore: true) - _$$DriversPayloadImplCopyWith<_$DriversPayloadImpl> get copyWith => - throw _privateConstructorUsedError; -} - -SnapSelection _$SnapSelectionFromJson(Map json) { - return _SnapSelection.fromJson(json); -} - -/// @nodoc -mixin _$SnapSelection { - String get name => throw _privateConstructorUsedError; - String get channel => throw _privateConstructorUsedError; - bool get classic => throw _privateConstructorUsedError; - - Map toJson() => throw _privateConstructorUsedError; - @JsonKey(ignore: true) - $SnapSelectionCopyWith get copyWith => - throw _privateConstructorUsedError; -} + @pragma('vm:prefer-inline') + $OsProberCopyWith<$Res>? get os { + if (_value.os == null) { + return null; + } -/// @nodoc -abstract class $SnapSelectionCopyWith<$Res> { - factory $SnapSelectionCopyWith( - SnapSelection value, $Res Function(SnapSelection) then) = - _$SnapSelectionCopyWithImpl<$Res, SnapSelection>; - @useResult - $Res call({String name, String channel, bool classic}); + return $OsProberCopyWith<$Res>(_value.os!, (value) { + return _then(_value.copyWith(os: value)); + }); + } } /// @nodoc -class _$SnapSelectionCopyWithImpl<$Res, $Val extends SnapSelection> - implements $SnapSelectionCopyWith<$Res> { - _$SnapSelectionCopyWithImpl(this._value, this._then); +@JsonSerializable() +class _$PartitionImpl implements Partition { + const _$PartitionImpl( + {this.size, + this.number, + this.preserve, + this.wipe, + final List annotations = const [], + this.mount, + this.format, + this.grubDevice, + this.boot, + this.os, + this.offset, + this.estimatedMinSize = -1, + this.resize, + this.path, + this.isInUse = false, + final String? $type}) + : _annotations = annotations, + $type = $type ?? 'Partition'; - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + factory _$PartitionImpl.fromJson(Map json) => + _$$PartitionImplFromJson(json); - @pragma('vm:prefer-inline') @override - $Res call({ - Object? name = null, - Object? channel = null, - Object? classic = null, - }) { - return _then(_value.copyWith( - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - channel: null == channel - ? _value.channel - : channel // ignore: cast_nullable_to_non_nullable - as String, - classic: null == classic - ? _value.classic - : classic // ignore: cast_nullable_to_non_nullable - as bool, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$SnapSelectionImplCopyWith<$Res> - implements $SnapSelectionCopyWith<$Res> { - factory _$$SnapSelectionImplCopyWith( - _$SnapSelectionImpl value, $Res Function(_$SnapSelectionImpl) then) = - __$$SnapSelectionImplCopyWithImpl<$Res>; + final int? size; @override - @useResult - $Res call({String name, String channel, bool classic}); -} - -/// @nodoc -class __$$SnapSelectionImplCopyWithImpl<$Res> - extends _$SnapSelectionCopyWithImpl<$Res, _$SnapSelectionImpl> - implements _$$SnapSelectionImplCopyWith<$Res> { - __$$SnapSelectionImplCopyWithImpl( - _$SnapSelectionImpl _value, $Res Function(_$SnapSelectionImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') + final int? number; @override - $Res call({ - Object? name = null, - Object? channel = null, - Object? classic = null, - }) { - return _then(_$SnapSelectionImpl( - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - channel: null == channel - ? _value.channel - : channel // ignore: cast_nullable_to_non_nullable - as String, - classic: null == classic - ? _value.classic - : classic // ignore: cast_nullable_to_non_nullable - as bool, - )); + final bool? preserve; + @override + final String? wipe; + final List _annotations; + @override + @JsonKey() + List get annotations { + if (_annotations is EqualUnmodifiableListView) return _annotations; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_annotations); } -} - -/// @nodoc -@JsonSerializable() -class _$SnapSelectionImpl implements _SnapSelection { - const _$SnapSelectionImpl( - {required this.name, required this.channel, this.classic = false}); - - factory _$SnapSelectionImpl.fromJson(Map json) => - _$$SnapSelectionImplFromJson(json); @override - final String name; + final String? mount; @override - final String channel; + final String? format; + @override + final bool? grubDevice; + @override + final bool? boot; + @override + final OsProber? os; + @override + final int? offset; @override @JsonKey() - final bool classic; + final int? estimatedMinSize; + @override + final bool? resize; + @override + final String? path; + @override + @JsonKey() + final bool isInUse; + + @JsonKey(name: '\$type') + final String $type; @override String toString() { - return 'SnapSelection(name: $name, channel: $channel, classic: $classic)'; + return 'PartitionOrGap.partition(size: $size, number: $number, preserve: $preserve, wipe: $wipe, annotations: $annotations, mount: $mount, format: $format, grubDevice: $grubDevice, boot: $boot, os: $os, offset: $offset, estimatedMinSize: $estimatedMinSize, resize: $resize, path: $path, isInUse: $isInUse)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$SnapSelectionImpl && - (identical(other.name, name) || other.name == name) && - (identical(other.channel, channel) || other.channel == channel) && - (identical(other.classic, classic) || other.classic == classic)); + other is _$PartitionImpl && + (identical(other.size, size) || other.size == size) && + (identical(other.number, number) || other.number == number) && + (identical(other.preserve, preserve) || + other.preserve == preserve) && + (identical(other.wipe, wipe) || other.wipe == wipe) && + const DeepCollectionEquality() + .equals(other._annotations, _annotations) && + (identical(other.mount, mount) || other.mount == mount) && + (identical(other.format, format) || other.format == format) && + (identical(other.grubDevice, grubDevice) || + other.grubDevice == grubDevice) && + (identical(other.boot, boot) || other.boot == boot) && + (identical(other.os, os) || other.os == os) && + (identical(other.offset, offset) || other.offset == offset) && + (identical(other.estimatedMinSize, estimatedMinSize) || + other.estimatedMinSize == estimatedMinSize) && + (identical(other.resize, resize) || other.resize == resize) && + (identical(other.path, path) || other.path == path) && + (identical(other.isInUse, isInUse) || other.isInUse == isInUse)); } @JsonKey(ignore: true) @override - int get hashCode => Object.hash(runtimeType, name, channel, classic); + int get hashCode => Object.hash( + runtimeType, + size, + number, + preserve, + wipe, + const DeepCollectionEquality().hash(_annotations), + mount, + format, + grubDevice, + boot, + os, + offset, + estimatedMinSize, + resize, + path, + isInUse); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$SnapSelectionImplCopyWith<_$SnapSelectionImpl> get copyWith => - __$$SnapSelectionImplCopyWithImpl<_$SnapSelectionImpl>(this, _$identity); - - @override - Map toJson() { - return _$$SnapSelectionImplToJson( - this, - ); - } -} - -abstract class _SnapSelection implements SnapSelection { - const factory _SnapSelection( - {required final String name, - required final String channel, - final bool classic}) = _$SnapSelectionImpl; - - factory _SnapSelection.fromJson(Map json) = - _$SnapSelectionImpl.fromJson; - - @override - String get name; - @override - String get channel; - @override - bool get classic; - @override - @JsonKey(ignore: true) - _$$SnapSelectionImplCopyWith<_$SnapSelectionImpl> get copyWith => - throw _privateConstructorUsedError; -} - -SnapListResponse _$SnapListResponseFromJson(Map json) { - return _SnapListResponse.fromJson(json); -} - -/// @nodoc -mixin _$SnapListResponse { - SnapCheckState get status => throw _privateConstructorUsedError; - List get snaps => throw _privateConstructorUsedError; - List get selections => throw _privateConstructorUsedError; - - Map toJson() => throw _privateConstructorUsedError; - @JsonKey(ignore: true) - $SnapListResponseCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $SnapListResponseCopyWith<$Res> { - factory $SnapListResponseCopyWith( - SnapListResponse value, $Res Function(SnapListResponse) then) = - _$SnapListResponseCopyWithImpl<$Res, SnapListResponse>; - @useResult - $Res call( - {SnapCheckState status, - List snaps, - List selections}); -} - -/// @nodoc -class _$SnapListResponseCopyWithImpl<$Res, $Val extends SnapListResponse> - implements $SnapListResponseCopyWith<$Res> { - _$SnapListResponseCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + _$$PartitionImplCopyWith<_$PartitionImpl> get copyWith => + __$$PartitionImplCopyWithImpl<_$PartitionImpl>(this, _$identity); - @pragma('vm:prefer-inline') @override - $Res call({ - Object? status = null, - Object? snaps = null, - Object? selections = null, + @optionalTypeArgs + TResult when({ + required TResult Function( + int? size, + int? number, + bool? preserve, + String? wipe, + List annotations, + String? mount, + String? format, + bool? grubDevice, + bool? boot, + OsProber? os, + int? offset, + int? estimatedMinSize, + bool? resize, + String? path, + bool isInUse) + partition, + required TResult Function(int offset, int size, GapUsable usable) gap, }) { - return _then(_value.copyWith( - status: null == status - ? _value.status - : status // ignore: cast_nullable_to_non_nullable - as SnapCheckState, - snaps: null == snaps - ? _value.snaps - : snaps // ignore: cast_nullable_to_non_nullable - as List, - selections: null == selections - ? _value.selections - : selections // ignore: cast_nullable_to_non_nullable - as List, - ) as $Val); + return partition(size, number, preserve, wipe, annotations, mount, format, + grubDevice, boot, os, offset, estimatedMinSize, resize, path, isInUse); } -} - -/// @nodoc -abstract class _$$SnapListResponseImplCopyWith<$Res> - implements $SnapListResponseCopyWith<$Res> { - factory _$$SnapListResponseImplCopyWith(_$SnapListResponseImpl value, - $Res Function(_$SnapListResponseImpl) then) = - __$$SnapListResponseImplCopyWithImpl<$Res>; - @override - @useResult - $Res call( - {SnapCheckState status, - List snaps, - List selections}); -} - -/// @nodoc -class __$$SnapListResponseImplCopyWithImpl<$Res> - extends _$SnapListResponseCopyWithImpl<$Res, _$SnapListResponseImpl> - implements _$$SnapListResponseImplCopyWith<$Res> { - __$$SnapListResponseImplCopyWithImpl(_$SnapListResponseImpl _value, - $Res Function(_$SnapListResponseImpl) _then) - : super(_value, _then); - @pragma('vm:prefer-inline') @override - $Res call({ - Object? status = null, - Object? snaps = null, - Object? selections = null, + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function( + int? size, + int? number, + bool? preserve, + String? wipe, + List annotations, + String? mount, + String? format, + bool? grubDevice, + bool? boot, + OsProber? os, + int? offset, + int? estimatedMinSize, + bool? resize, + String? path, + bool isInUse)? + partition, + TResult? Function(int offset, int size, GapUsable usable)? gap, }) { - return _then(_$SnapListResponseImpl( - status: null == status - ? _value.status - : status // ignore: cast_nullable_to_non_nullable - as SnapCheckState, - snaps: null == snaps - ? _value._snaps - : snaps // ignore: cast_nullable_to_non_nullable - as List, - selections: null == selections - ? _value._selections - : selections // ignore: cast_nullable_to_non_nullable - as List, - )); - } -} - -/// @nodoc -@JsonSerializable() -class _$SnapListResponseImpl implements _SnapListResponse { - const _$SnapListResponseImpl( - {required this.status, - final List snaps = const [], - final List selections = const []}) - : _snaps = snaps, - _selections = selections; - - factory _$SnapListResponseImpl.fromJson(Map json) => - _$$SnapListResponseImplFromJson(json); - - @override - final SnapCheckState status; - final List _snaps; - @override - @JsonKey() - List get snaps { - if (_snaps is EqualUnmodifiableListView) return _snaps; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_snaps); + return partition?.call( + size, + number, + preserve, + wipe, + annotations, + mount, + format, + grubDevice, + boot, + os, + offset, + estimatedMinSize, + resize, + path, + isInUse); } - final List _selections; @override - @JsonKey() - List get selections { - if (_selections is EqualUnmodifiableListView) return _selections; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_selections); + @optionalTypeArgs + TResult maybeWhen({ + TResult Function( + int? size, + int? number, + bool? preserve, + String? wipe, + List annotations, + String? mount, + String? format, + bool? grubDevice, + bool? boot, + OsProber? os, + int? offset, + int? estimatedMinSize, + bool? resize, + String? path, + bool isInUse)? + partition, + TResult Function(int offset, int size, GapUsable usable)? gap, + required TResult orElse(), + }) { + if (partition != null) { + return partition( + size, + number, + preserve, + wipe, + annotations, + mount, + format, + grubDevice, + boot, + os, + offset, + estimatedMinSize, + resize, + path, + isInUse); + } + return orElse(); } @override - String toString() { - return 'SnapListResponse(status: $status, snaps: $snaps, selections: $selections)'; + @optionalTypeArgs + TResult map({ + required TResult Function(Partition value) partition, + required TResult Function(Gap value) gap, + }) { + return partition(this); } @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$SnapListResponseImpl && - (identical(other.status, status) || other.status == status) && - const DeepCollectionEquality().equals(other._snaps, _snaps) && - const DeepCollectionEquality() - .equals(other._selections, _selections)); + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(Partition value)? partition, + TResult? Function(Gap value)? gap, + }) { + return partition?.call(this); } - @JsonKey(ignore: true) - @override - int get hashCode => Object.hash( - runtimeType, - status, - const DeepCollectionEquality().hash(_snaps), - const DeepCollectionEquality().hash(_selections)); - - @JsonKey(ignore: true) @override - @pragma('vm:prefer-inline') - _$$SnapListResponseImplCopyWith<_$SnapListResponseImpl> get copyWith => - __$$SnapListResponseImplCopyWithImpl<_$SnapListResponseImpl>( - this, _$identity); + @optionalTypeArgs + TResult maybeMap({ + TResult Function(Partition value)? partition, + TResult Function(Gap value)? gap, + required TResult orElse(), + }) { + if (partition != null) { + return partition(this); + } + return orElse(); + } @override Map toJson() { - return _$$SnapListResponseImplToJson( + return _$$PartitionImplToJson( this, ); } } -abstract class _SnapListResponse implements SnapListResponse { - const factory _SnapListResponse( - {required final SnapCheckState status, - final List snaps, - final List selections}) = _$SnapListResponseImpl; +abstract class Partition implements PartitionOrGap { + const factory Partition( + {final int? size, + final int? number, + final bool? preserve, + final String? wipe, + final List annotations, + final String? mount, + final String? format, + final bool? grubDevice, + final bool? boot, + final OsProber? os, + final int? offset, + final int? estimatedMinSize, + final bool? resize, + final String? path, + final bool isInUse}) = _$PartitionImpl; - factory _SnapListResponse.fromJson(Map json) = - _$SnapListResponseImpl.fromJson; + factory Partition.fromJson(Map json) = + _$PartitionImpl.fromJson; @override - SnapCheckState get status; - @override - List get snaps; + int? get size; + int? get number; + bool? get preserve; + String? get wipe; + List get annotations; + String? get mount; + String? get format; + bool? get grubDevice; + bool? get boot; + OsProber? get os; @override - List get selections; + int? get offset; + int? get estimatedMinSize; + bool? get resize; + String? get path; + bool get isInUse; @override @JsonKey(ignore: true) - _$$SnapListResponseImplCopyWith<_$SnapListResponseImpl> get copyWith => - throw _privateConstructorUsedError; -} - -TimeZoneInfo _$TimeZoneInfoFromJson(Map json) { - return _TimeZoneInfo.fromJson(json); -} - -/// @nodoc -mixin _$TimeZoneInfo { - String get timezone => throw _privateConstructorUsedError; - bool get fromGeoip => throw _privateConstructorUsedError; - - Map toJson() => throw _privateConstructorUsedError; - @JsonKey(ignore: true) - $TimeZoneInfoCopyWith get copyWith => + _$$PartitionImplCopyWith<_$PartitionImpl> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class $TimeZoneInfoCopyWith<$Res> { - factory $TimeZoneInfoCopyWith( - TimeZoneInfo value, $Res Function(TimeZoneInfo) then) = - _$TimeZoneInfoCopyWithImpl<$Res, TimeZoneInfo>; +abstract class _$$GapImplCopyWith<$Res> + implements $PartitionOrGapCopyWith<$Res> { + factory _$$GapImplCopyWith(_$GapImpl value, $Res Function(_$GapImpl) then) = + __$$GapImplCopyWithImpl<$Res>; + @override @useResult - $Res call({String timezone, bool fromGeoip}); + $Res call({int offset, int size, GapUsable usable}); } /// @nodoc -class _$TimeZoneInfoCopyWithImpl<$Res, $Val extends TimeZoneInfo> - implements $TimeZoneInfoCopyWith<$Res> { - _$TimeZoneInfoCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; +class __$$GapImplCopyWithImpl<$Res> + extends _$PartitionOrGapCopyWithImpl<$Res, _$GapImpl> + implements _$$GapImplCopyWith<$Res> { + __$$GapImplCopyWithImpl(_$GapImpl _value, $Res Function(_$GapImpl) _then) + : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? timezone = null, - Object? fromGeoip = null, + Object? offset = null, + Object? size = null, + Object? usable = null, }) { - return _then(_value.copyWith( - timezone: null == timezone - ? _value.timezone - : timezone // ignore: cast_nullable_to_non_nullable - as String, - fromGeoip: null == fromGeoip - ? _value.fromGeoip - : fromGeoip // ignore: cast_nullable_to_non_nullable - as bool, - ) as $Val); + return _then(_$GapImpl( + offset: null == offset + ? _value.offset + : offset // ignore: cast_nullable_to_non_nullable + as int, + size: null == size + ? _value.size + : size // ignore: cast_nullable_to_non_nullable + as int, + usable: null == usable + ? _value.usable + : usable // ignore: cast_nullable_to_non_nullable + as GapUsable, + )); } } /// @nodoc -abstract class _$$TimeZoneInfoImplCopyWith<$Res> - implements $TimeZoneInfoCopyWith<$Res> { - factory _$$TimeZoneInfoImplCopyWith( - _$TimeZoneInfoImpl value, $Res Function(_$TimeZoneInfoImpl) then) = - __$$TimeZoneInfoImplCopyWithImpl<$Res>; +@JsonSerializable() +class _$GapImpl implements Gap { + const _$GapImpl( + {required this.offset, + required this.size, + required this.usable, + final String? $type}) + : $type = $type ?? 'Gap'; + + factory _$GapImpl.fromJson(Map json) => + _$$GapImplFromJson(json); + @override - @useResult - $Res call({String timezone, bool fromGeoip}); -} + final int offset; + @override + final int size; + @override + final GapUsable usable; -/// @nodoc -class __$$TimeZoneInfoImplCopyWithImpl<$Res> - extends _$TimeZoneInfoCopyWithImpl<$Res, _$TimeZoneInfoImpl> - implements _$$TimeZoneInfoImplCopyWith<$Res> { - __$$TimeZoneInfoImplCopyWithImpl( - _$TimeZoneInfoImpl _value, $Res Function(_$TimeZoneInfoImpl) _then) - : super(_value, _then); + @JsonKey(name: '\$type') + final String $type; + + @override + String toString() { + return 'PartitionOrGap.gap(offset: $offset, size: $size, usable: $usable)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$GapImpl && + (identical(other.offset, offset) || other.offset == offset) && + (identical(other.size, size) || other.size == size) && + (identical(other.usable, usable) || other.usable == usable)); + } + + @JsonKey(ignore: true) + @override + int get hashCode => Object.hash(runtimeType, offset, size, usable); + @JsonKey(ignore: true) + @override @pragma('vm:prefer-inline') + _$$GapImplCopyWith<_$GapImpl> get copyWith => + __$$GapImplCopyWithImpl<_$GapImpl>(this, _$identity); + @override - $Res call({ - Object? timezone = null, - Object? fromGeoip = null, - }) { - return _then(_$TimeZoneInfoImpl( - timezone: null == timezone - ? _value.timezone - : timezone // ignore: cast_nullable_to_non_nullable - as String, - fromGeoip: null == fromGeoip - ? _value.fromGeoip - : fromGeoip // ignore: cast_nullable_to_non_nullable - as bool, - )); + @optionalTypeArgs + TResult when({ + required TResult Function( + int? size, + int? number, + bool? preserve, + String? wipe, + List annotations, + String? mount, + String? format, + bool? grubDevice, + bool? boot, + OsProber? os, + int? offset, + int? estimatedMinSize, + bool? resize, + String? path, + bool isInUse) + partition, + required TResult Function(int offset, int size, GapUsable usable) gap, + }) { + return gap(offset, size, usable); } -} - -/// @nodoc -@JsonSerializable() -class _$TimeZoneInfoImpl implements _TimeZoneInfo { - const _$TimeZoneInfoImpl({required this.timezone, required this.fromGeoip}); - - factory _$TimeZoneInfoImpl.fromJson(Map json) => - _$$TimeZoneInfoImplFromJson(json); @override - final String timezone; - @override - final bool fromGeoip; + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function( + int? size, + int? number, + bool? preserve, + String? wipe, + List annotations, + String? mount, + String? format, + bool? grubDevice, + bool? boot, + OsProber? os, + int? offset, + int? estimatedMinSize, + bool? resize, + String? path, + bool isInUse)? + partition, + TResult? Function(int offset, int size, GapUsable usable)? gap, + }) { + return gap?.call(offset, size, usable); + } @override - String toString() { - return 'TimeZoneInfo(timezone: $timezone, fromGeoip: $fromGeoip)'; + @optionalTypeArgs + TResult maybeWhen({ + TResult Function( + int? size, + int? number, + bool? preserve, + String? wipe, + List annotations, + String? mount, + String? format, + bool? grubDevice, + bool? boot, + OsProber? os, + int? offset, + int? estimatedMinSize, + bool? resize, + String? path, + bool isInUse)? + partition, + TResult Function(int offset, int size, GapUsable usable)? gap, + required TResult orElse(), + }) { + if (gap != null) { + return gap(offset, size, usable); + } + return orElse(); } @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$TimeZoneInfoImpl && - (identical(other.timezone, timezone) || - other.timezone == timezone) && - (identical(other.fromGeoip, fromGeoip) || - other.fromGeoip == fromGeoip)); + @optionalTypeArgs + TResult map({ + required TResult Function(Partition value) partition, + required TResult Function(Gap value) gap, + }) { + return gap(this); } - @JsonKey(ignore: true) @override - int get hashCode => Object.hash(runtimeType, timezone, fromGeoip); + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(Partition value)? partition, + TResult? Function(Gap value)? gap, + }) { + return gap?.call(this); + } - @JsonKey(ignore: true) @override - @pragma('vm:prefer-inline') - _$$TimeZoneInfoImplCopyWith<_$TimeZoneInfoImpl> get copyWith => - __$$TimeZoneInfoImplCopyWithImpl<_$TimeZoneInfoImpl>(this, _$identity); + @optionalTypeArgs + TResult maybeMap({ + TResult Function(Partition value)? partition, + TResult Function(Gap value)? gap, + required TResult orElse(), + }) { + if (gap != null) { + return gap(this); + } + return orElse(); + } @override Map toJson() { - return _$$TimeZoneInfoImplToJson( + return _$$GapImplToJson( this, ); } } -abstract class _TimeZoneInfo implements TimeZoneInfo { - const factory _TimeZoneInfo( - {required final String timezone, - required final bool fromGeoip}) = _$TimeZoneInfoImpl; +abstract class Gap implements PartitionOrGap { + const factory Gap( + {required final int offset, + required final int size, + required final GapUsable usable}) = _$GapImpl; - factory _TimeZoneInfo.fromJson(Map json) = - _$TimeZoneInfoImpl.fromJson; + factory Gap.fromJson(Map json) = _$GapImpl.fromJson; @override - String get timezone; + int get offset; @override - bool get fromGeoip; + int get size; + GapUsable get usable; @override @JsonKey(ignore: true) - _$$TimeZoneInfoImplCopyWith<_$TimeZoneInfoImpl> get copyWith => + _$$GapImplCopyWith<_$GapImpl> get copyWith => throw _privateConstructorUsedError; } -UbuntuProInfo _$UbuntuProInfoFromJson(Map json) { - return _UbuntuProInfo.fromJson(json); +ZFS _$ZFSFromJson(Map json) { + return _ZFS.fromJson(json); } /// @nodoc -mixin _$UbuntuProInfo { - String get token => throw _privateConstructorUsedError; +mixin _$ZFS { + String get volume => throw _privateConstructorUsedError; + Map? get properties => throw _privateConstructorUsedError; Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $UbuntuProInfoCopyWith get copyWith => - throw _privateConstructorUsedError; + $ZFSCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class $UbuntuProInfoCopyWith<$Res> { - factory $UbuntuProInfoCopyWith( - UbuntuProInfo value, $Res Function(UbuntuProInfo) then) = - _$UbuntuProInfoCopyWithImpl<$Res, UbuntuProInfo>; +abstract class $ZFSCopyWith<$Res> { + factory $ZFSCopyWith(ZFS value, $Res Function(ZFS) then) = + _$ZFSCopyWithImpl<$Res, ZFS>; @useResult - $Res call({String token}); + $Res call({String volume, Map? properties}); } /// @nodoc -class _$UbuntuProInfoCopyWithImpl<$Res, $Val extends UbuntuProInfo> - implements $UbuntuProInfoCopyWith<$Res> { - _$UbuntuProInfoCopyWithImpl(this._value, this._then); +class _$ZFSCopyWithImpl<$Res, $Val extends ZFS> implements $ZFSCopyWith<$Res> { + _$ZFSCopyWithImpl(this._value, this._then); // ignore: unused_field final $Val _value; @@ -11565,135 +10049,168 @@ class _$UbuntuProInfoCopyWithImpl<$Res, $Val extends UbuntuProInfo> @pragma('vm:prefer-inline') @override $Res call({ - Object? token = null, + Object? volume = null, + Object? properties = freezed, }) { return _then(_value.copyWith( - token: null == token - ? _value.token - : token // ignore: cast_nullable_to_non_nullable + volume: null == volume + ? _value.volume + : volume // ignore: cast_nullable_to_non_nullable as String, + properties: freezed == properties + ? _value.properties + : properties // ignore: cast_nullable_to_non_nullable + as Map?, ) as $Val); } } /// @nodoc -abstract class _$$UbuntuProInfoImplCopyWith<$Res> - implements $UbuntuProInfoCopyWith<$Res> { - factory _$$UbuntuProInfoImplCopyWith( - _$UbuntuProInfoImpl value, $Res Function(_$UbuntuProInfoImpl) then) = - __$$UbuntuProInfoImplCopyWithImpl<$Res>; +abstract class _$$ZFSImplCopyWith<$Res> implements $ZFSCopyWith<$Res> { + factory _$$ZFSImplCopyWith(_$ZFSImpl value, $Res Function(_$ZFSImpl) then) = + __$$ZFSImplCopyWithImpl<$Res>; @override @useResult - $Res call({String token}); + $Res call({String volume, Map? properties}); } /// @nodoc -class __$$UbuntuProInfoImplCopyWithImpl<$Res> - extends _$UbuntuProInfoCopyWithImpl<$Res, _$UbuntuProInfoImpl> - implements _$$UbuntuProInfoImplCopyWith<$Res> { - __$$UbuntuProInfoImplCopyWithImpl( - _$UbuntuProInfoImpl _value, $Res Function(_$UbuntuProInfoImpl) _then) +class __$$ZFSImplCopyWithImpl<$Res> extends _$ZFSCopyWithImpl<$Res, _$ZFSImpl> + implements _$$ZFSImplCopyWith<$Res> { + __$$ZFSImplCopyWithImpl(_$ZFSImpl _value, $Res Function(_$ZFSImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? token = null, + Object? volume = null, + Object? properties = freezed, }) { - return _then(_$UbuntuProInfoImpl( - token: null == token - ? _value.token - : token // ignore: cast_nullable_to_non_nullable + return _then(_$ZFSImpl( + volume: null == volume + ? _value.volume + : volume // ignore: cast_nullable_to_non_nullable as String, + properties: freezed == properties + ? _value._properties + : properties // ignore: cast_nullable_to_non_nullable + as Map?, )); } } /// @nodoc @JsonSerializable() -class _$UbuntuProInfoImpl implements _UbuntuProInfo { - const _$UbuntuProInfoImpl({required this.token}); +class _$ZFSImpl implements _ZFS { + const _$ZFSImpl( + {required this.volume, final Map? properties}) + : _properties = properties; - factory _$UbuntuProInfoImpl.fromJson(Map json) => - _$$UbuntuProInfoImplFromJson(json); + factory _$ZFSImpl.fromJson(Map json) => + _$$ZFSImplFromJson(json); @override - final String token; + final String volume; + final Map? _properties; + @override + Map? get properties { + final value = _properties; + if (value == null) return null; + if (_properties is EqualUnmodifiableMapView) return _properties; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); + } @override String toString() { - return 'UbuntuProInfo(token: $token)'; + return 'ZFS(volume: $volume, properties: $properties)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$UbuntuProInfoImpl && - (identical(other.token, token) || other.token == token)); + other is _$ZFSImpl && + (identical(other.volume, volume) || other.volume == volume) && + const DeepCollectionEquality() + .equals(other._properties, _properties)); } @JsonKey(ignore: true) @override - int get hashCode => Object.hash(runtimeType, token); + int get hashCode => Object.hash( + runtimeType, volume, const DeepCollectionEquality().hash(_properties)); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$UbuntuProInfoImplCopyWith<_$UbuntuProInfoImpl> get copyWith => - __$$UbuntuProInfoImplCopyWithImpl<_$UbuntuProInfoImpl>(this, _$identity); + _$$ZFSImplCopyWith<_$ZFSImpl> get copyWith => + __$$ZFSImplCopyWithImpl<_$ZFSImpl>(this, _$identity); @override Map toJson() { - return _$$UbuntuProInfoImplToJson( + return _$$ZFSImplToJson( this, ); } } -abstract class _UbuntuProInfo implements UbuntuProInfo { - const factory _UbuntuProInfo({required final String token}) = - _$UbuntuProInfoImpl; +abstract class _ZFS implements ZFS { + const factory _ZFS( + {required final String volume, + final Map? properties}) = _$ZFSImpl; - factory _UbuntuProInfo.fromJson(Map json) = - _$UbuntuProInfoImpl.fromJson; + factory _ZFS.fromJson(Map json) = _$ZFSImpl.fromJson; @override - String get token; + String get volume; + @override + Map? get properties; @override @JsonKey(ignore: true) - _$$UbuntuProInfoImplCopyWith<_$UbuntuProInfoImpl> get copyWith => + _$$ZFSImplCopyWith<_$ZFSImpl> get copyWith => throw _privateConstructorUsedError; } -UbuntuProResponse _$UbuntuProResponseFromJson(Map json) { - return _UbuntuProResponse.fromJson(json); +ZPool _$ZPoolFromJson(Map json) { + return _ZPool.fromJson(json); } /// @nodoc -mixin _$UbuntuProResponse { - String get token => throw _privateConstructorUsedError; - bool get hasNetwork => throw _privateConstructorUsedError; +mixin _$ZPool { + String get pool => throw _privateConstructorUsedError; + String get mountpoint => throw _privateConstructorUsedError; + ZFS? get zfses => throw _privateConstructorUsedError; + Map? get poolProperties => + throw _privateConstructorUsedError; + Map? get fsProperties => throw _privateConstructorUsedError; + bool? get defaultFeatures => throw _privateConstructorUsedError; Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $UbuntuProResponseCopyWith get copyWith => - throw _privateConstructorUsedError; + $ZPoolCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class $UbuntuProResponseCopyWith<$Res> { - factory $UbuntuProResponseCopyWith( - UbuntuProResponse value, $Res Function(UbuntuProResponse) then) = - _$UbuntuProResponseCopyWithImpl<$Res, UbuntuProResponse>; +abstract class $ZPoolCopyWith<$Res> { + factory $ZPoolCopyWith(ZPool value, $Res Function(ZPool) then) = + _$ZPoolCopyWithImpl<$Res, ZPool>; @useResult - $Res call({String token, bool hasNetwork}); + $Res call( + {String pool, + String mountpoint, + ZFS? zfses, + Map? poolProperties, + Map? fsProperties, + bool? defaultFeatures}); + + $ZFSCopyWith<$Res>? get zfses; } /// @nodoc -class _$UbuntuProResponseCopyWithImpl<$Res, $Val extends UbuntuProResponse> - implements $UbuntuProResponseCopyWith<$Res> { - _$UbuntuProResponseCopyWithImpl(this._value, this._then); +class _$ZPoolCopyWithImpl<$Res, $Val extends ZPool> + implements $ZPoolCopyWith<$Res> { + _$ZPoolCopyWithImpl(this._value, this._then); // ignore: unused_field final $Val _value; @@ -11703,156 +10220,296 @@ class _$UbuntuProResponseCopyWithImpl<$Res, $Val extends UbuntuProResponse> @pragma('vm:prefer-inline') @override $Res call({ - Object? token = null, - Object? hasNetwork = null, + Object? pool = null, + Object? mountpoint = null, + Object? zfses = freezed, + Object? poolProperties = freezed, + Object? fsProperties = freezed, + Object? defaultFeatures = freezed, }) { return _then(_value.copyWith( - token: null == token - ? _value.token - : token // ignore: cast_nullable_to_non_nullable + pool: null == pool + ? _value.pool + : pool // ignore: cast_nullable_to_non_nullable as String, - hasNetwork: null == hasNetwork - ? _value.hasNetwork - : hasNetwork // ignore: cast_nullable_to_non_nullable - as bool, + mountpoint: null == mountpoint + ? _value.mountpoint + : mountpoint // ignore: cast_nullable_to_non_nullable + as String, + zfses: freezed == zfses + ? _value.zfses + : zfses // ignore: cast_nullable_to_non_nullable + as ZFS?, + poolProperties: freezed == poolProperties + ? _value.poolProperties + : poolProperties // ignore: cast_nullable_to_non_nullable + as Map?, + fsProperties: freezed == fsProperties + ? _value.fsProperties + : fsProperties // ignore: cast_nullable_to_non_nullable + as Map?, + defaultFeatures: freezed == defaultFeatures + ? _value.defaultFeatures + : defaultFeatures // ignore: cast_nullable_to_non_nullable + as bool?, ) as $Val); } + + @override + @pragma('vm:prefer-inline') + $ZFSCopyWith<$Res>? get zfses { + if (_value.zfses == null) { + return null; + } + + return $ZFSCopyWith<$Res>(_value.zfses!, (value) { + return _then(_value.copyWith(zfses: value) as $Val); + }); + } } /// @nodoc -abstract class _$$UbuntuProResponseImplCopyWith<$Res> - implements $UbuntuProResponseCopyWith<$Res> { - factory _$$UbuntuProResponseImplCopyWith(_$UbuntuProResponseImpl value, - $Res Function(_$UbuntuProResponseImpl) then) = - __$$UbuntuProResponseImplCopyWithImpl<$Res>; +abstract class _$$ZPoolImplCopyWith<$Res> implements $ZPoolCopyWith<$Res> { + factory _$$ZPoolImplCopyWith( + _$ZPoolImpl value, $Res Function(_$ZPoolImpl) then) = + __$$ZPoolImplCopyWithImpl<$Res>; @override @useResult - $Res call({String token, bool hasNetwork}); + $Res call( + {String pool, + String mountpoint, + ZFS? zfses, + Map? poolProperties, + Map? fsProperties, + bool? defaultFeatures}); + + @override + $ZFSCopyWith<$Res>? get zfses; } /// @nodoc -class __$$UbuntuProResponseImplCopyWithImpl<$Res> - extends _$UbuntuProResponseCopyWithImpl<$Res, _$UbuntuProResponseImpl> - implements _$$UbuntuProResponseImplCopyWith<$Res> { - __$$UbuntuProResponseImplCopyWithImpl(_$UbuntuProResponseImpl _value, - $Res Function(_$UbuntuProResponseImpl) _then) +class __$$ZPoolImplCopyWithImpl<$Res> + extends _$ZPoolCopyWithImpl<$Res, _$ZPoolImpl> + implements _$$ZPoolImplCopyWith<$Res> { + __$$ZPoolImplCopyWithImpl( + _$ZPoolImpl _value, $Res Function(_$ZPoolImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? token = null, - Object? hasNetwork = null, + Object? pool = null, + Object? mountpoint = null, + Object? zfses = freezed, + Object? poolProperties = freezed, + Object? fsProperties = freezed, + Object? defaultFeatures = freezed, }) { - return _then(_$UbuntuProResponseImpl( - token: null == token - ? _value.token - : token // ignore: cast_nullable_to_non_nullable + return _then(_$ZPoolImpl( + pool: null == pool + ? _value.pool + : pool // ignore: cast_nullable_to_non_nullable as String, - hasNetwork: null == hasNetwork - ? _value.hasNetwork - : hasNetwork // ignore: cast_nullable_to_non_nullable - as bool, + mountpoint: null == mountpoint + ? _value.mountpoint + : mountpoint // ignore: cast_nullable_to_non_nullable + as String, + zfses: freezed == zfses + ? _value.zfses + : zfses // ignore: cast_nullable_to_non_nullable + as ZFS?, + poolProperties: freezed == poolProperties + ? _value._poolProperties + : poolProperties // ignore: cast_nullable_to_non_nullable + as Map?, + fsProperties: freezed == fsProperties + ? _value._fsProperties + : fsProperties // ignore: cast_nullable_to_non_nullable + as Map?, + defaultFeatures: freezed == defaultFeatures + ? _value.defaultFeatures + : defaultFeatures // ignore: cast_nullable_to_non_nullable + as bool?, )); } } /// @nodoc @JsonSerializable() -class _$UbuntuProResponseImpl implements _UbuntuProResponse { - const _$UbuntuProResponseImpl( - {required this.token, required this.hasNetwork}); +class _$ZPoolImpl implements _ZPool { + const _$ZPoolImpl( + {required this.pool, + required this.mountpoint, + this.zfses, + final Map? poolProperties, + final Map? fsProperties, + this.defaultFeatures = true}) + : _poolProperties = poolProperties, + _fsProperties = fsProperties; - factory _$UbuntuProResponseImpl.fromJson(Map json) => - _$$UbuntuProResponseImplFromJson(json); + factory _$ZPoolImpl.fromJson(Map json) => + _$$ZPoolImplFromJson(json); @override - final String token; + final String pool; @override - final bool hasNetwork; + final String mountpoint; + @override + final ZFS? zfses; + final Map? _poolProperties; + @override + Map? get poolProperties { + final value = _poolProperties; + if (value == null) return null; + if (_poolProperties is EqualUnmodifiableMapView) return _poolProperties; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); + } + + final Map? _fsProperties; + @override + Map? get fsProperties { + final value = _fsProperties; + if (value == null) return null; + if (_fsProperties is EqualUnmodifiableMapView) return _fsProperties; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); + } + + @override + @JsonKey() + final bool? defaultFeatures; @override String toString() { - return 'UbuntuProResponse(token: $token, hasNetwork: $hasNetwork)'; + return 'ZPool(pool: $pool, mountpoint: $mountpoint, zfses: $zfses, poolProperties: $poolProperties, fsProperties: $fsProperties, defaultFeatures: $defaultFeatures)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$UbuntuProResponseImpl && - (identical(other.token, token) || other.token == token) && - (identical(other.hasNetwork, hasNetwork) || - other.hasNetwork == hasNetwork)); + other is _$ZPoolImpl && + (identical(other.pool, pool) || other.pool == pool) && + (identical(other.mountpoint, mountpoint) || + other.mountpoint == mountpoint) && + (identical(other.zfses, zfses) || other.zfses == zfses) && + const DeepCollectionEquality() + .equals(other._poolProperties, _poolProperties) && + const DeepCollectionEquality() + .equals(other._fsProperties, _fsProperties) && + (identical(other.defaultFeatures, defaultFeatures) || + other.defaultFeatures == defaultFeatures)); } @JsonKey(ignore: true) @override - int get hashCode => Object.hash(runtimeType, token, hasNetwork); + int get hashCode => Object.hash( + runtimeType, + pool, + mountpoint, + zfses, + const DeepCollectionEquality().hash(_poolProperties), + const DeepCollectionEquality().hash(_fsProperties), + defaultFeatures); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$UbuntuProResponseImplCopyWith<_$UbuntuProResponseImpl> get copyWith => - __$$UbuntuProResponseImplCopyWithImpl<_$UbuntuProResponseImpl>( - this, _$identity); + _$$ZPoolImplCopyWith<_$ZPoolImpl> get copyWith => + __$$ZPoolImplCopyWithImpl<_$ZPoolImpl>(this, _$identity); @override Map toJson() { - return _$$UbuntuProResponseImplToJson( + return _$$ZPoolImplToJson( this, ); } } -abstract class _UbuntuProResponse implements UbuntuProResponse { - const factory _UbuntuProResponse( - {required final String token, - required final bool hasNetwork}) = _$UbuntuProResponseImpl; +abstract class _ZPool implements ZPool { + const factory _ZPool( + {required final String pool, + required final String mountpoint, + final ZFS? zfses, + final Map? poolProperties, + final Map? fsProperties, + final bool? defaultFeatures}) = _$ZPoolImpl; - factory _UbuntuProResponse.fromJson(Map json) = - _$UbuntuProResponseImpl.fromJson; + factory _ZPool.fromJson(Map json) = _$ZPoolImpl.fromJson; @override - String get token; + String get pool; + @override + String get mountpoint; + @override + ZFS? get zfses; + @override + Map? get poolProperties; @override - bool get hasNetwork; + Map? get fsProperties; + @override + bool? get defaultFeatures; @override @JsonKey(ignore: true) - _$$UbuntuProResponseImplCopyWith<_$UbuntuProResponseImpl> get copyWith => + _$$ZPoolImplCopyWith<_$ZPoolImpl> get copyWith => throw _privateConstructorUsedError; } -UbuntuProGeneralInfo _$UbuntuProGeneralInfoFromJson(Map json) { - return _UbuntuProGeneralInfo.fromJson(json); +Disk _$DiskFromJson(Map json) { + return _Disk.fromJson(json); } /// @nodoc -mixin _$UbuntuProGeneralInfo { - int? get eolEsmYear => throw _privateConstructorUsedError; - int get universePackages => throw _privateConstructorUsedError; - int get mainPackages => throw _privateConstructorUsedError; +mixin _$Disk { + String get id => throw _privateConstructorUsedError; + String get label => throw _privateConstructorUsedError; + String get type => throw _privateConstructorUsedError; + int get size => throw _privateConstructorUsedError; + List get usageLabels => throw _privateConstructorUsedError; + List get partitions => throw _privateConstructorUsedError; + bool get okForGuided => throw _privateConstructorUsedError; + String? get ptable => throw _privateConstructorUsedError; + bool get preserve => throw _privateConstructorUsedError; + String? get path => throw _privateConstructorUsedError; + bool get bootDevice => throw _privateConstructorUsedError; + bool get canBeBootDevice => throw _privateConstructorUsedError; + String? get model => throw _privateConstructorUsedError; + String? get vendor => throw _privateConstructorUsedError; + bool get hasInUsePartition => throw _privateConstructorUsedError; Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $UbuntuProGeneralInfoCopyWith get copyWith => - throw _privateConstructorUsedError; + $DiskCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class $UbuntuProGeneralInfoCopyWith<$Res> { - factory $UbuntuProGeneralInfoCopyWith(UbuntuProGeneralInfo value, - $Res Function(UbuntuProGeneralInfo) then) = - _$UbuntuProGeneralInfoCopyWithImpl<$Res, UbuntuProGeneralInfo>; +abstract class $DiskCopyWith<$Res> { + factory $DiskCopyWith(Disk value, $Res Function(Disk) then) = + _$DiskCopyWithImpl<$Res, Disk>; @useResult - $Res call({int? eolEsmYear, int universePackages, int mainPackages}); + $Res call( + {String id, + String label, + String type, + int size, + List usageLabels, + List partitions, + bool okForGuided, + String? ptable, + bool preserve, + String? path, + bool bootDevice, + bool canBeBootDevice, + String? model, + String? vendor, + bool hasInUsePartition}); } /// @nodoc -class _$UbuntuProGeneralInfoCopyWithImpl<$Res, - $Val extends UbuntuProGeneralInfo> - implements $UbuntuProGeneralInfoCopyWith<$Res> { - _$UbuntuProGeneralInfoCopyWithImpl(this._value, this._then); +class _$DiskCopyWithImpl<$Res, $Val extends Disk> + implements $DiskCopyWith<$Res> { + _$DiskCopyWithImpl(this._value, this._then); // ignore: unused_field final $Val _value; @@ -11862,177 +10519,432 @@ class _$UbuntuProGeneralInfoCopyWithImpl<$Res, @pragma('vm:prefer-inline') @override $Res call({ - Object? eolEsmYear = freezed, - Object? universePackages = null, - Object? mainPackages = null, + Object? id = null, + Object? label = null, + Object? type = null, + Object? size = null, + Object? usageLabels = null, + Object? partitions = null, + Object? okForGuided = null, + Object? ptable = freezed, + Object? preserve = null, + Object? path = freezed, + Object? bootDevice = null, + Object? canBeBootDevice = null, + Object? model = freezed, + Object? vendor = freezed, + Object? hasInUsePartition = null, }) { return _then(_value.copyWith( - eolEsmYear: freezed == eolEsmYear - ? _value.eolEsmYear - : eolEsmYear // ignore: cast_nullable_to_non_nullable - as int?, - universePackages: null == universePackages - ? _value.universePackages - : universePackages // ignore: cast_nullable_to_non_nullable - as int, - mainPackages: null == mainPackages - ? _value.mainPackages - : mainPackages // ignore: cast_nullable_to_non_nullable + id: null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as String, + label: null == label + ? _value.label + : label // ignore: cast_nullable_to_non_nullable + as String, + type: null == type + ? _value.type + : type // ignore: cast_nullable_to_non_nullable + as String, + size: null == size + ? _value.size + : size // ignore: cast_nullable_to_non_nullable as int, + usageLabels: null == usageLabels + ? _value.usageLabels + : usageLabels // ignore: cast_nullable_to_non_nullable + as List, + partitions: null == partitions + ? _value.partitions + : partitions // ignore: cast_nullable_to_non_nullable + as List, + okForGuided: null == okForGuided + ? _value.okForGuided + : okForGuided // ignore: cast_nullable_to_non_nullable + as bool, + ptable: freezed == ptable + ? _value.ptable + : ptable // ignore: cast_nullable_to_non_nullable + as String?, + preserve: null == preserve + ? _value.preserve + : preserve // ignore: cast_nullable_to_non_nullable + as bool, + path: freezed == path + ? _value.path + : path // ignore: cast_nullable_to_non_nullable + as String?, + bootDevice: null == bootDevice + ? _value.bootDevice + : bootDevice // ignore: cast_nullable_to_non_nullable + as bool, + canBeBootDevice: null == canBeBootDevice + ? _value.canBeBootDevice + : canBeBootDevice // ignore: cast_nullable_to_non_nullable + as bool, + model: freezed == model + ? _value.model + : model // ignore: cast_nullable_to_non_nullable + as String?, + vendor: freezed == vendor + ? _value.vendor + : vendor // ignore: cast_nullable_to_non_nullable + as String?, + hasInUsePartition: null == hasInUsePartition + ? _value.hasInUsePartition + : hasInUsePartition // ignore: cast_nullable_to_non_nullable + as bool, ) as $Val); } } /// @nodoc -abstract class _$$UbuntuProGeneralInfoImplCopyWith<$Res> - implements $UbuntuProGeneralInfoCopyWith<$Res> { - factory _$$UbuntuProGeneralInfoImplCopyWith(_$UbuntuProGeneralInfoImpl value, - $Res Function(_$UbuntuProGeneralInfoImpl) then) = - __$$UbuntuProGeneralInfoImplCopyWithImpl<$Res>; +abstract class _$$DiskImplCopyWith<$Res> implements $DiskCopyWith<$Res> { + factory _$$DiskImplCopyWith( + _$DiskImpl value, $Res Function(_$DiskImpl) then) = + __$$DiskImplCopyWithImpl<$Res>; @override @useResult - $Res call({int? eolEsmYear, int universePackages, int mainPackages}); + $Res call( + {String id, + String label, + String type, + int size, + List usageLabels, + List partitions, + bool okForGuided, + String? ptable, + bool preserve, + String? path, + bool bootDevice, + bool canBeBootDevice, + String? model, + String? vendor, + bool hasInUsePartition}); } /// @nodoc -class __$$UbuntuProGeneralInfoImplCopyWithImpl<$Res> - extends _$UbuntuProGeneralInfoCopyWithImpl<$Res, _$UbuntuProGeneralInfoImpl> - implements _$$UbuntuProGeneralInfoImplCopyWith<$Res> { - __$$UbuntuProGeneralInfoImplCopyWithImpl(_$UbuntuProGeneralInfoImpl _value, - $Res Function(_$UbuntuProGeneralInfoImpl) _then) +class __$$DiskImplCopyWithImpl<$Res> + extends _$DiskCopyWithImpl<$Res, _$DiskImpl> + implements _$$DiskImplCopyWith<$Res> { + __$$DiskImplCopyWithImpl(_$DiskImpl _value, $Res Function(_$DiskImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? eolEsmYear = freezed, - Object? universePackages = null, - Object? mainPackages = null, + Object? id = null, + Object? label = null, + Object? type = null, + Object? size = null, + Object? usageLabels = null, + Object? partitions = null, + Object? okForGuided = null, + Object? ptable = freezed, + Object? preserve = null, + Object? path = freezed, + Object? bootDevice = null, + Object? canBeBootDevice = null, + Object? model = freezed, + Object? vendor = freezed, + Object? hasInUsePartition = null, }) { - return _then(_$UbuntuProGeneralInfoImpl( - eolEsmYear: freezed == eolEsmYear - ? _value.eolEsmYear - : eolEsmYear // ignore: cast_nullable_to_non_nullable - as int?, - universePackages: null == universePackages - ? _value.universePackages - : universePackages // ignore: cast_nullable_to_non_nullable - as int, - mainPackages: null == mainPackages - ? _value.mainPackages - : mainPackages // ignore: cast_nullable_to_non_nullable + return _then(_$DiskImpl( + id: null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as String, + label: null == label + ? _value.label + : label // ignore: cast_nullable_to_non_nullable + as String, + type: null == type + ? _value.type + : type // ignore: cast_nullable_to_non_nullable + as String, + size: null == size + ? _value.size + : size // ignore: cast_nullable_to_non_nullable as int, + usageLabels: null == usageLabels + ? _value._usageLabels + : usageLabels // ignore: cast_nullable_to_non_nullable + as List, + partitions: null == partitions + ? _value._partitions + : partitions // ignore: cast_nullable_to_non_nullable + as List, + okForGuided: null == okForGuided + ? _value.okForGuided + : okForGuided // ignore: cast_nullable_to_non_nullable + as bool, + ptable: freezed == ptable + ? _value.ptable + : ptable // ignore: cast_nullable_to_non_nullable + as String?, + preserve: null == preserve + ? _value.preserve + : preserve // ignore: cast_nullable_to_non_nullable + as bool, + path: freezed == path + ? _value.path + : path // ignore: cast_nullable_to_non_nullable + as String?, + bootDevice: null == bootDevice + ? _value.bootDevice + : bootDevice // ignore: cast_nullable_to_non_nullable + as bool, + canBeBootDevice: null == canBeBootDevice + ? _value.canBeBootDevice + : canBeBootDevice // ignore: cast_nullable_to_non_nullable + as bool, + model: freezed == model + ? _value.model + : model // ignore: cast_nullable_to_non_nullable + as String?, + vendor: freezed == vendor + ? _value.vendor + : vendor // ignore: cast_nullable_to_non_nullable + as String?, + hasInUsePartition: null == hasInUsePartition + ? _value.hasInUsePartition + : hasInUsePartition // ignore: cast_nullable_to_non_nullable + as bool, )); } } /// @nodoc @JsonSerializable() -class _$UbuntuProGeneralInfoImpl implements _UbuntuProGeneralInfo { - const _$UbuntuProGeneralInfoImpl( - {required this.eolEsmYear, - required this.universePackages, - required this.mainPackages}); +class _$DiskImpl implements _Disk { + const _$DiskImpl( + {required this.id, + required this.label, + required this.type, + required this.size, + required final List usageLabels, + required final List partitions, + required this.okForGuided, + required this.ptable, + required this.preserve, + required this.path, + required this.bootDevice, + required this.canBeBootDevice, + this.model, + this.vendor, + this.hasInUsePartition = false}) + : _usageLabels = usageLabels, + _partitions = partitions; - factory _$UbuntuProGeneralInfoImpl.fromJson(Map json) => - _$$UbuntuProGeneralInfoImplFromJson(json); + factory _$DiskImpl.fromJson(Map json) => + _$$DiskImplFromJson(json); @override - final int? eolEsmYear; + final String id; @override - final int universePackages; + final String label; @override - final int mainPackages; + final String type; + @override + final int size; + final List _usageLabels; + @override + List get usageLabels { + if (_usageLabels is EqualUnmodifiableListView) return _usageLabels; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_usageLabels); + } + + final List _partitions; + @override + List get partitions { + if (_partitions is EqualUnmodifiableListView) return _partitions; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_partitions); + } + + @override + final bool okForGuided; + @override + final String? ptable; + @override + final bool preserve; + @override + final String? path; + @override + final bool bootDevice; + @override + final bool canBeBootDevice; + @override + final String? model; + @override + final String? vendor; + @override + @JsonKey() + final bool hasInUsePartition; @override String toString() { - return 'UbuntuProGeneralInfo(eolEsmYear: $eolEsmYear, universePackages: $universePackages, mainPackages: $mainPackages)'; + return 'Disk(id: $id, label: $label, type: $type, size: $size, usageLabels: $usageLabels, partitions: $partitions, okForGuided: $okForGuided, ptable: $ptable, preserve: $preserve, path: $path, bootDevice: $bootDevice, canBeBootDevice: $canBeBootDevice, model: $model, vendor: $vendor, hasInUsePartition: $hasInUsePartition)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$UbuntuProGeneralInfoImpl && - (identical(other.eolEsmYear, eolEsmYear) || - other.eolEsmYear == eolEsmYear) && - (identical(other.universePackages, universePackages) || - other.universePackages == universePackages) && - (identical(other.mainPackages, mainPackages) || - other.mainPackages == mainPackages)); + other is _$DiskImpl && + (identical(other.id, id) || other.id == id) && + (identical(other.label, label) || other.label == label) && + (identical(other.type, type) || other.type == type) && + (identical(other.size, size) || other.size == size) && + const DeepCollectionEquality() + .equals(other._usageLabels, _usageLabels) && + const DeepCollectionEquality() + .equals(other._partitions, _partitions) && + (identical(other.okForGuided, okForGuided) || + other.okForGuided == okForGuided) && + (identical(other.ptable, ptable) || other.ptable == ptable) && + (identical(other.preserve, preserve) || + other.preserve == preserve) && + (identical(other.path, path) || other.path == path) && + (identical(other.bootDevice, bootDevice) || + other.bootDevice == bootDevice) && + (identical(other.canBeBootDevice, canBeBootDevice) || + other.canBeBootDevice == canBeBootDevice) && + (identical(other.model, model) || other.model == model) && + (identical(other.vendor, vendor) || other.vendor == vendor) && + (identical(other.hasInUsePartition, hasInUsePartition) || + other.hasInUsePartition == hasInUsePartition)); } @JsonKey(ignore: true) @override - int get hashCode => - Object.hash(runtimeType, eolEsmYear, universePackages, mainPackages); + int get hashCode => Object.hash( + runtimeType, + id, + label, + type, + size, + const DeepCollectionEquality().hash(_usageLabels), + const DeepCollectionEquality().hash(_partitions), + okForGuided, + ptable, + preserve, + path, + bootDevice, + canBeBootDevice, + model, + vendor, + hasInUsePartition); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$UbuntuProGeneralInfoImplCopyWith<_$UbuntuProGeneralInfoImpl> - get copyWith => - __$$UbuntuProGeneralInfoImplCopyWithImpl<_$UbuntuProGeneralInfoImpl>( - this, _$identity); + _$$DiskImplCopyWith<_$DiskImpl> get copyWith => + __$$DiskImplCopyWithImpl<_$DiskImpl>(this, _$identity); @override Map toJson() { - return _$$UbuntuProGeneralInfoImplToJson( + return _$$DiskImplToJson( this, ); } } -abstract class _UbuntuProGeneralInfo implements UbuntuProGeneralInfo { - const factory _UbuntuProGeneralInfo( - {required final int? eolEsmYear, - required final int universePackages, - required final int mainPackages}) = _$UbuntuProGeneralInfoImpl; +abstract class _Disk implements Disk { + const factory _Disk( + {required final String id, + required final String label, + required final String type, + required final int size, + required final List usageLabels, + required final List partitions, + required final bool okForGuided, + required final String? ptable, + required final bool preserve, + required final String? path, + required final bool bootDevice, + required final bool canBeBootDevice, + final String? model, + final String? vendor, + final bool hasInUsePartition}) = _$DiskImpl; - factory _UbuntuProGeneralInfo.fromJson(Map json) = - _$UbuntuProGeneralInfoImpl.fromJson; + factory _Disk.fromJson(Map json) = _$DiskImpl.fromJson; @override - int? get eolEsmYear; + String get id; @override - int get universePackages; + String get label; @override - int get mainPackages; + String get type; + @override + int get size; + @override + List get usageLabels; + @override + List get partitions; + @override + bool get okForGuided; + @override + String? get ptable; + @override + bool get preserve; + @override + String? get path; + @override + bool get bootDevice; + @override + bool get canBeBootDevice; + @override + String? get model; + @override + String? get vendor; + @override + bool get hasInUsePartition; @override @JsonKey(ignore: true) - _$$UbuntuProGeneralInfoImplCopyWith<_$UbuntuProGeneralInfoImpl> - get copyWith => throw _privateConstructorUsedError; + _$$DiskImplCopyWith<_$DiskImpl> get copyWith => + throw _privateConstructorUsedError; } -UPCSInitiateResponse _$UPCSInitiateResponseFromJson(Map json) { - return _UPCSInitiateResponse.fromJson(json); +GuidedDisallowedCapability _$GuidedDisallowedCapabilityFromJson( + Map json) { + return _GuidedDisallowedCapability.fromJson(json); } /// @nodoc -mixin _$UPCSInitiateResponse { - String get userCode => throw _privateConstructorUsedError; - int get validitySeconds => throw _privateConstructorUsedError; +mixin _$GuidedDisallowedCapability { + GuidedCapability get capability => throw _privateConstructorUsedError; + GuidedDisallowedCapabilityReason get reason => + throw _privateConstructorUsedError; + String? get message => throw _privateConstructorUsedError; Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $UPCSInitiateResponseCopyWith get copyWith => - throw _privateConstructorUsedError; + $GuidedDisallowedCapabilityCopyWith + get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class $UPCSInitiateResponseCopyWith<$Res> { - factory $UPCSInitiateResponseCopyWith(UPCSInitiateResponse value, - $Res Function(UPCSInitiateResponse) then) = - _$UPCSInitiateResponseCopyWithImpl<$Res, UPCSInitiateResponse>; +abstract class $GuidedDisallowedCapabilityCopyWith<$Res> { + factory $GuidedDisallowedCapabilityCopyWith(GuidedDisallowedCapability value, + $Res Function(GuidedDisallowedCapability) then) = + _$GuidedDisallowedCapabilityCopyWithImpl<$Res, + GuidedDisallowedCapability>; @useResult - $Res call({String userCode, int validitySeconds}); + $Res call( + {GuidedCapability capability, + GuidedDisallowedCapabilityReason reason, + String? message}); } /// @nodoc -class _$UPCSInitiateResponseCopyWithImpl<$Res, - $Val extends UPCSInitiateResponse> - implements $UPCSInitiateResponseCopyWith<$Res> { - _$UPCSInitiateResponseCopyWithImpl(this._value, this._then); +class _$GuidedDisallowedCapabilityCopyWithImpl<$Res, + $Val extends GuidedDisallowedCapability> + implements $GuidedDisallowedCapabilityCopyWith<$Res> { + _$GuidedDisallowedCapabilityCopyWithImpl(this._value, this._then); // ignore: unused_field final $Val _value; @@ -12042,156 +10954,192 @@ class _$UPCSInitiateResponseCopyWithImpl<$Res, @pragma('vm:prefer-inline') @override $Res call({ - Object? userCode = null, - Object? validitySeconds = null, + Object? capability = null, + Object? reason = null, + Object? message = freezed, }) { return _then(_value.copyWith( - userCode: null == userCode - ? _value.userCode - : userCode // ignore: cast_nullable_to_non_nullable - as String, - validitySeconds: null == validitySeconds - ? _value.validitySeconds - : validitySeconds // ignore: cast_nullable_to_non_nullable - as int, + capability: null == capability + ? _value.capability + : capability // ignore: cast_nullable_to_non_nullable + as GuidedCapability, + reason: null == reason + ? _value.reason + : reason // ignore: cast_nullable_to_non_nullable + as GuidedDisallowedCapabilityReason, + message: freezed == message + ? _value.message + : message // ignore: cast_nullable_to_non_nullable + as String?, ) as $Val); } } /// @nodoc -abstract class _$$UPCSInitiateResponseImplCopyWith<$Res> - implements $UPCSInitiateResponseCopyWith<$Res> { - factory _$$UPCSInitiateResponseImplCopyWith(_$UPCSInitiateResponseImpl value, - $Res Function(_$UPCSInitiateResponseImpl) then) = - __$$UPCSInitiateResponseImplCopyWithImpl<$Res>; +abstract class _$$GuidedDisallowedCapabilityImplCopyWith<$Res> + implements $GuidedDisallowedCapabilityCopyWith<$Res> { + factory _$$GuidedDisallowedCapabilityImplCopyWith( + _$GuidedDisallowedCapabilityImpl value, + $Res Function(_$GuidedDisallowedCapabilityImpl) then) = + __$$GuidedDisallowedCapabilityImplCopyWithImpl<$Res>; @override @useResult - $Res call({String userCode, int validitySeconds}); + $Res call( + {GuidedCapability capability, + GuidedDisallowedCapabilityReason reason, + String? message}); } /// @nodoc -class __$$UPCSInitiateResponseImplCopyWithImpl<$Res> - extends _$UPCSInitiateResponseCopyWithImpl<$Res, _$UPCSInitiateResponseImpl> - implements _$$UPCSInitiateResponseImplCopyWith<$Res> { - __$$UPCSInitiateResponseImplCopyWithImpl(_$UPCSInitiateResponseImpl _value, - $Res Function(_$UPCSInitiateResponseImpl) _then) +class __$$GuidedDisallowedCapabilityImplCopyWithImpl<$Res> + extends _$GuidedDisallowedCapabilityCopyWithImpl<$Res, + _$GuidedDisallowedCapabilityImpl> + implements _$$GuidedDisallowedCapabilityImplCopyWith<$Res> { + __$$GuidedDisallowedCapabilityImplCopyWithImpl( + _$GuidedDisallowedCapabilityImpl _value, + $Res Function(_$GuidedDisallowedCapabilityImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? userCode = null, - Object? validitySeconds = null, + Object? capability = null, + Object? reason = null, + Object? message = freezed, }) { - return _then(_$UPCSInitiateResponseImpl( - userCode: null == userCode - ? _value.userCode - : userCode // ignore: cast_nullable_to_non_nullable - as String, - validitySeconds: null == validitySeconds - ? _value.validitySeconds - : validitySeconds // ignore: cast_nullable_to_non_nullable - as int, + return _then(_$GuidedDisallowedCapabilityImpl( + capability: null == capability + ? _value.capability + : capability // ignore: cast_nullable_to_non_nullable + as GuidedCapability, + reason: null == reason + ? _value.reason + : reason // ignore: cast_nullable_to_non_nullable + as GuidedDisallowedCapabilityReason, + message: freezed == message + ? _value.message + : message // ignore: cast_nullable_to_non_nullable + as String?, )); } } /// @nodoc @JsonSerializable() -class _$UPCSInitiateResponseImpl implements _UPCSInitiateResponse { - const _$UPCSInitiateResponseImpl( - {required this.userCode, required this.validitySeconds}); +class _$GuidedDisallowedCapabilityImpl implements _GuidedDisallowedCapability { + const _$GuidedDisallowedCapabilityImpl( + {required this.capability, required this.reason, this.message}); - factory _$UPCSInitiateResponseImpl.fromJson(Map json) => - _$$UPCSInitiateResponseImplFromJson(json); + factory _$GuidedDisallowedCapabilityImpl.fromJson( + Map json) => + _$$GuidedDisallowedCapabilityImplFromJson(json); @override - final String userCode; + final GuidedCapability capability; @override - final int validitySeconds; + final GuidedDisallowedCapabilityReason reason; + @override + final String? message; @override String toString() { - return 'UPCSInitiateResponse(userCode: $userCode, validitySeconds: $validitySeconds)'; + return 'GuidedDisallowedCapability(capability: $capability, reason: $reason, message: $message)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$UPCSInitiateResponseImpl && - (identical(other.userCode, userCode) || - other.userCode == userCode) && - (identical(other.validitySeconds, validitySeconds) || - other.validitySeconds == validitySeconds)); + other is _$GuidedDisallowedCapabilityImpl && + (identical(other.capability, capability) || + other.capability == capability) && + (identical(other.reason, reason) || other.reason == reason) && + (identical(other.message, message) || other.message == message)); } @JsonKey(ignore: true) @override - int get hashCode => Object.hash(runtimeType, userCode, validitySeconds); + int get hashCode => Object.hash(runtimeType, capability, reason, message); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$UPCSInitiateResponseImplCopyWith<_$UPCSInitiateResponseImpl> - get copyWith => - __$$UPCSInitiateResponseImplCopyWithImpl<_$UPCSInitiateResponseImpl>( - this, _$identity); + _$$GuidedDisallowedCapabilityImplCopyWith<_$GuidedDisallowedCapabilityImpl> + get copyWith => __$$GuidedDisallowedCapabilityImplCopyWithImpl< + _$GuidedDisallowedCapabilityImpl>(this, _$identity); @override Map toJson() { - return _$$UPCSInitiateResponseImplToJson( + return _$$GuidedDisallowedCapabilityImplToJson( this, ); } } -abstract class _UPCSInitiateResponse implements UPCSInitiateResponse { - const factory _UPCSInitiateResponse( - {required final String userCode, - required final int validitySeconds}) = _$UPCSInitiateResponseImpl; +abstract class _GuidedDisallowedCapability + implements GuidedDisallowedCapability { + const factory _GuidedDisallowedCapability( + {required final GuidedCapability capability, + required final GuidedDisallowedCapabilityReason reason, + final String? message}) = _$GuidedDisallowedCapabilityImpl; - factory _UPCSInitiateResponse.fromJson(Map json) = - _$UPCSInitiateResponseImpl.fromJson; + factory _GuidedDisallowedCapability.fromJson(Map json) = + _$GuidedDisallowedCapabilityImpl.fromJson; @override - String get userCode; + GuidedCapability get capability; @override - int get validitySeconds; + GuidedDisallowedCapabilityReason get reason; + @override + String? get message; @override @JsonKey(ignore: true) - _$$UPCSInitiateResponseImplCopyWith<_$UPCSInitiateResponseImpl> + _$$GuidedDisallowedCapabilityImplCopyWith<_$GuidedDisallowedCapabilityImpl> get copyWith => throw _privateConstructorUsedError; } -UPCSWaitResponse _$UPCSWaitResponseFromJson(Map json) { - return _UPCSWaitResponse.fromJson(json); +StorageResponse _$StorageResponseFromJson(Map json) { + return _StorageResponse.fromJson(json); } /// @nodoc -mixin _$UPCSWaitResponse { - UPCSWaitStatus get status => throw _privateConstructorUsedError; - String? get contractToken => throw _privateConstructorUsedError; +mixin _$StorageResponse { + ProbeStatus get status => throw _privateConstructorUsedError; + ErrorReportRef? get errorReport => throw _privateConstructorUsedError; + Bootloader? get bootloader => throw _privateConstructorUsedError; + List? get origConfig => throw _privateConstructorUsedError; + List? get config => throw _privateConstructorUsedError; + Map? get dasd => throw _privateConstructorUsedError; + int get storageVersion => throw _privateConstructorUsedError; Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $UPCSWaitResponseCopyWith get copyWith => + $StorageResponseCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class $UPCSWaitResponseCopyWith<$Res> { - factory $UPCSWaitResponseCopyWith( - UPCSWaitResponse value, $Res Function(UPCSWaitResponse) then) = - _$UPCSWaitResponseCopyWithImpl<$Res, UPCSWaitResponse>; +abstract class $StorageResponseCopyWith<$Res> { + factory $StorageResponseCopyWith( + StorageResponse value, $Res Function(StorageResponse) then) = + _$StorageResponseCopyWithImpl<$Res, StorageResponse>; @useResult - $Res call({UPCSWaitStatus status, String? contractToken}); + $Res call( + {ProbeStatus status, + ErrorReportRef? errorReport, + Bootloader? bootloader, + List? origConfig, + List? config, + Map? dasd, + int storageVersion}); + + $ErrorReportRefCopyWith<$Res>? get errorReport; } /// @nodoc -class _$UPCSWaitResponseCopyWithImpl<$Res, $Val extends UPCSWaitResponse> - implements $UPCSWaitResponseCopyWith<$Res> { - _$UPCSWaitResponseCopyWithImpl(this._value, this._then); +class _$StorageResponseCopyWithImpl<$Res, $Val extends StorageResponse> + implements $StorageResponseCopyWith<$Res> { + _$StorageResponseCopyWithImpl(this._value, this._then); // ignore: unused_field final $Val _value; @@ -12202,154 +11150,312 @@ class _$UPCSWaitResponseCopyWithImpl<$Res, $Val extends UPCSWaitResponse> @override $Res call({ Object? status = null, - Object? contractToken = freezed, + Object? errorReport = freezed, + Object? bootloader = freezed, + Object? origConfig = freezed, + Object? config = freezed, + Object? dasd = freezed, + Object? storageVersion = null, }) { return _then(_value.copyWith( status: null == status ? _value.status : status // ignore: cast_nullable_to_non_nullable - as UPCSWaitStatus, - contractToken: freezed == contractToken - ? _value.contractToken - : contractToken // ignore: cast_nullable_to_non_nullable - as String?, + as ProbeStatus, + errorReport: freezed == errorReport + ? _value.errorReport + : errorReport // ignore: cast_nullable_to_non_nullable + as ErrorReportRef?, + bootloader: freezed == bootloader + ? _value.bootloader + : bootloader // ignore: cast_nullable_to_non_nullable + as Bootloader?, + origConfig: freezed == origConfig + ? _value.origConfig + : origConfig // ignore: cast_nullable_to_non_nullable + as List?, + config: freezed == config + ? _value.config + : config // ignore: cast_nullable_to_non_nullable + as List?, + dasd: freezed == dasd + ? _value.dasd + : dasd // ignore: cast_nullable_to_non_nullable + as Map?, + storageVersion: null == storageVersion + ? _value.storageVersion + : storageVersion // ignore: cast_nullable_to_non_nullable + as int, ) as $Val); } + + @override + @pragma('vm:prefer-inline') + $ErrorReportRefCopyWith<$Res>? get errorReport { + if (_value.errorReport == null) { + return null; + } + + return $ErrorReportRefCopyWith<$Res>(_value.errorReport!, (value) { + return _then(_value.copyWith(errorReport: value) as $Val); + }); + } } /// @nodoc -abstract class _$$UPCSWaitResponseImplCopyWith<$Res> - implements $UPCSWaitResponseCopyWith<$Res> { - factory _$$UPCSWaitResponseImplCopyWith(_$UPCSWaitResponseImpl value, - $Res Function(_$UPCSWaitResponseImpl) then) = - __$$UPCSWaitResponseImplCopyWithImpl<$Res>; +abstract class _$$StorageResponseImplCopyWith<$Res> + implements $StorageResponseCopyWith<$Res> { + factory _$$StorageResponseImplCopyWith(_$StorageResponseImpl value, + $Res Function(_$StorageResponseImpl) then) = + __$$StorageResponseImplCopyWithImpl<$Res>; @override @useResult - $Res call({UPCSWaitStatus status, String? contractToken}); -} + $Res call( + {ProbeStatus status, + ErrorReportRef? errorReport, + Bootloader? bootloader, + List? origConfig, + List? config, + Map? dasd, + int storageVersion}); -/// @nodoc -class __$$UPCSWaitResponseImplCopyWithImpl<$Res> - extends _$UPCSWaitResponseCopyWithImpl<$Res, _$UPCSWaitResponseImpl> - implements _$$UPCSWaitResponseImplCopyWith<$Res> { - __$$UPCSWaitResponseImplCopyWithImpl(_$UPCSWaitResponseImpl _value, - $Res Function(_$UPCSWaitResponseImpl) _then) + @override + $ErrorReportRefCopyWith<$Res>? get errorReport; +} + +/// @nodoc +class __$$StorageResponseImplCopyWithImpl<$Res> + extends _$StorageResponseCopyWithImpl<$Res, _$StorageResponseImpl> + implements _$$StorageResponseImplCopyWith<$Res> { + __$$StorageResponseImplCopyWithImpl( + _$StorageResponseImpl _value, $Res Function(_$StorageResponseImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ Object? status = null, - Object? contractToken = freezed, + Object? errorReport = freezed, + Object? bootloader = freezed, + Object? origConfig = freezed, + Object? config = freezed, + Object? dasd = freezed, + Object? storageVersion = null, }) { - return _then(_$UPCSWaitResponseImpl( + return _then(_$StorageResponseImpl( status: null == status ? _value.status : status // ignore: cast_nullable_to_non_nullable - as UPCSWaitStatus, - contractToken: freezed == contractToken - ? _value.contractToken - : contractToken // ignore: cast_nullable_to_non_nullable - as String?, + as ProbeStatus, + errorReport: freezed == errorReport + ? _value.errorReport + : errorReport // ignore: cast_nullable_to_non_nullable + as ErrorReportRef?, + bootloader: freezed == bootloader + ? _value.bootloader + : bootloader // ignore: cast_nullable_to_non_nullable + as Bootloader?, + origConfig: freezed == origConfig + ? _value._origConfig + : origConfig // ignore: cast_nullable_to_non_nullable + as List?, + config: freezed == config + ? _value._config + : config // ignore: cast_nullable_to_non_nullable + as List?, + dasd: freezed == dasd + ? _value._dasd + : dasd // ignore: cast_nullable_to_non_nullable + as Map?, + storageVersion: null == storageVersion + ? _value.storageVersion + : storageVersion // ignore: cast_nullable_to_non_nullable + as int, )); } } /// @nodoc @JsonSerializable() -class _$UPCSWaitResponseImpl implements _UPCSWaitResponse { - const _$UPCSWaitResponseImpl( - {required this.status, required this.contractToken}); +class _$StorageResponseImpl implements _StorageResponse { + const _$StorageResponseImpl( + {required this.status, + this.errorReport, + this.bootloader, + final List? origConfig, + final List? config, + final Map? dasd, + this.storageVersion = 1}) + : _origConfig = origConfig, + _config = config, + _dasd = dasd; - factory _$UPCSWaitResponseImpl.fromJson(Map json) => - _$$UPCSWaitResponseImplFromJson(json); + factory _$StorageResponseImpl.fromJson(Map json) => + _$$StorageResponseImplFromJson(json); @override - final UPCSWaitStatus status; + final ProbeStatus status; @override - final String? contractToken; + final ErrorReportRef? errorReport; + @override + final Bootloader? bootloader; + final List? _origConfig; + @override + List? get origConfig { + final value = _origConfig; + if (value == null) return null; + if (_origConfig is EqualUnmodifiableListView) return _origConfig; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(value); + } + + final List? _config; + @override + List? get config { + final value = _config; + if (value == null) return null; + if (_config is EqualUnmodifiableListView) return _config; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(value); + } + + final Map? _dasd; + @override + Map? get dasd { + final value = _dasd; + if (value == null) return null; + if (_dasd is EqualUnmodifiableMapView) return _dasd; + // ignore: implicit_dynamic_type + return EqualUnmodifiableMapView(value); + } + + @override + @JsonKey() + final int storageVersion; @override String toString() { - return 'UPCSWaitResponse(status: $status, contractToken: $contractToken)'; + return 'StorageResponse(status: $status, errorReport: $errorReport, bootloader: $bootloader, origConfig: $origConfig, config: $config, dasd: $dasd, storageVersion: $storageVersion)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$UPCSWaitResponseImpl && + other is _$StorageResponseImpl && (identical(other.status, status) || other.status == status) && - (identical(other.contractToken, contractToken) || - other.contractToken == contractToken)); + (identical(other.errorReport, errorReport) || + other.errorReport == errorReport) && + (identical(other.bootloader, bootloader) || + other.bootloader == bootloader) && + const DeepCollectionEquality() + .equals(other._origConfig, _origConfig) && + const DeepCollectionEquality().equals(other._config, _config) && + const DeepCollectionEquality().equals(other._dasd, _dasd) && + (identical(other.storageVersion, storageVersion) || + other.storageVersion == storageVersion)); } @JsonKey(ignore: true) @override - int get hashCode => Object.hash(runtimeType, status, contractToken); + int get hashCode => Object.hash( + runtimeType, + status, + errorReport, + bootloader, + const DeepCollectionEquality().hash(_origConfig), + const DeepCollectionEquality().hash(_config), + const DeepCollectionEquality().hash(_dasd), + storageVersion); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$UPCSWaitResponseImplCopyWith<_$UPCSWaitResponseImpl> get copyWith => - __$$UPCSWaitResponseImplCopyWithImpl<_$UPCSWaitResponseImpl>( + _$$StorageResponseImplCopyWith<_$StorageResponseImpl> get copyWith => + __$$StorageResponseImplCopyWithImpl<_$StorageResponseImpl>( this, _$identity); @override Map toJson() { - return _$$UPCSWaitResponseImplToJson( + return _$$StorageResponseImplToJson( this, ); } } -abstract class _UPCSWaitResponse implements UPCSWaitResponse { - const factory _UPCSWaitResponse( - {required final UPCSWaitStatus status, - required final String? contractToken}) = _$UPCSWaitResponseImpl; +abstract class _StorageResponse implements StorageResponse { + const factory _StorageResponse( + {required final ProbeStatus status, + final ErrorReportRef? errorReport, + final Bootloader? bootloader, + final List? origConfig, + final List? config, + final Map? dasd, + final int storageVersion}) = _$StorageResponseImpl; - factory _UPCSWaitResponse.fromJson(Map json) = - _$UPCSWaitResponseImpl.fromJson; + factory _StorageResponse.fromJson(Map json) = + _$StorageResponseImpl.fromJson; @override - UPCSWaitStatus get status; + ProbeStatus get status; @override - String? get contractToken; + ErrorReportRef? get errorReport; + @override + Bootloader? get bootloader; + @override + List? get origConfig; + @override + List? get config; + @override + Map? get dasd; + @override + int get storageVersion; @override @JsonKey(ignore: true) - _$$UPCSWaitResponseImplCopyWith<_$UPCSWaitResponseImpl> get copyWith => + _$$StorageResponseImplCopyWith<_$StorageResponseImpl> get copyWith => throw _privateConstructorUsedError; } -UbuntuProService _$UbuntuProServiceFromJson(Map json) { - return _UbuntuProService.fromJson(json); +StorageResponseV2 _$StorageResponseV2FromJson(Map json) { + return _StorageResponseV2.fromJson(json); } /// @nodoc -mixin _$UbuntuProService { - String get name => throw _privateConstructorUsedError; - String get description => throw _privateConstructorUsedError; - bool get autoEnabled => throw _privateConstructorUsedError; +mixin _$StorageResponseV2 { + ProbeStatus get status => throw _privateConstructorUsedError; + ErrorReportRef? get errorReport => throw _privateConstructorUsedError; + List get disks => throw _privateConstructorUsedError; + bool? get needRoot => throw _privateConstructorUsedError; + bool? get needBoot => throw _privateConstructorUsedError; + int? get installMinimumSize => throw _privateConstructorUsedError; Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $UbuntuProServiceCopyWith get copyWith => + $StorageResponseV2CopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class $UbuntuProServiceCopyWith<$Res> { - factory $UbuntuProServiceCopyWith( - UbuntuProService value, $Res Function(UbuntuProService) then) = - _$UbuntuProServiceCopyWithImpl<$Res, UbuntuProService>; +abstract class $StorageResponseV2CopyWith<$Res> { + factory $StorageResponseV2CopyWith( + StorageResponseV2 value, $Res Function(StorageResponseV2) then) = + _$StorageResponseV2CopyWithImpl<$Res, StorageResponseV2>; @useResult - $Res call({String name, String description, bool autoEnabled}); + $Res call( + {ProbeStatus status, + ErrorReportRef? errorReport, + List disks, + bool? needRoot, + bool? needBoot, + int? installMinimumSize}); + + $ErrorReportRefCopyWith<$Res>? get errorReport; } /// @nodoc -class _$UbuntuProServiceCopyWithImpl<$Res, $Val extends UbuntuProService> - implements $UbuntuProServiceCopyWith<$Res> { - _$UbuntuProServiceCopyWithImpl(this._value, this._then); +class _$StorageResponseV2CopyWithImpl<$Res, $Val extends StorageResponseV2> + implements $StorageResponseV2CopyWith<$Res> { + _$StorageResponseV2CopyWithImpl(this._value, this._then); // ignore: unused_field final $Val _value; @@ -12359,394 +11465,571 @@ class _$UbuntuProServiceCopyWithImpl<$Res, $Val extends UbuntuProService> @pragma('vm:prefer-inline') @override $Res call({ - Object? name = null, - Object? description = null, - Object? autoEnabled = null, + Object? status = null, + Object? errorReport = freezed, + Object? disks = null, + Object? needRoot = freezed, + Object? needBoot = freezed, + Object? installMinimumSize = freezed, }) { return _then(_value.copyWith( - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - description: null == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String, - autoEnabled: null == autoEnabled - ? _value.autoEnabled - : autoEnabled // ignore: cast_nullable_to_non_nullable - as bool, + status: null == status + ? _value.status + : status // ignore: cast_nullable_to_non_nullable + as ProbeStatus, + errorReport: freezed == errorReport + ? _value.errorReport + : errorReport // ignore: cast_nullable_to_non_nullable + as ErrorReportRef?, + disks: null == disks + ? _value.disks + : disks // ignore: cast_nullable_to_non_nullable + as List, + needRoot: freezed == needRoot + ? _value.needRoot + : needRoot // ignore: cast_nullable_to_non_nullable + as bool?, + needBoot: freezed == needBoot + ? _value.needBoot + : needBoot // ignore: cast_nullable_to_non_nullable + as bool?, + installMinimumSize: freezed == installMinimumSize + ? _value.installMinimumSize + : installMinimumSize // ignore: cast_nullable_to_non_nullable + as int?, ) as $Val); } + + @override + @pragma('vm:prefer-inline') + $ErrorReportRefCopyWith<$Res>? get errorReport { + if (_value.errorReport == null) { + return null; + } + + return $ErrorReportRefCopyWith<$Res>(_value.errorReport!, (value) { + return _then(_value.copyWith(errorReport: value) as $Val); + }); + } } /// @nodoc -abstract class _$$UbuntuProServiceImplCopyWith<$Res> - implements $UbuntuProServiceCopyWith<$Res> { - factory _$$UbuntuProServiceImplCopyWith(_$UbuntuProServiceImpl value, - $Res Function(_$UbuntuProServiceImpl) then) = - __$$UbuntuProServiceImplCopyWithImpl<$Res>; +abstract class _$$StorageResponseV2ImplCopyWith<$Res> + implements $StorageResponseV2CopyWith<$Res> { + factory _$$StorageResponseV2ImplCopyWith(_$StorageResponseV2Impl value, + $Res Function(_$StorageResponseV2Impl) then) = + __$$StorageResponseV2ImplCopyWithImpl<$Res>; @override @useResult - $Res call({String name, String description, bool autoEnabled}); + $Res call( + {ProbeStatus status, + ErrorReportRef? errorReport, + List disks, + bool? needRoot, + bool? needBoot, + int? installMinimumSize}); + + @override + $ErrorReportRefCopyWith<$Res>? get errorReport; } /// @nodoc -class __$$UbuntuProServiceImplCopyWithImpl<$Res> - extends _$UbuntuProServiceCopyWithImpl<$Res, _$UbuntuProServiceImpl> - implements _$$UbuntuProServiceImplCopyWith<$Res> { - __$$UbuntuProServiceImplCopyWithImpl(_$UbuntuProServiceImpl _value, - $Res Function(_$UbuntuProServiceImpl) _then) +class __$$StorageResponseV2ImplCopyWithImpl<$Res> + extends _$StorageResponseV2CopyWithImpl<$Res, _$StorageResponseV2Impl> + implements _$$StorageResponseV2ImplCopyWith<$Res> { + __$$StorageResponseV2ImplCopyWithImpl(_$StorageResponseV2Impl _value, + $Res Function(_$StorageResponseV2Impl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? name = null, - Object? description = null, - Object? autoEnabled = null, + Object? status = null, + Object? errorReport = freezed, + Object? disks = null, + Object? needRoot = freezed, + Object? needBoot = freezed, + Object? installMinimumSize = freezed, }) { - return _then(_$UbuntuProServiceImpl( - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - description: null == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String, - autoEnabled: null == autoEnabled - ? _value.autoEnabled - : autoEnabled // ignore: cast_nullable_to_non_nullable - as bool, + return _then(_$StorageResponseV2Impl( + status: null == status + ? _value.status + : status // ignore: cast_nullable_to_non_nullable + as ProbeStatus, + errorReport: freezed == errorReport + ? _value.errorReport + : errorReport // ignore: cast_nullable_to_non_nullable + as ErrorReportRef?, + disks: null == disks + ? _value._disks + : disks // ignore: cast_nullable_to_non_nullable + as List, + needRoot: freezed == needRoot + ? _value.needRoot + : needRoot // ignore: cast_nullable_to_non_nullable + as bool?, + needBoot: freezed == needBoot + ? _value.needBoot + : needBoot // ignore: cast_nullable_to_non_nullable + as bool?, + installMinimumSize: freezed == installMinimumSize + ? _value.installMinimumSize + : installMinimumSize // ignore: cast_nullable_to_non_nullable + as int?, )); } } /// @nodoc @JsonSerializable() -class _$UbuntuProServiceImpl implements _UbuntuProService { - const _$UbuntuProServiceImpl( - {required this.name, - required this.description, - required this.autoEnabled}); +class _$StorageResponseV2Impl implements _StorageResponseV2 { + const _$StorageResponseV2Impl( + {required this.status, + this.errorReport, + final List disks = const [], + this.needRoot, + this.needBoot, + this.installMinimumSize}) + : _disks = disks; - factory _$UbuntuProServiceImpl.fromJson(Map json) => - _$$UbuntuProServiceImplFromJson(json); + factory _$StorageResponseV2Impl.fromJson(Map json) => + _$$StorageResponseV2ImplFromJson(json); @override - final String name; + final ProbeStatus status; @override - final String description; + final ErrorReportRef? errorReport; + final List _disks; @override - final bool autoEnabled; + @JsonKey() + List get disks { + if (_disks is EqualUnmodifiableListView) return _disks; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_disks); + } + + @override + final bool? needRoot; + @override + final bool? needBoot; + @override + final int? installMinimumSize; @override String toString() { - return 'UbuntuProService(name: $name, description: $description, autoEnabled: $autoEnabled)'; + return 'StorageResponseV2(status: $status, errorReport: $errorReport, disks: $disks, needRoot: $needRoot, needBoot: $needBoot, installMinimumSize: $installMinimumSize)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$UbuntuProServiceImpl && - (identical(other.name, name) || other.name == name) && - (identical(other.description, description) || - other.description == description) && - (identical(other.autoEnabled, autoEnabled) || - other.autoEnabled == autoEnabled)); + other is _$StorageResponseV2Impl && + (identical(other.status, status) || other.status == status) && + (identical(other.errorReport, errorReport) || + other.errorReport == errorReport) && + const DeepCollectionEquality().equals(other._disks, _disks) && + (identical(other.needRoot, needRoot) || + other.needRoot == needRoot) && + (identical(other.needBoot, needBoot) || + other.needBoot == needBoot) && + (identical(other.installMinimumSize, installMinimumSize) || + other.installMinimumSize == installMinimumSize)); } @JsonKey(ignore: true) @override - int get hashCode => Object.hash(runtimeType, name, description, autoEnabled); + int get hashCode => Object.hash( + runtimeType, + status, + errorReport, + const DeepCollectionEquality().hash(_disks), + needRoot, + needBoot, + installMinimumSize); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$UbuntuProServiceImplCopyWith<_$UbuntuProServiceImpl> get copyWith => - __$$UbuntuProServiceImplCopyWithImpl<_$UbuntuProServiceImpl>( + _$$StorageResponseV2ImplCopyWith<_$StorageResponseV2Impl> get copyWith => + __$$StorageResponseV2ImplCopyWithImpl<_$StorageResponseV2Impl>( this, _$identity); @override Map toJson() { - return _$$UbuntuProServiceImplToJson( + return _$$StorageResponseV2ImplToJson( this, ); } } -abstract class _UbuntuProService implements UbuntuProService { - const factory _UbuntuProService( - {required final String name, - required final String description, - required final bool autoEnabled}) = _$UbuntuProServiceImpl; +abstract class _StorageResponseV2 implements StorageResponseV2 { + const factory _StorageResponseV2( + {required final ProbeStatus status, + final ErrorReportRef? errorReport, + final List disks, + final bool? needRoot, + final bool? needBoot, + final int? installMinimumSize}) = _$StorageResponseV2Impl; - factory _UbuntuProService.fromJson(Map json) = - _$UbuntuProServiceImpl.fromJson; + factory _StorageResponseV2.fromJson(Map json) = + _$StorageResponseV2Impl.fromJson; @override - String get name; + ProbeStatus get status; @override - String get description; + ErrorReportRef? get errorReport; @override - bool get autoEnabled; + List get disks; + @override + bool? get needRoot; + @override + bool? get needBoot; + @override + int? get installMinimumSize; @override @JsonKey(ignore: true) - _$$UbuntuProServiceImplCopyWith<_$UbuntuProServiceImpl> get copyWith => + _$$StorageResponseV2ImplCopyWith<_$StorageResponseV2Impl> get copyWith => throw _privateConstructorUsedError; } -UbuntuProSubscription _$UbuntuProSubscriptionFromJson( - Map json) { - return _UbuntuProSubscription.fromJson(json); +GuidedResizeValues _$GuidedResizeValuesFromJson(Map json) { + return _GuidedResizeValues.fromJson(json); } /// @nodoc -mixin _$UbuntuProSubscription { - String get contractName => throw _privateConstructorUsedError; - String get accountName => throw _privateConstructorUsedError; - String get contractToken => throw _privateConstructorUsedError; - List get services => throw _privateConstructorUsedError; +mixin _$GuidedResizeValues { + int get installMax => throw _privateConstructorUsedError; + int get minimum => throw _privateConstructorUsedError; + int get recommended => throw _privateConstructorUsedError; + int get maximum => throw _privateConstructorUsedError; Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $UbuntuProSubscriptionCopyWith get copyWith => + $GuidedResizeValuesCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class $UbuntuProSubscriptionCopyWith<$Res> { - factory $UbuntuProSubscriptionCopyWith(UbuntuProSubscription value, - $Res Function(UbuntuProSubscription) then) = - _$UbuntuProSubscriptionCopyWithImpl<$Res, UbuntuProSubscription>; +abstract class $GuidedResizeValuesCopyWith<$Res> { + factory $GuidedResizeValuesCopyWith( + GuidedResizeValues value, $Res Function(GuidedResizeValues) then) = + _$GuidedResizeValuesCopyWithImpl<$Res, GuidedResizeValues>; @useResult - $Res call( - {String contractName, - String accountName, - String contractToken, - List services}); + $Res call({int installMax, int minimum, int recommended, int maximum}); } /// @nodoc -class _$UbuntuProSubscriptionCopyWithImpl<$Res, - $Val extends UbuntuProSubscription> - implements $UbuntuProSubscriptionCopyWith<$Res> { - _$UbuntuProSubscriptionCopyWithImpl(this._value, this._then); +class _$GuidedResizeValuesCopyWithImpl<$Res, $Val extends GuidedResizeValues> + implements $GuidedResizeValuesCopyWith<$Res> { + _$GuidedResizeValuesCopyWithImpl(this._value, this._then); // ignore: unused_field final $Val _value; // ignore: unused_field final $Res Function($Val) _then; - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? contractName = null, - Object? accountName = null, - Object? contractToken = null, - Object? services = null, - }) { - return _then(_value.copyWith( - contractName: null == contractName - ? _value.contractName - : contractName // ignore: cast_nullable_to_non_nullable - as String, - accountName: null == accountName - ? _value.accountName - : accountName // ignore: cast_nullable_to_non_nullable - as String, - contractToken: null == contractToken - ? _value.contractToken - : contractToken // ignore: cast_nullable_to_non_nullable - as String, - services: null == services - ? _value.services - : services // ignore: cast_nullable_to_non_nullable - as List, + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? installMax = null, + Object? minimum = null, + Object? recommended = null, + Object? maximum = null, + }) { + return _then(_value.copyWith( + installMax: null == installMax + ? _value.installMax + : installMax // ignore: cast_nullable_to_non_nullable + as int, + minimum: null == minimum + ? _value.minimum + : minimum // ignore: cast_nullable_to_non_nullable + as int, + recommended: null == recommended + ? _value.recommended + : recommended // ignore: cast_nullable_to_non_nullable + as int, + maximum: null == maximum + ? _value.maximum + : maximum // ignore: cast_nullable_to_non_nullable + as int, ) as $Val); } } /// @nodoc -abstract class _$$UbuntuProSubscriptionImplCopyWith<$Res> - implements $UbuntuProSubscriptionCopyWith<$Res> { - factory _$$UbuntuProSubscriptionImplCopyWith( - _$UbuntuProSubscriptionImpl value, - $Res Function(_$UbuntuProSubscriptionImpl) then) = - __$$UbuntuProSubscriptionImplCopyWithImpl<$Res>; +abstract class _$$GuidedResizeValuesImplCopyWith<$Res> + implements $GuidedResizeValuesCopyWith<$Res> { + factory _$$GuidedResizeValuesImplCopyWith(_$GuidedResizeValuesImpl value, + $Res Function(_$GuidedResizeValuesImpl) then) = + __$$GuidedResizeValuesImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {String contractName, - String accountName, - String contractToken, - List services}); + $Res call({int installMax, int minimum, int recommended, int maximum}); } /// @nodoc -class __$$UbuntuProSubscriptionImplCopyWithImpl<$Res> - extends _$UbuntuProSubscriptionCopyWithImpl<$Res, - _$UbuntuProSubscriptionImpl> - implements _$$UbuntuProSubscriptionImplCopyWith<$Res> { - __$$UbuntuProSubscriptionImplCopyWithImpl(_$UbuntuProSubscriptionImpl _value, - $Res Function(_$UbuntuProSubscriptionImpl) _then) +class __$$GuidedResizeValuesImplCopyWithImpl<$Res> + extends _$GuidedResizeValuesCopyWithImpl<$Res, _$GuidedResizeValuesImpl> + implements _$$GuidedResizeValuesImplCopyWith<$Res> { + __$$GuidedResizeValuesImplCopyWithImpl(_$GuidedResizeValuesImpl _value, + $Res Function(_$GuidedResizeValuesImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? contractName = null, - Object? accountName = null, - Object? contractToken = null, - Object? services = null, + Object? installMax = null, + Object? minimum = null, + Object? recommended = null, + Object? maximum = null, }) { - return _then(_$UbuntuProSubscriptionImpl( - contractName: null == contractName - ? _value.contractName - : contractName // ignore: cast_nullable_to_non_nullable - as String, - accountName: null == accountName - ? _value.accountName - : accountName // ignore: cast_nullable_to_non_nullable - as String, - contractToken: null == contractToken - ? _value.contractToken - : contractToken // ignore: cast_nullable_to_non_nullable - as String, - services: null == services - ? _value._services - : services // ignore: cast_nullable_to_non_nullable - as List, + return _then(_$GuidedResizeValuesImpl( + installMax: null == installMax + ? _value.installMax + : installMax // ignore: cast_nullable_to_non_nullable + as int, + minimum: null == minimum + ? _value.minimum + : minimum // ignore: cast_nullable_to_non_nullable + as int, + recommended: null == recommended + ? _value.recommended + : recommended // ignore: cast_nullable_to_non_nullable + as int, + maximum: null == maximum + ? _value.maximum + : maximum // ignore: cast_nullable_to_non_nullable + as int, )); } } /// @nodoc @JsonSerializable() -class _$UbuntuProSubscriptionImpl implements _UbuntuProSubscription { - const _$UbuntuProSubscriptionImpl( - {required this.contractName, - required this.accountName, - required this.contractToken, - required final List services}) - : _services = services; +class _$GuidedResizeValuesImpl implements _GuidedResizeValues { + const _$GuidedResizeValuesImpl( + {required this.installMax, + required this.minimum, + required this.recommended, + required this.maximum}); - factory _$UbuntuProSubscriptionImpl.fromJson(Map json) => - _$$UbuntuProSubscriptionImplFromJson(json); + factory _$GuidedResizeValuesImpl.fromJson(Map json) => + _$$GuidedResizeValuesImplFromJson(json); @override - final String contractName; + final int installMax; @override - final String accountName; + final int minimum; @override - final String contractToken; - final List _services; + final int recommended; @override - List get services { - if (_services is EqualUnmodifiableListView) return _services; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_services); - } + final int maximum; @override String toString() { - return 'UbuntuProSubscription(contractName: $contractName, accountName: $accountName, contractToken: $contractToken, services: $services)'; + return 'GuidedResizeValues(installMax: $installMax, minimum: $minimum, recommended: $recommended, maximum: $maximum)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$UbuntuProSubscriptionImpl && - (identical(other.contractName, contractName) || - other.contractName == contractName) && - (identical(other.accountName, accountName) || - other.accountName == accountName) && - (identical(other.contractToken, contractToken) || - other.contractToken == contractToken) && - const DeepCollectionEquality().equals(other._services, _services)); + other is _$GuidedResizeValuesImpl && + (identical(other.installMax, installMax) || + other.installMax == installMax) && + (identical(other.minimum, minimum) || other.minimum == minimum) && + (identical(other.recommended, recommended) || + other.recommended == recommended) && + (identical(other.maximum, maximum) || other.maximum == maximum)); } @JsonKey(ignore: true) @override - int get hashCode => Object.hash(runtimeType, contractName, accountName, - contractToken, const DeepCollectionEquality().hash(_services)); + int get hashCode => + Object.hash(runtimeType, installMax, minimum, recommended, maximum); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$UbuntuProSubscriptionImplCopyWith<_$UbuntuProSubscriptionImpl> - get copyWith => __$$UbuntuProSubscriptionImplCopyWithImpl< - _$UbuntuProSubscriptionImpl>(this, _$identity); + _$$GuidedResizeValuesImplCopyWith<_$GuidedResizeValuesImpl> get copyWith => + __$$GuidedResizeValuesImplCopyWithImpl<_$GuidedResizeValuesImpl>( + this, _$identity); @override Map toJson() { - return _$$UbuntuProSubscriptionImplToJson( + return _$$GuidedResizeValuesImplToJson( this, ); } } -abstract class _UbuntuProSubscription implements UbuntuProSubscription { - const factory _UbuntuProSubscription( - {required final String contractName, - required final String accountName, - required final String contractToken, - required final List services}) = - _$UbuntuProSubscriptionImpl; +abstract class _GuidedResizeValues implements GuidedResizeValues { + const factory _GuidedResizeValues( + {required final int installMax, + required final int minimum, + required final int recommended, + required final int maximum}) = _$GuidedResizeValuesImpl; - factory _UbuntuProSubscription.fromJson(Map json) = - _$UbuntuProSubscriptionImpl.fromJson; + factory _GuidedResizeValues.fromJson(Map json) = + _$GuidedResizeValuesImpl.fromJson; @override - String get contractName; + int get installMax; @override - String get accountName; + int get minimum; @override - String get contractToken; + int get recommended; @override - List get services; + int get maximum; @override @JsonKey(ignore: true) - _$$UbuntuProSubscriptionImplCopyWith<_$UbuntuProSubscriptionImpl> - get copyWith => throw _privateConstructorUsedError; + _$$GuidedResizeValuesImplCopyWith<_$GuidedResizeValuesImpl> get copyWith => + throw _privateConstructorUsedError; } -UbuntuProCheckTokenAnswer _$UbuntuProCheckTokenAnswerFromJson( - Map json) { - return _UbuntuProCheckTokenAnswer.fromJson(json); +GuidedStorageTarget _$GuidedStorageTargetFromJson(Map json) { + switch (json['\$type']) { + case 'GuidedStorageTargetReformat': + return GuidedStorageTargetReformat.fromJson(json); + case 'GuidedStorageTargetResize': + return GuidedStorageTargetResize.fromJson(json); + case 'GuidedStorageTargetUseGap': + return GuidedStorageTargetUseGap.fromJson(json); + case 'GuidedStorageTargetManual': + return GuidedStorageTargetManual.fromJson(json); + + default: + throw CheckedFromJsonException(json, '\$type', 'GuidedStorageTarget', + 'Invalid union type "${json['\$type']}"!'); + } } /// @nodoc -mixin _$UbuntuProCheckTokenAnswer { - UbuntuProCheckTokenStatus get status => throw _privateConstructorUsedError; - UbuntuProSubscription? get subscription => throw _privateConstructorUsedError; - +mixin _$GuidedStorageTarget { + List get allowed => throw _privateConstructorUsedError; + List get disallowed => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult when({ + required TResult Function(String diskId, List allowed, + List disallowed) + reformat, + required TResult Function( + String diskId, + int partitionNumber, + int newSize, + int? minimum, + int? recommended, + int? maximum, + List allowed, + List disallowed) + resize, + required TResult Function( + String diskId, + Gap gap, + List allowed, + List disallowed) + useGap, + required TResult Function(List allowed, + List disallowed) + manual, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String diskId, List allowed, + List disallowed)? + reformat, + TResult? Function( + String diskId, + int partitionNumber, + int newSize, + int? minimum, + int? recommended, + int? maximum, + List allowed, + List disallowed)? + resize, + TResult? Function(String diskId, Gap gap, List allowed, + List disallowed)? + useGap, + TResult? Function(List allowed, + List disallowed)? + manual, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String diskId, List allowed, + List disallowed)? + reformat, + TResult Function( + String diskId, + int partitionNumber, + int newSize, + int? minimum, + int? recommended, + int? maximum, + List allowed, + List disallowed)? + resize, + TResult Function(String diskId, Gap gap, List allowed, + List disallowed)? + useGap, + TResult Function(List allowed, + List disallowed)? + manual, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult map({ + required TResult Function(GuidedStorageTargetReformat value) reformat, + required TResult Function(GuidedStorageTargetResize value) resize, + required TResult Function(GuidedStorageTargetUseGap value) useGap, + required TResult Function(GuidedStorageTargetManual value) manual, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(GuidedStorageTargetReformat value)? reformat, + TResult? Function(GuidedStorageTargetResize value)? resize, + TResult? Function(GuidedStorageTargetUseGap value)? useGap, + TResult? Function(GuidedStorageTargetManual value)? manual, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeMap({ + TResult Function(GuidedStorageTargetReformat value)? reformat, + TResult Function(GuidedStorageTargetResize value)? resize, + TResult Function(GuidedStorageTargetUseGap value)? useGap, + TResult Function(GuidedStorageTargetManual value)? manual, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $UbuntuProCheckTokenAnswerCopyWith get copyWith => + $GuidedStorageTargetCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class $UbuntuProCheckTokenAnswerCopyWith<$Res> { - factory $UbuntuProCheckTokenAnswerCopyWith(UbuntuProCheckTokenAnswer value, - $Res Function(UbuntuProCheckTokenAnswer) then) = - _$UbuntuProCheckTokenAnswerCopyWithImpl<$Res, UbuntuProCheckTokenAnswer>; +abstract class $GuidedStorageTargetCopyWith<$Res> { + factory $GuidedStorageTargetCopyWith( + GuidedStorageTarget value, $Res Function(GuidedStorageTarget) then) = + _$GuidedStorageTargetCopyWithImpl<$Res, GuidedStorageTarget>; @useResult $Res call( - {UbuntuProCheckTokenStatus status, UbuntuProSubscription? subscription}); - - $UbuntuProSubscriptionCopyWith<$Res>? get subscription; + {List allowed, + List disallowed}); } /// @nodoc -class _$UbuntuProCheckTokenAnswerCopyWithImpl<$Res, - $Val extends UbuntuProCheckTokenAnswer> - implements $UbuntuProCheckTokenAnswerCopyWith<$Res> { - _$UbuntuProCheckTokenAnswerCopyWithImpl(this._value, this._then); +class _$GuidedStorageTargetCopyWithImpl<$Res, $Val extends GuidedStorageTarget> + implements $GuidedStorageTargetCopyWith<$Res> { + _$GuidedStorageTargetCopyWithImpl(this._value, this._then); // ignore: unused_field final $Val _value; @@ -12756,954 +12039,1196 @@ class _$UbuntuProCheckTokenAnswerCopyWithImpl<$Res, @pragma('vm:prefer-inline') @override $Res call({ - Object? status = null, - Object? subscription = freezed, + Object? allowed = null, + Object? disallowed = null, }) { return _then(_value.copyWith( - status: null == status - ? _value.status - : status // ignore: cast_nullable_to_non_nullable - as UbuntuProCheckTokenStatus, - subscription: freezed == subscription - ? _value.subscription - : subscription // ignore: cast_nullable_to_non_nullable - as UbuntuProSubscription?, + allowed: null == allowed + ? _value.allowed + : allowed // ignore: cast_nullable_to_non_nullable + as List, + disallowed: null == disallowed + ? _value.disallowed + : disallowed // ignore: cast_nullable_to_non_nullable + as List, ) as $Val); } - - @override - @pragma('vm:prefer-inline') - $UbuntuProSubscriptionCopyWith<$Res>? get subscription { - if (_value.subscription == null) { - return null; - } - - return $UbuntuProSubscriptionCopyWith<$Res>(_value.subscription!, (value) { - return _then(_value.copyWith(subscription: value) as $Val); - }); - } } /// @nodoc -abstract class _$$UbuntuProCheckTokenAnswerImplCopyWith<$Res> - implements $UbuntuProCheckTokenAnswerCopyWith<$Res> { - factory _$$UbuntuProCheckTokenAnswerImplCopyWith( - _$UbuntuProCheckTokenAnswerImpl value, - $Res Function(_$UbuntuProCheckTokenAnswerImpl) then) = - __$$UbuntuProCheckTokenAnswerImplCopyWithImpl<$Res>; +abstract class _$$GuidedStorageTargetReformatImplCopyWith<$Res> + implements $GuidedStorageTargetCopyWith<$Res> { + factory _$$GuidedStorageTargetReformatImplCopyWith( + _$GuidedStorageTargetReformatImpl value, + $Res Function(_$GuidedStorageTargetReformatImpl) then) = + __$$GuidedStorageTargetReformatImplCopyWithImpl<$Res>; @override @useResult $Res call( - {UbuntuProCheckTokenStatus status, UbuntuProSubscription? subscription}); - - @override - $UbuntuProSubscriptionCopyWith<$Res>? get subscription; + {String diskId, + List allowed, + List disallowed}); } /// @nodoc -class __$$UbuntuProCheckTokenAnswerImplCopyWithImpl<$Res> - extends _$UbuntuProCheckTokenAnswerCopyWithImpl<$Res, - _$UbuntuProCheckTokenAnswerImpl> - implements _$$UbuntuProCheckTokenAnswerImplCopyWith<$Res> { - __$$UbuntuProCheckTokenAnswerImplCopyWithImpl( - _$UbuntuProCheckTokenAnswerImpl _value, - $Res Function(_$UbuntuProCheckTokenAnswerImpl) _then) +class __$$GuidedStorageTargetReformatImplCopyWithImpl<$Res> + extends _$GuidedStorageTargetCopyWithImpl<$Res, + _$GuidedStorageTargetReformatImpl> + implements _$$GuidedStorageTargetReformatImplCopyWith<$Res> { + __$$GuidedStorageTargetReformatImplCopyWithImpl( + _$GuidedStorageTargetReformatImpl _value, + $Res Function(_$GuidedStorageTargetReformatImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? status = null, - Object? subscription = freezed, + Object? diskId = null, + Object? allowed = null, + Object? disallowed = null, }) { - return _then(_$UbuntuProCheckTokenAnswerImpl( - status: null == status - ? _value.status - : status // ignore: cast_nullable_to_non_nullable - as UbuntuProCheckTokenStatus, - subscription: freezed == subscription - ? _value.subscription - : subscription // ignore: cast_nullable_to_non_nullable - as UbuntuProSubscription?, + return _then(_$GuidedStorageTargetReformatImpl( + diskId: null == diskId + ? _value.diskId + : diskId // ignore: cast_nullable_to_non_nullable + as String, + allowed: null == allowed + ? _value._allowed + : allowed // ignore: cast_nullable_to_non_nullable + as List, + disallowed: null == disallowed + ? _value._disallowed + : disallowed // ignore: cast_nullable_to_non_nullable + as List, )); } } /// @nodoc @JsonSerializable() -class _$UbuntuProCheckTokenAnswerImpl implements _UbuntuProCheckTokenAnswer { - const _$UbuntuProCheckTokenAnswerImpl( - {required this.status, required this.subscription}); +class _$GuidedStorageTargetReformatImpl implements GuidedStorageTargetReformat { + const _$GuidedStorageTargetReformatImpl( + {required this.diskId, + final List allowed = const [], + final List disallowed = const [], + final String? $type}) + : _allowed = allowed, + _disallowed = disallowed, + $type = $type ?? 'GuidedStorageTargetReformat'; - factory _$UbuntuProCheckTokenAnswerImpl.fromJson(Map json) => - _$$UbuntuProCheckTokenAnswerImplFromJson(json); + factory _$GuidedStorageTargetReformatImpl.fromJson( + Map json) => + _$$GuidedStorageTargetReformatImplFromJson(json); + + @override + final String diskId; + final List _allowed; + @override + @JsonKey() + List get allowed { + if (_allowed is EqualUnmodifiableListView) return _allowed; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_allowed); + } + + final List _disallowed; + @override + @JsonKey() + List get disallowed { + if (_disallowed is EqualUnmodifiableListView) return _disallowed; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_disallowed); + } + + @JsonKey(name: '\$type') + final String $type; + + @override + String toString() { + return 'GuidedStorageTarget.reformat(diskId: $diskId, allowed: $allowed, disallowed: $disallowed)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$GuidedStorageTargetReformatImpl && + (identical(other.diskId, diskId) || other.diskId == diskId) && + const DeepCollectionEquality().equals(other._allowed, _allowed) && + const DeepCollectionEquality() + .equals(other._disallowed, _disallowed)); + } + + @JsonKey(ignore: true) + @override + int get hashCode => Object.hash( + runtimeType, + diskId, + const DeepCollectionEquality().hash(_allowed), + const DeepCollectionEquality().hash(_disallowed)); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$GuidedStorageTargetReformatImplCopyWith<_$GuidedStorageTargetReformatImpl> + get copyWith => __$$GuidedStorageTargetReformatImplCopyWithImpl< + _$GuidedStorageTargetReformatImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String diskId, List allowed, + List disallowed) + reformat, + required TResult Function( + String diskId, + int partitionNumber, + int newSize, + int? minimum, + int? recommended, + int? maximum, + List allowed, + List disallowed) + resize, + required TResult Function( + String diskId, + Gap gap, + List allowed, + List disallowed) + useGap, + required TResult Function(List allowed, + List disallowed) + manual, + }) { + return reformat(diskId, allowed, disallowed); + } @override - final UbuntuProCheckTokenStatus status; - @override - final UbuntuProSubscription? subscription; + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String diskId, List allowed, + List disallowed)? + reformat, + TResult? Function( + String diskId, + int partitionNumber, + int newSize, + int? minimum, + int? recommended, + int? maximum, + List allowed, + List disallowed)? + resize, + TResult? Function(String diskId, Gap gap, List allowed, + List disallowed)? + useGap, + TResult? Function(List allowed, + List disallowed)? + manual, + }) { + return reformat?.call(diskId, allowed, disallowed); + } @override - String toString() { - return 'UbuntuProCheckTokenAnswer(status: $status, subscription: $subscription)'; + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String diskId, List allowed, + List disallowed)? + reformat, + TResult Function( + String diskId, + int partitionNumber, + int newSize, + int? minimum, + int? recommended, + int? maximum, + List allowed, + List disallowed)? + resize, + TResult Function(String diskId, Gap gap, List allowed, + List disallowed)? + useGap, + TResult Function(List allowed, + List disallowed)? + manual, + required TResult orElse(), + }) { + if (reformat != null) { + return reformat(diskId, allowed, disallowed); + } + return orElse(); } @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$UbuntuProCheckTokenAnswerImpl && - (identical(other.status, status) || other.status == status) && - (identical(other.subscription, subscription) || - other.subscription == subscription)); + @optionalTypeArgs + TResult map({ + required TResult Function(GuidedStorageTargetReformat value) reformat, + required TResult Function(GuidedStorageTargetResize value) resize, + required TResult Function(GuidedStorageTargetUseGap value) useGap, + required TResult Function(GuidedStorageTargetManual value) manual, + }) { + return reformat(this); } - @JsonKey(ignore: true) @override - int get hashCode => Object.hash(runtimeType, status, subscription); + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(GuidedStorageTargetReformat value)? reformat, + TResult? Function(GuidedStorageTargetResize value)? resize, + TResult? Function(GuidedStorageTargetUseGap value)? useGap, + TResult? Function(GuidedStorageTargetManual value)? manual, + }) { + return reformat?.call(this); + } - @JsonKey(ignore: true) @override - @pragma('vm:prefer-inline') - _$$UbuntuProCheckTokenAnswerImplCopyWith<_$UbuntuProCheckTokenAnswerImpl> - get copyWith => __$$UbuntuProCheckTokenAnswerImplCopyWithImpl< - _$UbuntuProCheckTokenAnswerImpl>(this, _$identity); + @optionalTypeArgs + TResult maybeMap({ + TResult Function(GuidedStorageTargetReformat value)? reformat, + TResult Function(GuidedStorageTargetResize value)? resize, + TResult Function(GuidedStorageTargetUseGap value)? useGap, + TResult Function(GuidedStorageTargetManual value)? manual, + required TResult orElse(), + }) { + if (reformat != null) { + return reformat(this); + } + return orElse(); + } @override Map toJson() { - return _$$UbuntuProCheckTokenAnswerImplToJson( + return _$$GuidedStorageTargetReformatImplToJson( this, ); } } -abstract class _UbuntuProCheckTokenAnswer implements UbuntuProCheckTokenAnswer { - const factory _UbuntuProCheckTokenAnswer( - {required final UbuntuProCheckTokenStatus status, - required final UbuntuProSubscription? subscription}) = - _$UbuntuProCheckTokenAnswerImpl; +abstract class GuidedStorageTargetReformat implements GuidedStorageTarget { + const factory GuidedStorageTargetReformat( + {required final String diskId, + final List allowed, + final List disallowed}) = + _$GuidedStorageTargetReformatImpl; - factory _UbuntuProCheckTokenAnswer.fromJson(Map json) = - _$UbuntuProCheckTokenAnswerImpl.fromJson; + factory GuidedStorageTargetReformat.fromJson(Map json) = + _$GuidedStorageTargetReformatImpl.fromJson; + String get diskId; @override - UbuntuProCheckTokenStatus get status; + List get allowed; @override - UbuntuProSubscription? get subscription; + List get disallowed; @override @JsonKey(ignore: true) - _$$UbuntuProCheckTokenAnswerImplCopyWith<_$UbuntuProCheckTokenAnswerImpl> + _$$GuidedStorageTargetReformatImplCopyWith<_$GuidedStorageTargetReformatImpl> get copyWith => throw _privateConstructorUsedError; } -WSLConfigurationBase _$WSLConfigurationBaseFromJson(Map json) { - return _WSLConfigurationBase.fromJson(json); -} - -/// @nodoc -mixin _$WSLConfigurationBase { - String get automountRoot => throw _privateConstructorUsedError; - String get automountOptions => throw _privateConstructorUsedError; - bool get networkGeneratehosts => throw _privateConstructorUsedError; - bool get networkGenerateresolvconf => throw _privateConstructorUsedError; - - Map toJson() => throw _privateConstructorUsedError; - @JsonKey(ignore: true) - $WSLConfigurationBaseCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $WSLConfigurationBaseCopyWith<$Res> { - factory $WSLConfigurationBaseCopyWith(WSLConfigurationBase value, - $Res Function(WSLConfigurationBase) then) = - _$WSLConfigurationBaseCopyWithImpl<$Res, WSLConfigurationBase>; - @useResult - $Res call( - {String automountRoot, - String automountOptions, - bool networkGeneratehosts, - bool networkGenerateresolvconf}); -} - -/// @nodoc -class _$WSLConfigurationBaseCopyWithImpl<$Res, - $Val extends WSLConfigurationBase> - implements $WSLConfigurationBaseCopyWith<$Res> { - _$WSLConfigurationBaseCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? automountRoot = null, - Object? automountOptions = null, - Object? networkGeneratehosts = null, - Object? networkGenerateresolvconf = null, - }) { - return _then(_value.copyWith( - automountRoot: null == automountRoot - ? _value.automountRoot - : automountRoot // ignore: cast_nullable_to_non_nullable - as String, - automountOptions: null == automountOptions - ? _value.automountOptions - : automountOptions // ignore: cast_nullable_to_non_nullable - as String, - networkGeneratehosts: null == networkGeneratehosts - ? _value.networkGeneratehosts - : networkGeneratehosts // ignore: cast_nullable_to_non_nullable - as bool, - networkGenerateresolvconf: null == networkGenerateresolvconf - ? _value.networkGenerateresolvconf - : networkGenerateresolvconf // ignore: cast_nullable_to_non_nullable - as bool, - ) as $Val); - } -} - /// @nodoc -abstract class _$$WSLConfigurationBaseImplCopyWith<$Res> - implements $WSLConfigurationBaseCopyWith<$Res> { - factory _$$WSLConfigurationBaseImplCopyWith(_$WSLConfigurationBaseImpl value, - $Res Function(_$WSLConfigurationBaseImpl) then) = - __$$WSLConfigurationBaseImplCopyWithImpl<$Res>; +abstract class _$$GuidedStorageTargetResizeImplCopyWith<$Res> + implements $GuidedStorageTargetCopyWith<$Res> { + factory _$$GuidedStorageTargetResizeImplCopyWith( + _$GuidedStorageTargetResizeImpl value, + $Res Function(_$GuidedStorageTargetResizeImpl) then) = + __$$GuidedStorageTargetResizeImplCopyWithImpl<$Res>; @override @useResult $Res call( - {String automountRoot, - String automountOptions, - bool networkGeneratehosts, - bool networkGenerateresolvconf}); + {String diskId, + int partitionNumber, + int newSize, + int? minimum, + int? recommended, + int? maximum, + List allowed, + List disallowed}); } /// @nodoc -class __$$WSLConfigurationBaseImplCopyWithImpl<$Res> - extends _$WSLConfigurationBaseCopyWithImpl<$Res, _$WSLConfigurationBaseImpl> - implements _$$WSLConfigurationBaseImplCopyWith<$Res> { - __$$WSLConfigurationBaseImplCopyWithImpl(_$WSLConfigurationBaseImpl _value, - $Res Function(_$WSLConfigurationBaseImpl) _then) +class __$$GuidedStorageTargetResizeImplCopyWithImpl<$Res> + extends _$GuidedStorageTargetCopyWithImpl<$Res, + _$GuidedStorageTargetResizeImpl> + implements _$$GuidedStorageTargetResizeImplCopyWith<$Res> { + __$$GuidedStorageTargetResizeImplCopyWithImpl( + _$GuidedStorageTargetResizeImpl _value, + $Res Function(_$GuidedStorageTargetResizeImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? automountRoot = null, - Object? automountOptions = null, - Object? networkGeneratehosts = null, - Object? networkGenerateresolvconf = null, - }) { - return _then(_$WSLConfigurationBaseImpl( - automountRoot: null == automountRoot - ? _value.automountRoot - : automountRoot // ignore: cast_nullable_to_non_nullable - as String, - automountOptions: null == automountOptions - ? _value.automountOptions - : automountOptions // ignore: cast_nullable_to_non_nullable - as String, - networkGeneratehosts: null == networkGeneratehosts - ? _value.networkGeneratehosts - : networkGeneratehosts // ignore: cast_nullable_to_non_nullable - as bool, - networkGenerateresolvconf: null == networkGenerateresolvconf - ? _value.networkGenerateresolvconf - : networkGenerateresolvconf // ignore: cast_nullable_to_non_nullable - as bool, + Object? diskId = null, + Object? partitionNumber = null, + Object? newSize = null, + Object? minimum = freezed, + Object? recommended = freezed, + Object? maximum = freezed, + Object? allowed = null, + Object? disallowed = null, + }) { + return _then(_$GuidedStorageTargetResizeImpl( + diskId: null == diskId + ? _value.diskId + : diskId // ignore: cast_nullable_to_non_nullable + as String, + partitionNumber: null == partitionNumber + ? _value.partitionNumber + : partitionNumber // ignore: cast_nullable_to_non_nullable + as int, + newSize: null == newSize + ? _value.newSize + : newSize // ignore: cast_nullable_to_non_nullable + as int, + minimum: freezed == minimum + ? _value.minimum + : minimum // ignore: cast_nullable_to_non_nullable + as int?, + recommended: freezed == recommended + ? _value.recommended + : recommended // ignore: cast_nullable_to_non_nullable + as int?, + maximum: freezed == maximum + ? _value.maximum + : maximum // ignore: cast_nullable_to_non_nullable + as int?, + allowed: null == allowed + ? _value._allowed + : allowed // ignore: cast_nullable_to_non_nullable + as List, + disallowed: null == disallowed + ? _value._disallowed + : disallowed // ignore: cast_nullable_to_non_nullable + as List, )); } } /// @nodoc @JsonSerializable() -class _$WSLConfigurationBaseImpl implements _WSLConfigurationBase { - const _$WSLConfigurationBaseImpl( - {this.automountRoot = '/mnt/', - this.automountOptions = '', - this.networkGeneratehosts = true, - this.networkGenerateresolvconf = true}); +class _$GuidedStorageTargetResizeImpl implements GuidedStorageTargetResize { + const _$GuidedStorageTargetResizeImpl( + {required this.diskId, + required this.partitionNumber, + required this.newSize, + required this.minimum, + required this.recommended, + required this.maximum, + final List allowed = const [], + final List disallowed = const [], + final String? $type}) + : _allowed = allowed, + _disallowed = disallowed, + $type = $type ?? 'GuidedStorageTargetResize'; - factory _$WSLConfigurationBaseImpl.fromJson(Map json) => - _$$WSLConfigurationBaseImplFromJson(json); + factory _$GuidedStorageTargetResizeImpl.fromJson(Map json) => + _$$GuidedStorageTargetResizeImplFromJson(json); @override - @JsonKey() - final String automountRoot; + final String diskId; + @override + final int partitionNumber; + @override + final int newSize; + @override + final int? minimum; + @override + final int? recommended; @override - @JsonKey() - final String automountOptions; + final int? maximum; + final List _allowed; @override @JsonKey() - final bool networkGeneratehosts; + List get allowed { + if (_allowed is EqualUnmodifiableListView) return _allowed; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_allowed); + } + + final List _disallowed; @override @JsonKey() - final bool networkGenerateresolvconf; + List get disallowed { + if (_disallowed is EqualUnmodifiableListView) return _disallowed; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_disallowed); + } + + @JsonKey(name: '\$type') + final String $type; @override String toString() { - return 'WSLConfigurationBase(automountRoot: $automountRoot, automountOptions: $automountOptions, networkGeneratehosts: $networkGeneratehosts, networkGenerateresolvconf: $networkGenerateresolvconf)'; + return 'GuidedStorageTarget.resize(diskId: $diskId, partitionNumber: $partitionNumber, newSize: $newSize, minimum: $minimum, recommended: $recommended, maximum: $maximum, allowed: $allowed, disallowed: $disallowed)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$WSLConfigurationBaseImpl && - (identical(other.automountRoot, automountRoot) || - other.automountRoot == automountRoot) && - (identical(other.automountOptions, automountOptions) || - other.automountOptions == automountOptions) && - (identical(other.networkGeneratehosts, networkGeneratehosts) || - other.networkGeneratehosts == networkGeneratehosts) && - (identical(other.networkGenerateresolvconf, - networkGenerateresolvconf) || - other.networkGenerateresolvconf == networkGenerateresolvconf)); + other is _$GuidedStorageTargetResizeImpl && + (identical(other.diskId, diskId) || other.diskId == diskId) && + (identical(other.partitionNumber, partitionNumber) || + other.partitionNumber == partitionNumber) && + (identical(other.newSize, newSize) || other.newSize == newSize) && + (identical(other.minimum, minimum) || other.minimum == minimum) && + (identical(other.recommended, recommended) || + other.recommended == recommended) && + (identical(other.maximum, maximum) || other.maximum == maximum) && + const DeepCollectionEquality().equals(other._allowed, _allowed) && + const DeepCollectionEquality() + .equals(other._disallowed, _disallowed)); } @JsonKey(ignore: true) @override - int get hashCode => Object.hash(runtimeType, automountRoot, automountOptions, - networkGeneratehosts, networkGenerateresolvconf); + int get hashCode => Object.hash( + runtimeType, + diskId, + partitionNumber, + newSize, + minimum, + recommended, + maximum, + const DeepCollectionEquality().hash(_allowed), + const DeepCollectionEquality().hash(_disallowed)); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$WSLConfigurationBaseImplCopyWith<_$WSLConfigurationBaseImpl> - get copyWith => - __$$WSLConfigurationBaseImplCopyWithImpl<_$WSLConfigurationBaseImpl>( - this, _$identity); + _$$GuidedStorageTargetResizeImplCopyWith<_$GuidedStorageTargetResizeImpl> + get copyWith => __$$GuidedStorageTargetResizeImplCopyWithImpl< + _$GuidedStorageTargetResizeImpl>(this, _$identity); @override - Map toJson() { - return _$$WSLConfigurationBaseImplToJson( - this, - ); + @optionalTypeArgs + TResult when({ + required TResult Function(String diskId, List allowed, + List disallowed) + reformat, + required TResult Function( + String diskId, + int partitionNumber, + int newSize, + int? minimum, + int? recommended, + int? maximum, + List allowed, + List disallowed) + resize, + required TResult Function( + String diskId, + Gap gap, + List allowed, + List disallowed) + useGap, + required TResult Function(List allowed, + List disallowed) + manual, + }) { + return resize(diskId, partitionNumber, newSize, minimum, recommended, + maximum, allowed, disallowed); } -} - -abstract class _WSLConfigurationBase implements WSLConfigurationBase { - const factory _WSLConfigurationBase( - {final String automountRoot, - final String automountOptions, - final bool networkGeneratehosts, - final bool networkGenerateresolvconf}) = _$WSLConfigurationBaseImpl; - factory _WSLConfigurationBase.fromJson(Map json) = - _$WSLConfigurationBaseImpl.fromJson; - - @override - String get automountRoot; - @override - String get automountOptions; - @override - bool get networkGeneratehosts; @override - bool get networkGenerateresolvconf; + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String diskId, List allowed, + List disallowed)? + reformat, + TResult? Function( + String diskId, + int partitionNumber, + int newSize, + int? minimum, + int? recommended, + int? maximum, + List allowed, + List disallowed)? + resize, + TResult? Function(String diskId, Gap gap, List allowed, + List disallowed)? + useGap, + TResult? Function(List allowed, + List disallowed)? + manual, + }) { + return resize?.call(diskId, partitionNumber, newSize, minimum, recommended, + maximum, allowed, disallowed); + } + @override - @JsonKey(ignore: true) - _$$WSLConfigurationBaseImplCopyWith<_$WSLConfigurationBaseImpl> - get copyWith => throw _privateConstructorUsedError; -} + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String diskId, List allowed, + List disallowed)? + reformat, + TResult Function( + String diskId, + int partitionNumber, + int newSize, + int? minimum, + int? recommended, + int? maximum, + List allowed, + List disallowed)? + resize, + TResult Function(String diskId, Gap gap, List allowed, + List disallowed)? + useGap, + TResult Function(List allowed, + List disallowed)? + manual, + required TResult orElse(), + }) { + if (resize != null) { + return resize(diskId, partitionNumber, newSize, minimum, recommended, + maximum, allowed, disallowed); + } + return orElse(); + } -WSLConfigurationAdvanced _$WSLConfigurationAdvancedFromJson( - Map json) { - return _WSLConfigurationAdvanced.fromJson(json); -} + @override + @optionalTypeArgs + TResult map({ + required TResult Function(GuidedStorageTargetReformat value) reformat, + required TResult Function(GuidedStorageTargetResize value) resize, + required TResult Function(GuidedStorageTargetUseGap value) useGap, + required TResult Function(GuidedStorageTargetManual value) manual, + }) { + return resize(this); + } -/// @nodoc -mixin _$WSLConfigurationAdvanced { - bool get automountEnabled => throw _privateConstructorUsedError; - bool get automountMountfstab => throw _privateConstructorUsedError; - bool get interopEnabled => throw _privateConstructorUsedError; - bool get interopAppendwindowspath => throw _privateConstructorUsedError; - bool get systemdEnabled => throw _privateConstructorUsedError; + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(GuidedStorageTargetReformat value)? reformat, + TResult? Function(GuidedStorageTargetResize value)? resize, + TResult? Function(GuidedStorageTargetUseGap value)? useGap, + TResult? Function(GuidedStorageTargetManual value)? manual, + }) { + return resize?.call(this); + } - Map toJson() => throw _privateConstructorUsedError; - @JsonKey(ignore: true) - $WSLConfigurationAdvancedCopyWith get copyWith => - throw _privateConstructorUsedError; -} + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(GuidedStorageTargetReformat value)? reformat, + TResult Function(GuidedStorageTargetResize value)? resize, + TResult Function(GuidedStorageTargetUseGap value)? useGap, + TResult Function(GuidedStorageTargetManual value)? manual, + required TResult orElse(), + }) { + if (resize != null) { + return resize(this); + } + return orElse(); + } -/// @nodoc -abstract class $WSLConfigurationAdvancedCopyWith<$Res> { - factory $WSLConfigurationAdvancedCopyWith(WSLConfigurationAdvanced value, - $Res Function(WSLConfigurationAdvanced) then) = - _$WSLConfigurationAdvancedCopyWithImpl<$Res, WSLConfigurationAdvanced>; - @useResult - $Res call( - {bool automountEnabled, - bool automountMountfstab, - bool interopEnabled, - bool interopAppendwindowspath, - bool systemdEnabled}); + @override + Map toJson() { + return _$$GuidedStorageTargetResizeImplToJson( + this, + ); + } } -/// @nodoc -class _$WSLConfigurationAdvancedCopyWithImpl<$Res, - $Val extends WSLConfigurationAdvanced> - implements $WSLConfigurationAdvancedCopyWith<$Res> { - _$WSLConfigurationAdvancedCopyWithImpl(this._value, this._then); +abstract class GuidedStorageTargetResize implements GuidedStorageTarget { + const factory GuidedStorageTargetResize( + {required final String diskId, + required final int partitionNumber, + required final int newSize, + required final int? minimum, + required final int? recommended, + required final int? maximum, + final List allowed, + final List disallowed}) = + _$GuidedStorageTargetResizeImpl; - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + factory GuidedStorageTargetResize.fromJson(Map json) = + _$GuidedStorageTargetResizeImpl.fromJson; - @pragma('vm:prefer-inline') + String get diskId; + int get partitionNumber; + int get newSize; + int? get minimum; + int? get recommended; + int? get maximum; @override - $Res call({ - Object? automountEnabled = null, - Object? automountMountfstab = null, - Object? interopEnabled = null, - Object? interopAppendwindowspath = null, - Object? systemdEnabled = null, - }) { - return _then(_value.copyWith( - automountEnabled: null == automountEnabled - ? _value.automountEnabled - : automountEnabled // ignore: cast_nullable_to_non_nullable - as bool, - automountMountfstab: null == automountMountfstab - ? _value.automountMountfstab - : automountMountfstab // ignore: cast_nullable_to_non_nullable - as bool, - interopEnabled: null == interopEnabled - ? _value.interopEnabled - : interopEnabled // ignore: cast_nullable_to_non_nullable - as bool, - interopAppendwindowspath: null == interopAppendwindowspath - ? _value.interopAppendwindowspath - : interopAppendwindowspath // ignore: cast_nullable_to_non_nullable - as bool, - systemdEnabled: null == systemdEnabled - ? _value.systemdEnabled - : systemdEnabled // ignore: cast_nullable_to_non_nullable - as bool, - ) as $Val); - } + List get allowed; + @override + List get disallowed; + @override + @JsonKey(ignore: true) + _$$GuidedStorageTargetResizeImplCopyWith<_$GuidedStorageTargetResizeImpl> + get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$WSLConfigurationAdvancedImplCopyWith<$Res> - implements $WSLConfigurationAdvancedCopyWith<$Res> { - factory _$$WSLConfigurationAdvancedImplCopyWith( - _$WSLConfigurationAdvancedImpl value, - $Res Function(_$WSLConfigurationAdvancedImpl) then) = - __$$WSLConfigurationAdvancedImplCopyWithImpl<$Res>; +abstract class _$$GuidedStorageTargetUseGapImplCopyWith<$Res> + implements $GuidedStorageTargetCopyWith<$Res> { + factory _$$GuidedStorageTargetUseGapImplCopyWith( + _$GuidedStorageTargetUseGapImpl value, + $Res Function(_$GuidedStorageTargetUseGapImpl) then) = + __$$GuidedStorageTargetUseGapImplCopyWithImpl<$Res>; @override @useResult $Res call( - {bool automountEnabled, - bool automountMountfstab, - bool interopEnabled, - bool interopAppendwindowspath, - bool systemdEnabled}); + {String diskId, + Gap gap, + List allowed, + List disallowed}); } /// @nodoc -class __$$WSLConfigurationAdvancedImplCopyWithImpl<$Res> - extends _$WSLConfigurationAdvancedCopyWithImpl<$Res, - _$WSLConfigurationAdvancedImpl> - implements _$$WSLConfigurationAdvancedImplCopyWith<$Res> { - __$$WSLConfigurationAdvancedImplCopyWithImpl( - _$WSLConfigurationAdvancedImpl _value, - $Res Function(_$WSLConfigurationAdvancedImpl) _then) +class __$$GuidedStorageTargetUseGapImplCopyWithImpl<$Res> + extends _$GuidedStorageTargetCopyWithImpl<$Res, + _$GuidedStorageTargetUseGapImpl> + implements _$$GuidedStorageTargetUseGapImplCopyWith<$Res> { + __$$GuidedStorageTargetUseGapImplCopyWithImpl( + _$GuidedStorageTargetUseGapImpl _value, + $Res Function(_$GuidedStorageTargetUseGapImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? automountEnabled = null, - Object? automountMountfstab = null, - Object? interopEnabled = null, - Object? interopAppendwindowspath = null, - Object? systemdEnabled = null, - }) { - return _then(_$WSLConfigurationAdvancedImpl( - automountEnabled: null == automountEnabled - ? _value.automountEnabled - : automountEnabled // ignore: cast_nullable_to_non_nullable - as bool, - automountMountfstab: null == automountMountfstab - ? _value.automountMountfstab - : automountMountfstab // ignore: cast_nullable_to_non_nullable - as bool, - interopEnabled: null == interopEnabled - ? _value.interopEnabled - : interopEnabled // ignore: cast_nullable_to_non_nullable - as bool, - interopAppendwindowspath: null == interopAppendwindowspath - ? _value.interopAppendwindowspath - : interopAppendwindowspath // ignore: cast_nullable_to_non_nullable - as bool, - systemdEnabled: null == systemdEnabled - ? _value.systemdEnabled - : systemdEnabled // ignore: cast_nullable_to_non_nullable - as bool, + Object? diskId = null, + Object? gap = freezed, + Object? allowed = null, + Object? disallowed = null, + }) { + return _then(_$GuidedStorageTargetUseGapImpl( + diskId: null == diskId + ? _value.diskId + : diskId // ignore: cast_nullable_to_non_nullable + as String, + gap: freezed == gap + ? _value.gap + : gap // ignore: cast_nullable_to_non_nullable + as Gap, + allowed: null == allowed + ? _value._allowed + : allowed // ignore: cast_nullable_to_non_nullable + as List, + disallowed: null == disallowed + ? _value._disallowed + : disallowed // ignore: cast_nullable_to_non_nullable + as List, )); } } /// @nodoc @JsonSerializable() -class _$WSLConfigurationAdvancedImpl implements _WSLConfigurationAdvanced { - const _$WSLConfigurationAdvancedImpl( - {this.automountEnabled = true, - this.automountMountfstab = true, - this.interopEnabled = true, - this.interopAppendwindowspath = true, - this.systemdEnabled = false}); +class _$GuidedStorageTargetUseGapImpl implements GuidedStorageTargetUseGap { + const _$GuidedStorageTargetUseGapImpl( + {required this.diskId, + required this.gap, + final List allowed = const [], + final List disallowed = const [], + final String? $type}) + : _allowed = allowed, + _disallowed = disallowed, + $type = $type ?? 'GuidedStorageTargetUseGap'; - factory _$WSLConfigurationAdvancedImpl.fromJson(Map json) => - _$$WSLConfigurationAdvancedImplFromJson(json); + factory _$GuidedStorageTargetUseGapImpl.fromJson(Map json) => + _$$GuidedStorageTargetUseGapImplFromJson(json); @override - @JsonKey() - final bool automountEnabled; - @override - @JsonKey() - final bool automountMountfstab; + final String diskId; @override - @JsonKey() - final bool interopEnabled; + final Gap gap; + final List _allowed; @override @JsonKey() - final bool interopAppendwindowspath; + List get allowed { + if (_allowed is EqualUnmodifiableListView) return _allowed; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_allowed); + } + + final List _disallowed; @override @JsonKey() - final bool systemdEnabled; + List get disallowed { + if (_disallowed is EqualUnmodifiableListView) return _disallowed; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_disallowed); + } + + @JsonKey(name: '\$type') + final String $type; @override String toString() { - return 'WSLConfigurationAdvanced(automountEnabled: $automountEnabled, automountMountfstab: $automountMountfstab, interopEnabled: $interopEnabled, interopAppendwindowspath: $interopAppendwindowspath, systemdEnabled: $systemdEnabled)'; + return 'GuidedStorageTarget.useGap(diskId: $diskId, gap: $gap, allowed: $allowed, disallowed: $disallowed)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$WSLConfigurationAdvancedImpl && - (identical(other.automountEnabled, automountEnabled) || - other.automountEnabled == automountEnabled) && - (identical(other.automountMountfstab, automountMountfstab) || - other.automountMountfstab == automountMountfstab) && - (identical(other.interopEnabled, interopEnabled) || - other.interopEnabled == interopEnabled) && - (identical( - other.interopAppendwindowspath, interopAppendwindowspath) || - other.interopAppendwindowspath == interopAppendwindowspath) && - (identical(other.systemdEnabled, systemdEnabled) || - other.systemdEnabled == systemdEnabled)); + other is _$GuidedStorageTargetUseGapImpl && + (identical(other.diskId, diskId) || other.diskId == diskId) && + const DeepCollectionEquality().equals(other.gap, gap) && + const DeepCollectionEquality().equals(other._allowed, _allowed) && + const DeepCollectionEquality() + .equals(other._disallowed, _disallowed)); } @JsonKey(ignore: true) @override int get hashCode => Object.hash( runtimeType, - automountEnabled, - automountMountfstab, - interopEnabled, - interopAppendwindowspath, - systemdEnabled); + diskId, + const DeepCollectionEquality().hash(gap), + const DeepCollectionEquality().hash(_allowed), + const DeepCollectionEquality().hash(_disallowed)); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$WSLConfigurationAdvancedImplCopyWith<_$WSLConfigurationAdvancedImpl> - get copyWith => __$$WSLConfigurationAdvancedImplCopyWithImpl< - _$WSLConfigurationAdvancedImpl>(this, _$identity); + _$$GuidedStorageTargetUseGapImplCopyWith<_$GuidedStorageTargetUseGapImpl> + get copyWith => __$$GuidedStorageTargetUseGapImplCopyWithImpl< + _$GuidedStorageTargetUseGapImpl>(this, _$identity); @override - Map toJson() { - return _$$WSLConfigurationAdvancedImplToJson( - this, - ); + @optionalTypeArgs + TResult when({ + required TResult Function(String diskId, List allowed, + List disallowed) + reformat, + required TResult Function( + String diskId, + int partitionNumber, + int newSize, + int? minimum, + int? recommended, + int? maximum, + List allowed, + List disallowed) + resize, + required TResult Function( + String diskId, + Gap gap, + List allowed, + List disallowed) + useGap, + required TResult Function(List allowed, + List disallowed) + manual, + }) { + return useGap(diskId, gap, allowed, disallowed); } -} - -abstract class _WSLConfigurationAdvanced implements WSLConfigurationAdvanced { - const factory _WSLConfigurationAdvanced( - {final bool automountEnabled, - final bool automountMountfstab, - final bool interopEnabled, - final bool interopAppendwindowspath, - final bool systemdEnabled}) = _$WSLConfigurationAdvancedImpl; - factory _WSLConfigurationAdvanced.fromJson(Map json) = - _$WSLConfigurationAdvancedImpl.fromJson; - - @override - bool get automountEnabled; @override - bool get automountMountfstab; - @override - bool get interopEnabled; - @override - bool get interopAppendwindowspath; - @override - bool get systemdEnabled; + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String diskId, List allowed, + List disallowed)? + reformat, + TResult? Function( + String diskId, + int partitionNumber, + int newSize, + int? minimum, + int? recommended, + int? maximum, + List allowed, + List disallowed)? + resize, + TResult? Function(String diskId, Gap gap, List allowed, + List disallowed)? + useGap, + TResult? Function(List allowed, + List disallowed)? + manual, + }) { + return useGap?.call(diskId, gap, allowed, disallowed); + } + @override - @JsonKey(ignore: true) - _$$WSLConfigurationAdvancedImplCopyWith<_$WSLConfigurationAdvancedImpl> - get copyWith => throw _privateConstructorUsedError; -} + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String diskId, List allowed, + List disallowed)? + reformat, + TResult Function( + String diskId, + int partitionNumber, + int newSize, + int? minimum, + int? recommended, + int? maximum, + List allowed, + List disallowed)? + resize, + TResult Function(String diskId, Gap gap, List allowed, + List disallowed)? + useGap, + TResult Function(List allowed, + List disallowed)? + manual, + required TResult orElse(), + }) { + if (useGap != null) { + return useGap(diskId, gap, allowed, disallowed); + } + return orElse(); + } -WSLSetupOptions _$WSLSetupOptionsFromJson(Map json) { - return _WSLSetupOptions.fromJson(json); -} + @override + @optionalTypeArgs + TResult map({ + required TResult Function(GuidedStorageTargetReformat value) reformat, + required TResult Function(GuidedStorageTargetResize value) resize, + required TResult Function(GuidedStorageTargetUseGap value) useGap, + required TResult Function(GuidedStorageTargetManual value) manual, + }) { + return useGap(this); + } -/// @nodoc -mixin _$WSLSetupOptions { - bool get installLanguageSupportPackages => throw _privateConstructorUsedError; + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(GuidedStorageTargetReformat value)? reformat, + TResult? Function(GuidedStorageTargetResize value)? resize, + TResult? Function(GuidedStorageTargetUseGap value)? useGap, + TResult? Function(GuidedStorageTargetManual value)? manual, + }) { + return useGap?.call(this); + } - Map toJson() => throw _privateConstructorUsedError; - @JsonKey(ignore: true) - $WSLSetupOptionsCopyWith get copyWith => - throw _privateConstructorUsedError; -} + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(GuidedStorageTargetReformat value)? reformat, + TResult Function(GuidedStorageTargetResize value)? resize, + TResult Function(GuidedStorageTargetUseGap value)? useGap, + TResult Function(GuidedStorageTargetManual value)? manual, + required TResult orElse(), + }) { + if (useGap != null) { + return useGap(this); + } + return orElse(); + } -/// @nodoc -abstract class $WSLSetupOptionsCopyWith<$Res> { - factory $WSLSetupOptionsCopyWith( - WSLSetupOptions value, $Res Function(WSLSetupOptions) then) = - _$WSLSetupOptionsCopyWithImpl<$Res, WSLSetupOptions>; - @useResult - $Res call({bool installLanguageSupportPackages}); + @override + Map toJson() { + return _$$GuidedStorageTargetUseGapImplToJson( + this, + ); + } } -/// @nodoc -class _$WSLSetupOptionsCopyWithImpl<$Res, $Val extends WSLSetupOptions> - implements $WSLSetupOptionsCopyWith<$Res> { - _$WSLSetupOptionsCopyWithImpl(this._value, this._then); +abstract class GuidedStorageTargetUseGap implements GuidedStorageTarget { + const factory GuidedStorageTargetUseGap( + {required final String diskId, + required final Gap gap, + final List allowed, + final List disallowed}) = + _$GuidedStorageTargetUseGapImpl; - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; + factory GuidedStorageTargetUseGap.fromJson(Map json) = + _$GuidedStorageTargetUseGapImpl.fromJson; - @pragma('vm:prefer-inline') + String get diskId; + Gap get gap; @override - $Res call({ - Object? installLanguageSupportPackages = null, - }) { - return _then(_value.copyWith( - installLanguageSupportPackages: null == installLanguageSupportPackages - ? _value.installLanguageSupportPackages - : installLanguageSupportPackages // ignore: cast_nullable_to_non_nullable - as bool, - ) as $Val); - } + List get allowed; + @override + List get disallowed; + @override + @JsonKey(ignore: true) + _$$GuidedStorageTargetUseGapImplCopyWith<_$GuidedStorageTargetUseGapImpl> + get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$WSLSetupOptionsImplCopyWith<$Res> - implements $WSLSetupOptionsCopyWith<$Res> { - factory _$$WSLSetupOptionsImplCopyWith(_$WSLSetupOptionsImpl value, - $Res Function(_$WSLSetupOptionsImpl) then) = - __$$WSLSetupOptionsImplCopyWithImpl<$Res>; +abstract class _$$GuidedStorageTargetManualImplCopyWith<$Res> + implements $GuidedStorageTargetCopyWith<$Res> { + factory _$$GuidedStorageTargetManualImplCopyWith( + _$GuidedStorageTargetManualImpl value, + $Res Function(_$GuidedStorageTargetManualImpl) then) = + __$$GuidedStorageTargetManualImplCopyWithImpl<$Res>; @override @useResult - $Res call({bool installLanguageSupportPackages}); + $Res call( + {List allowed, + List disallowed}); } /// @nodoc -class __$$WSLSetupOptionsImplCopyWithImpl<$Res> - extends _$WSLSetupOptionsCopyWithImpl<$Res, _$WSLSetupOptionsImpl> - implements _$$WSLSetupOptionsImplCopyWith<$Res> { - __$$WSLSetupOptionsImplCopyWithImpl( - _$WSLSetupOptionsImpl _value, $Res Function(_$WSLSetupOptionsImpl) _then) +class __$$GuidedStorageTargetManualImplCopyWithImpl<$Res> + extends _$GuidedStorageTargetCopyWithImpl<$Res, + _$GuidedStorageTargetManualImpl> + implements _$$GuidedStorageTargetManualImplCopyWith<$Res> { + __$$GuidedStorageTargetManualImplCopyWithImpl( + _$GuidedStorageTargetManualImpl _value, + $Res Function(_$GuidedStorageTargetManualImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? installLanguageSupportPackages = null, + Object? allowed = null, + Object? disallowed = null, }) { - return _then(_$WSLSetupOptionsImpl( - installLanguageSupportPackages: null == installLanguageSupportPackages - ? _value.installLanguageSupportPackages - : installLanguageSupportPackages // ignore: cast_nullable_to_non_nullable - as bool, + return _then(_$GuidedStorageTargetManualImpl( + allowed: null == allowed + ? _value._allowed + : allowed // ignore: cast_nullable_to_non_nullable + as List, + disallowed: null == disallowed + ? _value._disallowed + : disallowed // ignore: cast_nullable_to_non_nullable + as List, )); } } /// @nodoc @JsonSerializable() -class _$WSLSetupOptionsImpl implements _WSLSetupOptions { - const _$WSLSetupOptionsImpl({this.installLanguageSupportPackages = true}); +class _$GuidedStorageTargetManualImpl implements GuidedStorageTargetManual { + const _$GuidedStorageTargetManualImpl( + {required final List allowed, + final List disallowed = const [], + final String? $type}) + : _allowed = allowed, + _disallowed = disallowed, + $type = $type ?? 'GuidedStorageTargetManual'; + + factory _$GuidedStorageTargetManualImpl.fromJson(Map json) => + _$$GuidedStorageTargetManualImplFromJson(json); - factory _$WSLSetupOptionsImpl.fromJson(Map json) => - _$$WSLSetupOptionsImplFromJson(json); + final List _allowed; + @override + List get allowed { + if (_allowed is EqualUnmodifiableListView) return _allowed; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_allowed); + } + final List _disallowed; @override @JsonKey() - final bool installLanguageSupportPackages; + List get disallowed { + if (_disallowed is EqualUnmodifiableListView) return _disallowed; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_disallowed); + } + + @JsonKey(name: '\$type') + final String $type; @override String toString() { - return 'WSLSetupOptions(installLanguageSupportPackages: $installLanguageSupportPackages)'; + return 'GuidedStorageTarget.manual(allowed: $allowed, disallowed: $disallowed)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$WSLSetupOptionsImpl && - (identical(other.installLanguageSupportPackages, - installLanguageSupportPackages) || - other.installLanguageSupportPackages == - installLanguageSupportPackages)); + other is _$GuidedStorageTargetManualImpl && + const DeepCollectionEquality().equals(other._allowed, _allowed) && + const DeepCollectionEquality() + .equals(other._disallowed, _disallowed)); } @JsonKey(ignore: true) @override - int get hashCode => Object.hash(runtimeType, installLanguageSupportPackages); + int get hashCode => Object.hash( + runtimeType, + const DeepCollectionEquality().hash(_allowed), + const DeepCollectionEquality().hash(_disallowed)); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$WSLSetupOptionsImplCopyWith<_$WSLSetupOptionsImpl> get copyWith => - __$$WSLSetupOptionsImplCopyWithImpl<_$WSLSetupOptionsImpl>( - this, _$identity); + _$$GuidedStorageTargetManualImplCopyWith<_$GuidedStorageTargetManualImpl> + get copyWith => __$$GuidedStorageTargetManualImplCopyWithImpl< + _$GuidedStorageTargetManualImpl>(this, _$identity); @override - Map toJson() { - return _$$WSLSetupOptionsImplToJson( - this, - ); + @optionalTypeArgs + TResult when({ + required TResult Function(String diskId, List allowed, + List disallowed) + reformat, + required TResult Function( + String diskId, + int partitionNumber, + int newSize, + int? minimum, + int? recommended, + int? maximum, + List allowed, + List disallowed) + resize, + required TResult Function( + String diskId, + Gap gap, + List allowed, + List disallowed) + useGap, + required TResult Function(List allowed, + List disallowed) + manual, + }) { + return manual(allowed, disallowed); } -} - -abstract class _WSLSetupOptions implements WSLSetupOptions { - const factory _WSLSetupOptions({final bool installLanguageSupportPackages}) = - _$WSLSetupOptionsImpl; - - factory _WSLSetupOptions.fromJson(Map json) = - _$WSLSetupOptionsImpl.fromJson; - - @override - bool get installLanguageSupportPackages; - @override - @JsonKey(ignore: true) - _$$WSLSetupOptionsImplCopyWith<_$WSLSetupOptionsImpl> get copyWith => - throw _privateConstructorUsedError; -} - -TaskProgress _$TaskProgressFromJson(Map json) { - return _TaskProgress.fromJson(json); -} - -/// @nodoc -mixin _$TaskProgress { - String get label => throw _privateConstructorUsedError; - int get done => throw _privateConstructorUsedError; - int get total => throw _privateConstructorUsedError; - - Map toJson() => throw _privateConstructorUsedError; - @JsonKey(ignore: true) - $TaskProgressCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $TaskProgressCopyWith<$Res> { - factory $TaskProgressCopyWith( - TaskProgress value, $Res Function(TaskProgress) then) = - _$TaskProgressCopyWithImpl<$Res, TaskProgress>; - @useResult - $Res call({String label, int done, int total}); -} - -/// @nodoc -class _$TaskProgressCopyWithImpl<$Res, $Val extends TaskProgress> - implements $TaskProgressCopyWith<$Res> { - _$TaskProgressCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - @pragma('vm:prefer-inline') @override - $Res call({ - Object? label = null, - Object? done = null, - Object? total = null, + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String diskId, List allowed, + List disallowed)? + reformat, + TResult? Function( + String diskId, + int partitionNumber, + int newSize, + int? minimum, + int? recommended, + int? maximum, + List allowed, + List disallowed)? + resize, + TResult? Function(String diskId, Gap gap, List allowed, + List disallowed)? + useGap, + TResult? Function(List allowed, + List disallowed)? + manual, }) { - return _then(_value.copyWith( - label: null == label - ? _value.label - : label // ignore: cast_nullable_to_non_nullable - as String, - done: null == done - ? _value.done - : done // ignore: cast_nullable_to_non_nullable - as int, - total: null == total - ? _value.total - : total // ignore: cast_nullable_to_non_nullable - as int, - ) as $Val); + return manual?.call(allowed, disallowed); } -} - -/// @nodoc -abstract class _$$TaskProgressImplCopyWith<$Res> - implements $TaskProgressCopyWith<$Res> { - factory _$$TaskProgressImplCopyWith( - _$TaskProgressImpl value, $Res Function(_$TaskProgressImpl) then) = - __$$TaskProgressImplCopyWithImpl<$Res>; - @override - @useResult - $Res call({String label, int done, int total}); -} - -/// @nodoc -class __$$TaskProgressImplCopyWithImpl<$Res> - extends _$TaskProgressCopyWithImpl<$Res, _$TaskProgressImpl> - implements _$$TaskProgressImplCopyWith<$Res> { - __$$TaskProgressImplCopyWithImpl( - _$TaskProgressImpl _value, $Res Function(_$TaskProgressImpl) _then) - : super(_value, _then); - @pragma('vm:prefer-inline') @override - $Res call({ - Object? label = null, - Object? done = null, - Object? total = null, + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String diskId, List allowed, + List disallowed)? + reformat, + TResult Function( + String diskId, + int partitionNumber, + int newSize, + int? minimum, + int? recommended, + int? maximum, + List allowed, + List disallowed)? + resize, + TResult Function(String diskId, Gap gap, List allowed, + List disallowed)? + useGap, + TResult Function(List allowed, + List disallowed)? + manual, + required TResult orElse(), }) { - return _then(_$TaskProgressImpl( - label: null == label - ? _value.label - : label // ignore: cast_nullable_to_non_nullable - as String, - done: null == done - ? _value.done - : done // ignore: cast_nullable_to_non_nullable - as int, - total: null == total - ? _value.total - : total // ignore: cast_nullable_to_non_nullable - as int, - )); + if (manual != null) { + return manual(allowed, disallowed); + } + return orElse(); } -} - -/// @nodoc -@JsonSerializable() -class _$TaskProgressImpl implements _TaskProgress { - const _$TaskProgressImpl({this.label = '', this.done = 0, this.total = 0}); - - factory _$TaskProgressImpl.fromJson(Map json) => - _$$TaskProgressImplFromJson(json); - - @override - @JsonKey() - final String label; - @override - @JsonKey() - final int done; - @override - @JsonKey() - final int total; @override - String toString() { - return 'TaskProgress(label: $label, done: $done, total: $total)'; + @optionalTypeArgs + TResult map({ + required TResult Function(GuidedStorageTargetReformat value) reformat, + required TResult Function(GuidedStorageTargetResize value) resize, + required TResult Function(GuidedStorageTargetUseGap value) useGap, + required TResult Function(GuidedStorageTargetManual value) manual, + }) { + return manual(this); } @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$TaskProgressImpl && - (identical(other.label, label) || other.label == label) && - (identical(other.done, done) || other.done == done) && - (identical(other.total, total) || other.total == total)); + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(GuidedStorageTargetReformat value)? reformat, + TResult? Function(GuidedStorageTargetResize value)? resize, + TResult? Function(GuidedStorageTargetUseGap value)? useGap, + TResult? Function(GuidedStorageTargetManual value)? manual, + }) { + return manual?.call(this); } - @JsonKey(ignore: true) - @override - int get hashCode => Object.hash(runtimeType, label, done, total); - - @JsonKey(ignore: true) @override - @pragma('vm:prefer-inline') - _$$TaskProgressImplCopyWith<_$TaskProgressImpl> get copyWith => - __$$TaskProgressImplCopyWithImpl<_$TaskProgressImpl>(this, _$identity); + @optionalTypeArgs + TResult maybeMap({ + TResult Function(GuidedStorageTargetReformat value)? reformat, + TResult Function(GuidedStorageTargetResize value)? resize, + TResult Function(GuidedStorageTargetUseGap value)? useGap, + TResult Function(GuidedStorageTargetManual value)? manual, + required TResult orElse(), + }) { + if (manual != null) { + return manual(this); + } + return orElse(); + } @override Map toJson() { - return _$$TaskProgressImplToJson( + return _$$GuidedStorageTargetManualImplToJson( this, ); } } -abstract class _TaskProgress implements TaskProgress { - const factory _TaskProgress( - {final String label, - final int done, - final int total}) = _$TaskProgressImpl; +abstract class GuidedStorageTargetManual implements GuidedStorageTarget { + const factory GuidedStorageTargetManual( + {required final List allowed, + final List disallowed}) = + _$GuidedStorageTargetManualImpl; - factory _TaskProgress.fromJson(Map json) = - _$TaskProgressImpl.fromJson; + factory GuidedStorageTargetManual.fromJson(Map json) = + _$GuidedStorageTargetManualImpl.fromJson; @override - String get label; - @override - int get done; + List get allowed; @override - int get total; + List get disallowed; @override @JsonKey(ignore: true) - _$$TaskProgressImplCopyWith<_$TaskProgressImpl> get copyWith => - throw _privateConstructorUsedError; + _$$GuidedStorageTargetManualImplCopyWith<_$GuidedStorageTargetManualImpl> + get copyWith => throw _privateConstructorUsedError; } -Task _$TaskFromJson(Map json) { - return _Task.fromJson(json); +RecoveryKey _$RecoveryKeyFromJson(Map json) { + return _RecoveryKey.fromJson(json); } /// @nodoc -mixin _$Task { - String get id => throw _privateConstructorUsedError; - String get kind => throw _privateConstructorUsedError; - String get summary => throw _privateConstructorUsedError; - TaskStatus get status => throw _privateConstructorUsedError; - TaskProgress get progress => throw _privateConstructorUsedError; +mixin _$RecoveryKey { + String? get liveLocation => throw _privateConstructorUsedError; + String? get backupLocation => throw _privateConstructorUsedError; Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $TaskCopyWith get copyWith => throw _privateConstructorUsedError; + $RecoveryKeyCopyWith get copyWith => + throw _privateConstructorUsedError; } /// @nodoc -abstract class $TaskCopyWith<$Res> { - factory $TaskCopyWith(Task value, $Res Function(Task) then) = - _$TaskCopyWithImpl<$Res, Task>; +abstract class $RecoveryKeyCopyWith<$Res> { + factory $RecoveryKeyCopyWith( + RecoveryKey value, $Res Function(RecoveryKey) then) = + _$RecoveryKeyCopyWithImpl<$Res, RecoveryKey>; @useResult - $Res call( - {String id, - String kind, - String summary, - TaskStatus status, - TaskProgress progress}); - - $TaskProgressCopyWith<$Res> get progress; + $Res call({String? liveLocation, String? backupLocation}); } /// @nodoc -class _$TaskCopyWithImpl<$Res, $Val extends Task> - implements $TaskCopyWith<$Res> { - _$TaskCopyWithImpl(this._value, this._then); +class _$RecoveryKeyCopyWithImpl<$Res, $Val extends RecoveryKey> + implements $RecoveryKeyCopyWith<$Res> { + _$RecoveryKeyCopyWithImpl(this._value, this._then); // ignore: unused_field final $Val _value; @@ -13713,231 +13238,168 @@ class _$TaskCopyWithImpl<$Res, $Val extends Task> @pragma('vm:prefer-inline') @override $Res call({ - Object? id = null, - Object? kind = null, - Object? summary = null, - Object? status = null, - Object? progress = null, + Object? liveLocation = freezed, + Object? backupLocation = freezed, }) { return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as String, - kind: null == kind - ? _value.kind - : kind // ignore: cast_nullable_to_non_nullable - as String, - summary: null == summary - ? _value.summary - : summary // ignore: cast_nullable_to_non_nullable - as String, - status: null == status - ? _value.status - : status // ignore: cast_nullable_to_non_nullable - as TaskStatus, - progress: null == progress - ? _value.progress - : progress // ignore: cast_nullable_to_non_nullable - as TaskProgress, + liveLocation: freezed == liveLocation + ? _value.liveLocation + : liveLocation // ignore: cast_nullable_to_non_nullable + as String?, + backupLocation: freezed == backupLocation + ? _value.backupLocation + : backupLocation // ignore: cast_nullable_to_non_nullable + as String?, ) as $Val); } - - @override - @pragma('vm:prefer-inline') - $TaskProgressCopyWith<$Res> get progress { - return $TaskProgressCopyWith<$Res>(_value.progress, (value) { - return _then(_value.copyWith(progress: value) as $Val); - }); - } } /// @nodoc -abstract class _$$TaskImplCopyWith<$Res> implements $TaskCopyWith<$Res> { - factory _$$TaskImplCopyWith( - _$TaskImpl value, $Res Function(_$TaskImpl) then) = - __$$TaskImplCopyWithImpl<$Res>; +abstract class _$$RecoveryKeyImplCopyWith<$Res> + implements $RecoveryKeyCopyWith<$Res> { + factory _$$RecoveryKeyImplCopyWith( + _$RecoveryKeyImpl value, $Res Function(_$RecoveryKeyImpl) then) = + __$$RecoveryKeyImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {String id, - String kind, - String summary, - TaskStatus status, - TaskProgress progress}); - - @override - $TaskProgressCopyWith<$Res> get progress; + $Res call({String? liveLocation, String? backupLocation}); } /// @nodoc -class __$$TaskImplCopyWithImpl<$Res> - extends _$TaskCopyWithImpl<$Res, _$TaskImpl> - implements _$$TaskImplCopyWith<$Res> { - __$$TaskImplCopyWithImpl(_$TaskImpl _value, $Res Function(_$TaskImpl) _then) +class __$$RecoveryKeyImplCopyWithImpl<$Res> + extends _$RecoveryKeyCopyWithImpl<$Res, _$RecoveryKeyImpl> + implements _$$RecoveryKeyImplCopyWith<$Res> { + __$$RecoveryKeyImplCopyWithImpl( + _$RecoveryKeyImpl _value, $Res Function(_$RecoveryKeyImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? id = null, - Object? kind = null, - Object? summary = null, - Object? status = null, - Object? progress = null, + Object? liveLocation = freezed, + Object? backupLocation = freezed, }) { - return _then(_$TaskImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as String, - kind: null == kind - ? _value.kind - : kind // ignore: cast_nullable_to_non_nullable - as String, - summary: null == summary - ? _value.summary - : summary // ignore: cast_nullable_to_non_nullable - as String, - status: null == status - ? _value.status - : status // ignore: cast_nullable_to_non_nullable - as TaskStatus, - progress: null == progress - ? _value.progress - : progress // ignore: cast_nullable_to_non_nullable - as TaskProgress, + return _then(_$RecoveryKeyImpl( + liveLocation: freezed == liveLocation + ? _value.liveLocation + : liveLocation // ignore: cast_nullable_to_non_nullable + as String?, + backupLocation: freezed == backupLocation + ? _value.backupLocation + : backupLocation // ignore: cast_nullable_to_non_nullable + as String?, )); } } /// @nodoc @JsonSerializable() -class _$TaskImpl implements _Task { - const _$TaskImpl( - {required this.id, - required this.kind, - required this.summary, - required this.status, - required this.progress}); +class _$RecoveryKeyImpl implements _RecoveryKey { + const _$RecoveryKeyImpl({this.liveLocation, this.backupLocation}); - factory _$TaskImpl.fromJson(Map json) => - _$$TaskImplFromJson(json); + factory _$RecoveryKeyImpl.fromJson(Map json) => + _$$RecoveryKeyImplFromJson(json); @override - final String id; - @override - final String kind; - @override - final String summary; - @override - final TaskStatus status; + final String? liveLocation; @override - final TaskProgress progress; + final String? backupLocation; @override String toString() { - return 'Task(id: $id, kind: $kind, summary: $summary, status: $status, progress: $progress)'; + return 'RecoveryKey(liveLocation: $liveLocation, backupLocation: $backupLocation)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$TaskImpl && - (identical(other.id, id) || other.id == id) && - (identical(other.kind, kind) || other.kind == kind) && - (identical(other.summary, summary) || other.summary == summary) && - (identical(other.status, status) || other.status == status) && - (identical(other.progress, progress) || - other.progress == progress)); + other is _$RecoveryKeyImpl && + (identical(other.liveLocation, liveLocation) || + other.liveLocation == liveLocation) && + (identical(other.backupLocation, backupLocation) || + other.backupLocation == backupLocation)); } @JsonKey(ignore: true) @override - int get hashCode => - Object.hash(runtimeType, id, kind, summary, status, progress); + int get hashCode => Object.hash(runtimeType, liveLocation, backupLocation); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$TaskImplCopyWith<_$TaskImpl> get copyWith => - __$$TaskImplCopyWithImpl<_$TaskImpl>(this, _$identity); + _$$RecoveryKeyImplCopyWith<_$RecoveryKeyImpl> get copyWith => + __$$RecoveryKeyImplCopyWithImpl<_$RecoveryKeyImpl>(this, _$identity); @override Map toJson() { - return _$$TaskImplToJson( + return _$$RecoveryKeyImplToJson( this, ); } } -abstract class _Task implements Task { - const factory _Task( - {required final String id, - required final String kind, - required final String summary, - required final TaskStatus status, - required final TaskProgress progress}) = _$TaskImpl; +abstract class _RecoveryKey implements RecoveryKey { + const factory _RecoveryKey( + {final String? liveLocation, + final String? backupLocation}) = _$RecoveryKeyImpl; - factory _Task.fromJson(Map json) = _$TaskImpl.fromJson; + factory _RecoveryKey.fromJson(Map json) = + _$RecoveryKeyImpl.fromJson; @override - String get id; - @override - String get kind; - @override - String get summary; - @override - TaskStatus get status; + String? get liveLocation; @override - TaskProgress get progress; + String? get backupLocation; @override @JsonKey(ignore: true) - _$$TaskImplCopyWith<_$TaskImpl> get copyWith => + _$$RecoveryKeyImplCopyWith<_$RecoveryKeyImpl> get copyWith => throw _privateConstructorUsedError; } -Change _$ChangeFromJson(Map json) { - return _Change.fromJson(json); +GuidedChoiceV2 _$GuidedChoiceV2FromJson(Map json) { + return _GuidedChoiceV2.fromJson(json); } /// @nodoc -mixin _$Change { - String get id => throw _privateConstructorUsedError; - String get kind => throw _privateConstructorUsedError; - String get summary => throw _privateConstructorUsedError; - TaskStatus get status => throw _privateConstructorUsedError; - List get tasks => throw _privateConstructorUsedError; - bool get ready => throw _privateConstructorUsedError; - String? get err => throw _privateConstructorUsedError; - dynamic get data => throw _privateConstructorUsedError; +mixin _$GuidedChoiceV2 { + GuidedStorageTarget get target => throw _privateConstructorUsedError; + GuidedCapability get capability => throw _privateConstructorUsedError; + String? get password => throw _privateConstructorUsedError; + RecoveryKey? get recoveryKey => throw _privateConstructorUsedError; + SizingPolicy? get sizingPolicy => throw _privateConstructorUsedError; + bool get resetPartition => throw _privateConstructorUsedError; + int? get resetPartitionSize => throw _privateConstructorUsedError; Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $ChangeCopyWith get copyWith => throw _privateConstructorUsedError; + $GuidedChoiceV2CopyWith get copyWith => + throw _privateConstructorUsedError; } /// @nodoc -abstract class $ChangeCopyWith<$Res> { - factory $ChangeCopyWith(Change value, $Res Function(Change) then) = - _$ChangeCopyWithImpl<$Res, Change>; +abstract class $GuidedChoiceV2CopyWith<$Res> { + factory $GuidedChoiceV2CopyWith( + GuidedChoiceV2 value, $Res Function(GuidedChoiceV2) then) = + _$GuidedChoiceV2CopyWithImpl<$Res, GuidedChoiceV2>; @useResult $Res call( - {String id, - String kind, - String summary, - TaskStatus status, - List tasks, - bool ready, - String? err, - dynamic data}); + {GuidedStorageTarget target, + GuidedCapability capability, + String? password, + RecoveryKey? recoveryKey, + SizingPolicy? sizingPolicy, + bool resetPartition, + int? resetPartitionSize}); + + $GuidedStorageTargetCopyWith<$Res> get target; + $RecoveryKeyCopyWith<$Res>? get recoveryKey; } /// @nodoc -class _$ChangeCopyWithImpl<$Res, $Val extends Change> - implements $ChangeCopyWith<$Res> { - _$ChangeCopyWithImpl(this._value, this._then); +class _$GuidedChoiceV2CopyWithImpl<$Res, $Val extends GuidedChoiceV2> + implements $GuidedChoiceV2CopyWith<$Res> { + _$GuidedChoiceV2CopyWithImpl(this._value, this._then); // ignore: unused_field final $Val _value; @@ -13947,456 +13409,528 @@ class _$ChangeCopyWithImpl<$Res, $Val extends Change> @pragma('vm:prefer-inline') @override $Res call({ - Object? id = null, - Object? kind = null, - Object? summary = null, - Object? status = null, - Object? tasks = null, - Object? ready = null, - Object? err = freezed, - Object? data = freezed, + Object? target = null, + Object? capability = null, + Object? password = freezed, + Object? recoveryKey = freezed, + Object? sizingPolicy = freezed, + Object? resetPartition = null, + Object? resetPartitionSize = freezed, }) { return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as String, - kind: null == kind - ? _value.kind - : kind // ignore: cast_nullable_to_non_nullable - as String, - summary: null == summary - ? _value.summary - : summary // ignore: cast_nullable_to_non_nullable - as String, - status: null == status - ? _value.status - : status // ignore: cast_nullable_to_non_nullable - as TaskStatus, - tasks: null == tasks - ? _value.tasks - : tasks // ignore: cast_nullable_to_non_nullable - as List, - ready: null == ready - ? _value.ready - : ready // ignore: cast_nullable_to_non_nullable - as bool, - err: freezed == err - ? _value.err - : err // ignore: cast_nullable_to_non_nullable + target: null == target + ? _value.target + : target // ignore: cast_nullable_to_non_nullable + as GuidedStorageTarget, + capability: null == capability + ? _value.capability + : capability // ignore: cast_nullable_to_non_nullable + as GuidedCapability, + password: freezed == password + ? _value.password + : password // ignore: cast_nullable_to_non_nullable as String?, - data: freezed == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as dynamic, + recoveryKey: freezed == recoveryKey + ? _value.recoveryKey + : recoveryKey // ignore: cast_nullable_to_non_nullable + as RecoveryKey?, + sizingPolicy: freezed == sizingPolicy + ? _value.sizingPolicy + : sizingPolicy // ignore: cast_nullable_to_non_nullable + as SizingPolicy?, + resetPartition: null == resetPartition + ? _value.resetPartition + : resetPartition // ignore: cast_nullable_to_non_nullable + as bool, + resetPartitionSize: freezed == resetPartitionSize + ? _value.resetPartitionSize + : resetPartitionSize // ignore: cast_nullable_to_non_nullable + as int?, ) as $Val); } + + @override + @pragma('vm:prefer-inline') + $GuidedStorageTargetCopyWith<$Res> get target { + return $GuidedStorageTargetCopyWith<$Res>(_value.target, (value) { + return _then(_value.copyWith(target: value) as $Val); + }); + } + + @override + @pragma('vm:prefer-inline') + $RecoveryKeyCopyWith<$Res>? get recoveryKey { + if (_value.recoveryKey == null) { + return null; + } + + return $RecoveryKeyCopyWith<$Res>(_value.recoveryKey!, (value) { + return _then(_value.copyWith(recoveryKey: value) as $Val); + }); + } } /// @nodoc -abstract class _$$ChangeImplCopyWith<$Res> implements $ChangeCopyWith<$Res> { - factory _$$ChangeImplCopyWith( - _$ChangeImpl value, $Res Function(_$ChangeImpl) then) = - __$$ChangeImplCopyWithImpl<$Res>; +abstract class _$$GuidedChoiceV2ImplCopyWith<$Res> + implements $GuidedChoiceV2CopyWith<$Res> { + factory _$$GuidedChoiceV2ImplCopyWith(_$GuidedChoiceV2Impl value, + $Res Function(_$GuidedChoiceV2Impl) then) = + __$$GuidedChoiceV2ImplCopyWithImpl<$Res>; @override @useResult $Res call( - {String id, - String kind, - String summary, - TaskStatus status, - List tasks, - bool ready, - String? err, - dynamic data}); + {GuidedStorageTarget target, + GuidedCapability capability, + String? password, + RecoveryKey? recoveryKey, + SizingPolicy? sizingPolicy, + bool resetPartition, + int? resetPartitionSize}); + + @override + $GuidedStorageTargetCopyWith<$Res> get target; + @override + $RecoveryKeyCopyWith<$Res>? get recoveryKey; } /// @nodoc -class __$$ChangeImplCopyWithImpl<$Res> - extends _$ChangeCopyWithImpl<$Res, _$ChangeImpl> - implements _$$ChangeImplCopyWith<$Res> { - __$$ChangeImplCopyWithImpl( - _$ChangeImpl _value, $Res Function(_$ChangeImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? id = null, - Object? kind = null, - Object? summary = null, - Object? status = null, - Object? tasks = null, - Object? ready = null, - Object? err = freezed, - Object? data = freezed, - }) { - return _then(_$ChangeImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as String, - kind: null == kind - ? _value.kind - : kind // ignore: cast_nullable_to_non_nullable - as String, - summary: null == summary - ? _value.summary - : summary // ignore: cast_nullable_to_non_nullable - as String, - status: null == status - ? _value.status - : status // ignore: cast_nullable_to_non_nullable - as TaskStatus, - tasks: null == tasks - ? _value._tasks - : tasks // ignore: cast_nullable_to_non_nullable - as List, - ready: null == ready - ? _value.ready - : ready // ignore: cast_nullable_to_non_nullable - as bool, - err: freezed == err - ? _value.err - : err // ignore: cast_nullable_to_non_nullable +class __$$GuidedChoiceV2ImplCopyWithImpl<$Res> + extends _$GuidedChoiceV2CopyWithImpl<$Res, _$GuidedChoiceV2Impl> + implements _$$GuidedChoiceV2ImplCopyWith<$Res> { + __$$GuidedChoiceV2ImplCopyWithImpl( + _$GuidedChoiceV2Impl _value, $Res Function(_$GuidedChoiceV2Impl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? target = null, + Object? capability = null, + Object? password = freezed, + Object? recoveryKey = freezed, + Object? sizingPolicy = freezed, + Object? resetPartition = null, + Object? resetPartitionSize = freezed, + }) { + return _then(_$GuidedChoiceV2Impl( + target: null == target + ? _value.target + : target // ignore: cast_nullable_to_non_nullable + as GuidedStorageTarget, + capability: null == capability + ? _value.capability + : capability // ignore: cast_nullable_to_non_nullable + as GuidedCapability, + password: freezed == password + ? _value.password + : password // ignore: cast_nullable_to_non_nullable as String?, - data: freezed == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as dynamic, + recoveryKey: freezed == recoveryKey + ? _value.recoveryKey + : recoveryKey // ignore: cast_nullable_to_non_nullable + as RecoveryKey?, + sizingPolicy: freezed == sizingPolicy + ? _value.sizingPolicy + : sizingPolicy // ignore: cast_nullable_to_non_nullable + as SizingPolicy?, + resetPartition: null == resetPartition + ? _value.resetPartition + : resetPartition // ignore: cast_nullable_to_non_nullable + as bool, + resetPartitionSize: freezed == resetPartitionSize + ? _value.resetPartitionSize + : resetPartitionSize // ignore: cast_nullable_to_non_nullable + as int?, )); } } /// @nodoc @JsonSerializable() -class _$ChangeImpl implements _Change { - const _$ChangeImpl( - {required this.id, - required this.kind, - required this.summary, - required this.status, - required final List tasks, - required this.ready, - this.err, - this.data}) - : _tasks = tasks; +class _$GuidedChoiceV2Impl implements _GuidedChoiceV2 { + const _$GuidedChoiceV2Impl( + {required this.target, + required this.capability, + this.password, + this.recoveryKey, + required this.sizingPolicy, + this.resetPartition = false, + this.resetPartitionSize}); - factory _$ChangeImpl.fromJson(Map json) => - _$$ChangeImplFromJson(json); + factory _$GuidedChoiceV2Impl.fromJson(Map json) => + _$$GuidedChoiceV2ImplFromJson(json); @override - final String id; - @override - final String kind; + final GuidedStorageTarget target; @override - final String summary; + final GuidedCapability capability; @override - final TaskStatus status; - final List _tasks; + final String? password; @override - List get tasks { - if (_tasks is EqualUnmodifiableListView) return _tasks; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_tasks); - } - + final RecoveryKey? recoveryKey; @override - final bool ready; + final SizingPolicy? sizingPolicy; @override - final String? err; + @JsonKey() + final bool resetPartition; @override - final dynamic data; + final int? resetPartitionSize; @override String toString() { - return 'Change(id: $id, kind: $kind, summary: $summary, status: $status, tasks: $tasks, ready: $ready, err: $err, data: $data)'; + return 'GuidedChoiceV2(target: $target, capability: $capability, password: $password, recoveryKey: $recoveryKey, sizingPolicy: $sizingPolicy, resetPartition: $resetPartition, resetPartitionSize: $resetPartitionSize)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$ChangeImpl && - (identical(other.id, id) || other.id == id) && - (identical(other.kind, kind) || other.kind == kind) && - (identical(other.summary, summary) || other.summary == summary) && - (identical(other.status, status) || other.status == status) && - const DeepCollectionEquality().equals(other._tasks, _tasks) && - (identical(other.ready, ready) || other.ready == ready) && - (identical(other.err, err) || other.err == err) && - const DeepCollectionEquality().equals(other.data, data)); + other is _$GuidedChoiceV2Impl && + (identical(other.target, target) || other.target == target) && + (identical(other.capability, capability) || + other.capability == capability) && + (identical(other.password, password) || + other.password == password) && + (identical(other.recoveryKey, recoveryKey) || + other.recoveryKey == recoveryKey) && + (identical(other.sizingPolicy, sizingPolicy) || + other.sizingPolicy == sizingPolicy) && + (identical(other.resetPartition, resetPartition) || + other.resetPartition == resetPartition) && + (identical(other.resetPartitionSize, resetPartitionSize) || + other.resetPartitionSize == resetPartitionSize)); } @JsonKey(ignore: true) @override - int get hashCode => Object.hash( - runtimeType, - id, - kind, - summary, - status, - const DeepCollectionEquality().hash(_tasks), - ready, - err, - const DeepCollectionEquality().hash(data)); + int get hashCode => Object.hash(runtimeType, target, capability, password, + recoveryKey, sizingPolicy, resetPartition, resetPartitionSize); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$ChangeImplCopyWith<_$ChangeImpl> get copyWith => - __$$ChangeImplCopyWithImpl<_$ChangeImpl>(this, _$identity); + _$$GuidedChoiceV2ImplCopyWith<_$GuidedChoiceV2Impl> get copyWith => + __$$GuidedChoiceV2ImplCopyWithImpl<_$GuidedChoiceV2Impl>( + this, _$identity); @override Map toJson() { - return _$$ChangeImplToJson( + return _$$GuidedChoiceV2ImplToJson( this, ); } } -abstract class _Change implements Change { - const factory _Change( - {required final String id, - required final String kind, - required final String summary, - required final TaskStatus status, - required final List tasks, - required final bool ready, - final String? err, - final dynamic data}) = _$ChangeImpl; +abstract class _GuidedChoiceV2 implements GuidedChoiceV2 { + const factory _GuidedChoiceV2( + {required final GuidedStorageTarget target, + required final GuidedCapability capability, + final String? password, + final RecoveryKey? recoveryKey, + required final SizingPolicy? sizingPolicy, + final bool resetPartition, + final int? resetPartitionSize}) = _$GuidedChoiceV2Impl; - factory _Change.fromJson(Map json) = _$ChangeImpl.fromJson; + factory _GuidedChoiceV2.fromJson(Map json) = + _$GuidedChoiceV2Impl.fromJson; @override - String get id; - @override - String get kind; + GuidedStorageTarget get target; @override - String get summary; + GuidedCapability get capability; @override - TaskStatus get status; + String? get password; @override - List get tasks; + RecoveryKey? get recoveryKey; @override - bool get ready; + SizingPolicy? get sizingPolicy; @override - String? get err; + bool get resetPartition; @override - dynamic get data; + int? get resetPartitionSize; @override @JsonKey(ignore: true) - _$$ChangeImplCopyWith<_$ChangeImpl> get copyWith => + _$$GuidedChoiceV2ImplCopyWith<_$GuidedChoiceV2Impl> get copyWith => throw _privateConstructorUsedError; } -MirrorCheckResponse _$MirrorCheckResponseFromJson(Map json) { - return _MirrorCheckResponse.fromJson(json); +GuidedStorageResponseV2 _$GuidedStorageResponseV2FromJson( + Map json) { + return _GuidedStorageResponseV2.fromJson(json); } /// @nodoc -mixin _$MirrorCheckResponse { - String get url => throw _privateConstructorUsedError; - MirrorCheckStatus get status => throw _privateConstructorUsedError; - String get output => throw _privateConstructorUsedError; +mixin _$GuidedStorageResponseV2 { + ProbeStatus get status => throw _privateConstructorUsedError; + ErrorReportRef? get errorReport => throw _privateConstructorUsedError; + GuidedChoiceV2? get configured => throw _privateConstructorUsedError; + List get targets => throw _privateConstructorUsedError; Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $MirrorCheckResponseCopyWith get copyWith => + $GuidedStorageResponseV2CopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class $MirrorCheckResponseCopyWith<$Res> { - factory $MirrorCheckResponseCopyWith( - MirrorCheckResponse value, $Res Function(MirrorCheckResponse) then) = - _$MirrorCheckResponseCopyWithImpl<$Res, MirrorCheckResponse>; +abstract class $GuidedStorageResponseV2CopyWith<$Res> { + factory $GuidedStorageResponseV2CopyWith(GuidedStorageResponseV2 value, + $Res Function(GuidedStorageResponseV2) then) = + _$GuidedStorageResponseV2CopyWithImpl<$Res, GuidedStorageResponseV2>; @useResult - $Res call({String url, MirrorCheckStatus status, String output}); + $Res call( + {ProbeStatus status, + ErrorReportRef? errorReport, + GuidedChoiceV2? configured, + List targets}); + + $ErrorReportRefCopyWith<$Res>? get errorReport; + $GuidedChoiceV2CopyWith<$Res>? get configured; } /// @nodoc -class _$MirrorCheckResponseCopyWithImpl<$Res, $Val extends MirrorCheckResponse> - implements $MirrorCheckResponseCopyWith<$Res> { - _$MirrorCheckResponseCopyWithImpl(this._value, this._then); +class _$GuidedStorageResponseV2CopyWithImpl<$Res, + $Val extends GuidedStorageResponseV2> + implements $GuidedStorageResponseV2CopyWith<$Res> { + _$GuidedStorageResponseV2CopyWithImpl(this._value, this._then); // ignore: unused_field final $Val _value; // ignore: unused_field final $Res Function($Val) _then; - @pragma('vm:prefer-inline') + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? status = null, + Object? errorReport = freezed, + Object? configured = freezed, + Object? targets = null, + }) { + return _then(_value.copyWith( + status: null == status + ? _value.status + : status // ignore: cast_nullable_to_non_nullable + as ProbeStatus, + errorReport: freezed == errorReport + ? _value.errorReport + : errorReport // ignore: cast_nullable_to_non_nullable + as ErrorReportRef?, + configured: freezed == configured + ? _value.configured + : configured // ignore: cast_nullable_to_non_nullable + as GuidedChoiceV2?, + targets: null == targets + ? _value.targets + : targets // ignore: cast_nullable_to_non_nullable + as List, + ) as $Val); + } + + @override + @pragma('vm:prefer-inline') + $ErrorReportRefCopyWith<$Res>? get errorReport { + if (_value.errorReport == null) { + return null; + } + + return $ErrorReportRefCopyWith<$Res>(_value.errorReport!, (value) { + return _then(_value.copyWith(errorReport: value) as $Val); + }); + } + @override - $Res call({ - Object? url = null, - Object? status = null, - Object? output = null, - }) { - return _then(_value.copyWith( - url: null == url - ? _value.url - : url // ignore: cast_nullable_to_non_nullable - as String, - status: null == status - ? _value.status - : status // ignore: cast_nullable_to_non_nullable - as MirrorCheckStatus, - output: null == output - ? _value.output - : output // ignore: cast_nullable_to_non_nullable - as String, - ) as $Val); + @pragma('vm:prefer-inline') + $GuidedChoiceV2CopyWith<$Res>? get configured { + if (_value.configured == null) { + return null; + } + + return $GuidedChoiceV2CopyWith<$Res>(_value.configured!, (value) { + return _then(_value.copyWith(configured: value) as $Val); + }); } } /// @nodoc -abstract class _$$MirrorCheckResponseImplCopyWith<$Res> - implements $MirrorCheckResponseCopyWith<$Res> { - factory _$$MirrorCheckResponseImplCopyWith(_$MirrorCheckResponseImpl value, - $Res Function(_$MirrorCheckResponseImpl) then) = - __$$MirrorCheckResponseImplCopyWithImpl<$Res>; +abstract class _$$GuidedStorageResponseV2ImplCopyWith<$Res> + implements $GuidedStorageResponseV2CopyWith<$Res> { + factory _$$GuidedStorageResponseV2ImplCopyWith( + _$GuidedStorageResponseV2Impl value, + $Res Function(_$GuidedStorageResponseV2Impl) then) = + __$$GuidedStorageResponseV2ImplCopyWithImpl<$Res>; @override @useResult - $Res call({String url, MirrorCheckStatus status, String output}); + $Res call( + {ProbeStatus status, + ErrorReportRef? errorReport, + GuidedChoiceV2? configured, + List targets}); + + @override + $ErrorReportRefCopyWith<$Res>? get errorReport; + @override + $GuidedChoiceV2CopyWith<$Res>? get configured; } /// @nodoc -class __$$MirrorCheckResponseImplCopyWithImpl<$Res> - extends _$MirrorCheckResponseCopyWithImpl<$Res, _$MirrorCheckResponseImpl> - implements _$$MirrorCheckResponseImplCopyWith<$Res> { - __$$MirrorCheckResponseImplCopyWithImpl(_$MirrorCheckResponseImpl _value, - $Res Function(_$MirrorCheckResponseImpl) _then) +class __$$GuidedStorageResponseV2ImplCopyWithImpl<$Res> + extends _$GuidedStorageResponseV2CopyWithImpl<$Res, + _$GuidedStorageResponseV2Impl> + implements _$$GuidedStorageResponseV2ImplCopyWith<$Res> { + __$$GuidedStorageResponseV2ImplCopyWithImpl( + _$GuidedStorageResponseV2Impl _value, + $Res Function(_$GuidedStorageResponseV2Impl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? url = null, Object? status = null, - Object? output = null, + Object? errorReport = freezed, + Object? configured = freezed, + Object? targets = null, }) { - return _then(_$MirrorCheckResponseImpl( - url: null == url - ? _value.url - : url // ignore: cast_nullable_to_non_nullable - as String, + return _then(_$GuidedStorageResponseV2Impl( status: null == status ? _value.status : status // ignore: cast_nullable_to_non_nullable - as MirrorCheckStatus, - output: null == output - ? _value.output - : output // ignore: cast_nullable_to_non_nullable - as String, + as ProbeStatus, + errorReport: freezed == errorReport + ? _value.errorReport + : errorReport // ignore: cast_nullable_to_non_nullable + as ErrorReportRef?, + configured: freezed == configured + ? _value.configured + : configured // ignore: cast_nullable_to_non_nullable + as GuidedChoiceV2?, + targets: null == targets + ? _value._targets + : targets // ignore: cast_nullable_to_non_nullable + as List, )); } } /// @nodoc @JsonSerializable() -class _$MirrorCheckResponseImpl implements _MirrorCheckResponse { - const _$MirrorCheckResponseImpl( - {required this.url, required this.status, required this.output}); +class _$GuidedStorageResponseV2Impl implements _GuidedStorageResponseV2 { + const _$GuidedStorageResponseV2Impl( + {required this.status, + this.errorReport, + this.configured, + final List targets = const []}) + : _targets = targets; - factory _$MirrorCheckResponseImpl.fromJson(Map json) => - _$$MirrorCheckResponseImplFromJson(json); + factory _$GuidedStorageResponseV2Impl.fromJson(Map json) => + _$$GuidedStorageResponseV2ImplFromJson(json); @override - final String url; + final ProbeStatus status; @override - final MirrorCheckStatus status; + final ErrorReportRef? errorReport; @override - final String output; + final GuidedChoiceV2? configured; + final List _targets; + @override + @JsonKey() + List get targets { + if (_targets is EqualUnmodifiableListView) return _targets; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_targets); + } @override String toString() { - return 'MirrorCheckResponse(url: $url, status: $status, output: $output)'; + return 'GuidedStorageResponseV2(status: $status, errorReport: $errorReport, configured: $configured, targets: $targets)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$MirrorCheckResponseImpl && - (identical(other.url, url) || other.url == url) && + other is _$GuidedStorageResponseV2Impl && (identical(other.status, status) || other.status == status) && - (identical(other.output, output) || other.output == output)); + (identical(other.errorReport, errorReport) || + other.errorReport == errorReport) && + (identical(other.configured, configured) || + other.configured == configured) && + const DeepCollectionEquality().equals(other._targets, _targets)); } @JsonKey(ignore: true) @override - int get hashCode => Object.hash(runtimeType, url, status, output); + int get hashCode => Object.hash(runtimeType, status, errorReport, configured, + const DeepCollectionEquality().hash(_targets)); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$MirrorCheckResponseImplCopyWith<_$MirrorCheckResponseImpl> get copyWith => - __$$MirrorCheckResponseImplCopyWithImpl<_$MirrorCheckResponseImpl>( - this, _$identity); + _$$GuidedStorageResponseV2ImplCopyWith<_$GuidedStorageResponseV2Impl> + get copyWith => __$$GuidedStorageResponseV2ImplCopyWithImpl< + _$GuidedStorageResponseV2Impl>(this, _$identity); @override Map toJson() { - return _$$MirrorCheckResponseImplToJson( + return _$$GuidedStorageResponseV2ImplToJson( this, ); } } -abstract class _MirrorCheckResponse implements MirrorCheckResponse { - const factory _MirrorCheckResponse( - {required final String url, - required final MirrorCheckStatus status, - required final String output}) = _$MirrorCheckResponseImpl; +abstract class _GuidedStorageResponseV2 implements GuidedStorageResponseV2 { + const factory _GuidedStorageResponseV2( + {required final ProbeStatus status, + final ErrorReportRef? errorReport, + final GuidedChoiceV2? configured, + final List targets}) = _$GuidedStorageResponseV2Impl; - factory _MirrorCheckResponse.fromJson(Map json) = - _$MirrorCheckResponseImpl.fromJson; + factory _GuidedStorageResponseV2.fromJson(Map json) = + _$GuidedStorageResponseV2Impl.fromJson; @override - String get url; + ProbeStatus get status; @override - MirrorCheckStatus get status; + ErrorReportRef? get errorReport; @override - String get output; + GuidedChoiceV2? get configured; + @override + List get targets; @override @JsonKey(ignore: true) - _$$MirrorCheckResponseImplCopyWith<_$MirrorCheckResponseImpl> get copyWith => - throw _privateConstructorUsedError; + _$$GuidedStorageResponseV2ImplCopyWith<_$GuidedStorageResponseV2Impl> + get copyWith => throw _privateConstructorUsedError; } -MirrorPost _$MirrorPostFromJson(Map json) { - return _MirrorPost.fromJson(json); +AddPartitionV2 _$AddPartitionV2FromJson(Map json) { + return _AddPartitionV2.fromJson(json); } /// @nodoc -mixin _$MirrorPost { - String? get elected => throw _privateConstructorUsedError; - List? get candidates => throw _privateConstructorUsedError; - String? get staged => throw _privateConstructorUsedError; - bool? get useDuringInstallation => throw _privateConstructorUsedError; +mixin _$AddPartitionV2 { + String get diskId => throw _privateConstructorUsedError; + Partition get partition => throw _privateConstructorUsedError; + Gap get gap => throw _privateConstructorUsedError; Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $MirrorPostCopyWith get copyWith => + $AddPartitionV2CopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class $MirrorPostCopyWith<$Res> { - factory $MirrorPostCopyWith( - MirrorPost value, $Res Function(MirrorPost) then) = - _$MirrorPostCopyWithImpl<$Res, MirrorPost>; +abstract class $AddPartitionV2CopyWith<$Res> { + factory $AddPartitionV2CopyWith( + AddPartitionV2 value, $Res Function(AddPartitionV2) then) = + _$AddPartitionV2CopyWithImpl<$Res, AddPartitionV2>; @useResult - $Res call( - {String? elected, - List? candidates, - String? staged, - bool? useDuringInstallation}); + $Res call({String diskId, Partition partition, Gap gap}); } /// @nodoc -class _$MirrorPostCopyWithImpl<$Res, $Val extends MirrorPost> - implements $MirrorPostCopyWith<$Res> { - _$MirrorPostCopyWithImpl(this._value, this._then); +class _$AddPartitionV2CopyWithImpl<$Res, $Val extends AddPartitionV2> + implements $AddPartitionV2CopyWith<$Res> { + _$AddPartitionV2CopyWithImpl(this._value, this._then); // ignore: unused_field final $Val _value; @@ -14406,214 +13940,173 @@ class _$MirrorPostCopyWithImpl<$Res, $Val extends MirrorPost> @pragma('vm:prefer-inline') @override $Res call({ - Object? elected = freezed, - Object? candidates = freezed, - Object? staged = freezed, - Object? useDuringInstallation = freezed, + Object? diskId = null, + Object? partition = freezed, + Object? gap = freezed, }) { return _then(_value.copyWith( - elected: freezed == elected - ? _value.elected - : elected // ignore: cast_nullable_to_non_nullable - as String?, - candidates: freezed == candidates - ? _value.candidates - : candidates // ignore: cast_nullable_to_non_nullable - as List?, - staged: freezed == staged - ? _value.staged - : staged // ignore: cast_nullable_to_non_nullable - as String?, - useDuringInstallation: freezed == useDuringInstallation - ? _value.useDuringInstallation - : useDuringInstallation // ignore: cast_nullable_to_non_nullable - as bool?, + diskId: null == diskId + ? _value.diskId + : diskId // ignore: cast_nullable_to_non_nullable + as String, + partition: freezed == partition + ? _value.partition + : partition // ignore: cast_nullable_to_non_nullable + as Partition, + gap: freezed == gap + ? _value.gap + : gap // ignore: cast_nullable_to_non_nullable + as Gap, ) as $Val); } } /// @nodoc -abstract class _$$MirrorPostImplCopyWith<$Res> - implements $MirrorPostCopyWith<$Res> { - factory _$$MirrorPostImplCopyWith( - _$MirrorPostImpl value, $Res Function(_$MirrorPostImpl) then) = - __$$MirrorPostImplCopyWithImpl<$Res>; +abstract class _$$AddPartitionV2ImplCopyWith<$Res> + implements $AddPartitionV2CopyWith<$Res> { + factory _$$AddPartitionV2ImplCopyWith(_$AddPartitionV2Impl value, + $Res Function(_$AddPartitionV2Impl) then) = + __$$AddPartitionV2ImplCopyWithImpl<$Res>; @override - @useResult - $Res call( - {String? elected, - List? candidates, - String? staged, - bool? useDuringInstallation}); + @useResult + $Res call({String diskId, Partition partition, Gap gap}); } /// @nodoc -class __$$MirrorPostImplCopyWithImpl<$Res> - extends _$MirrorPostCopyWithImpl<$Res, _$MirrorPostImpl> - implements _$$MirrorPostImplCopyWith<$Res> { - __$$MirrorPostImplCopyWithImpl( - _$MirrorPostImpl _value, $Res Function(_$MirrorPostImpl) _then) +class __$$AddPartitionV2ImplCopyWithImpl<$Res> + extends _$AddPartitionV2CopyWithImpl<$Res, _$AddPartitionV2Impl> + implements _$$AddPartitionV2ImplCopyWith<$Res> { + __$$AddPartitionV2ImplCopyWithImpl( + _$AddPartitionV2Impl _value, $Res Function(_$AddPartitionV2Impl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? elected = freezed, - Object? candidates = freezed, - Object? staged = freezed, - Object? useDuringInstallation = freezed, + Object? diskId = null, + Object? partition = freezed, + Object? gap = freezed, }) { - return _then(_$MirrorPostImpl( - elected: freezed == elected - ? _value.elected - : elected // ignore: cast_nullable_to_non_nullable - as String?, - candidates: freezed == candidates - ? _value._candidates - : candidates // ignore: cast_nullable_to_non_nullable - as List?, - staged: freezed == staged - ? _value.staged - : staged // ignore: cast_nullable_to_non_nullable - as String?, - useDuringInstallation: freezed == useDuringInstallation - ? _value.useDuringInstallation - : useDuringInstallation // ignore: cast_nullable_to_non_nullable - as bool?, + return _then(_$AddPartitionV2Impl( + diskId: null == diskId + ? _value.diskId + : diskId // ignore: cast_nullable_to_non_nullable + as String, + partition: freezed == partition + ? _value.partition + : partition // ignore: cast_nullable_to_non_nullable + as Partition, + gap: freezed == gap + ? _value.gap + : gap // ignore: cast_nullable_to_non_nullable + as Gap, )); } } /// @nodoc @JsonSerializable() -class _$MirrorPostImpl implements _MirrorPost { - const _$MirrorPostImpl( - {this.elected, - final List? candidates, - this.staged, - this.useDuringInstallation}) - : _candidates = candidates; +class _$AddPartitionV2Impl implements _AddPartitionV2 { + const _$AddPartitionV2Impl( + {required this.diskId, required this.partition, required this.gap}); - factory _$MirrorPostImpl.fromJson(Map json) => - _$$MirrorPostImplFromJson(json); + factory _$AddPartitionV2Impl.fromJson(Map json) => + _$$AddPartitionV2ImplFromJson(json); @override - final String? elected; - final List? _candidates; - @override - List? get candidates { - final value = _candidates; - if (value == null) return null; - if (_candidates is EqualUnmodifiableListView) return _candidates; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(value); - } - + final String diskId; @override - final String? staged; + final Partition partition; @override - final bool? useDuringInstallation; + final Gap gap; @override String toString() { - return 'MirrorPost(elected: $elected, candidates: $candidates, staged: $staged, useDuringInstallation: $useDuringInstallation)'; + return 'AddPartitionV2(diskId: $diskId, partition: $partition, gap: $gap)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$MirrorPostImpl && - (identical(other.elected, elected) || other.elected == elected) && - const DeepCollectionEquality() - .equals(other._candidates, _candidates) && - (identical(other.staged, staged) || other.staged == staged) && - (identical(other.useDuringInstallation, useDuringInstallation) || - other.useDuringInstallation == useDuringInstallation)); + other is _$AddPartitionV2Impl && + (identical(other.diskId, diskId) || other.diskId == diskId) && + const DeepCollectionEquality().equals(other.partition, partition) && + const DeepCollectionEquality().equals(other.gap, gap)); } @JsonKey(ignore: true) @override int get hashCode => Object.hash( runtimeType, - elected, - const DeepCollectionEquality().hash(_candidates), - staged, - useDuringInstallation); + diskId, + const DeepCollectionEquality().hash(partition), + const DeepCollectionEquality().hash(gap)); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$MirrorPostImplCopyWith<_$MirrorPostImpl> get copyWith => - __$$MirrorPostImplCopyWithImpl<_$MirrorPostImpl>(this, _$identity); + _$$AddPartitionV2ImplCopyWith<_$AddPartitionV2Impl> get copyWith => + __$$AddPartitionV2ImplCopyWithImpl<_$AddPartitionV2Impl>( + this, _$identity); @override Map toJson() { - return _$$MirrorPostImplToJson( + return _$$AddPartitionV2ImplToJson( this, ); } } -abstract class _MirrorPost implements MirrorPost { - const factory _MirrorPost( - {final String? elected, - final List? candidates, - final String? staged, - final bool? useDuringInstallation}) = _$MirrorPostImpl; +abstract class _AddPartitionV2 implements AddPartitionV2 { + const factory _AddPartitionV2( + {required final String diskId, + required final Partition partition, + required final Gap gap}) = _$AddPartitionV2Impl; - factory _MirrorPost.fromJson(Map json) = - _$MirrorPostImpl.fromJson; + factory _AddPartitionV2.fromJson(Map json) = + _$AddPartitionV2Impl.fromJson; @override - String? get elected; - @override - List? get candidates; + String get diskId; @override - String? get staged; + Partition get partition; @override - bool? get useDuringInstallation; + Gap get gap; @override @JsonKey(ignore: true) - _$$MirrorPostImplCopyWith<_$MirrorPostImpl> get copyWith => + _$$AddPartitionV2ImplCopyWith<_$AddPartitionV2Impl> get copyWith => throw _privateConstructorUsedError; } -MirrorGet _$MirrorGetFromJson(Map json) { - return _MirrorGet.fromJson(json); +ModifyPartitionV2 _$ModifyPartitionV2FromJson(Map json) { + return _ModifyPartitionV2.fromJson(json); } /// @nodoc -mixin _$MirrorGet { - bool get relevant => throw _privateConstructorUsedError; - String? get elected => throw _privateConstructorUsedError; - List get candidates => throw _privateConstructorUsedError; - String? get staged => throw _privateConstructorUsedError; - bool get useDuringInstallation => throw _privateConstructorUsedError; +mixin _$ModifyPartitionV2 { + String get diskId => throw _privateConstructorUsedError; + Partition get partition => throw _privateConstructorUsedError; Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $MirrorGetCopyWith get copyWith => + $ModifyPartitionV2CopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class $MirrorGetCopyWith<$Res> { - factory $MirrorGetCopyWith(MirrorGet value, $Res Function(MirrorGet) then) = - _$MirrorGetCopyWithImpl<$Res, MirrorGet>; +abstract class $ModifyPartitionV2CopyWith<$Res> { + factory $ModifyPartitionV2CopyWith( + ModifyPartitionV2 value, $Res Function(ModifyPartitionV2) then) = + _$ModifyPartitionV2CopyWithImpl<$Res, ModifyPartitionV2>; @useResult - $Res call( - {bool relevant, - String? elected, - List candidates, - String? staged, - bool useDuringInstallation}); + $Res call({String diskId, Partition partition}); } /// @nodoc -class _$MirrorGetCopyWithImpl<$Res, $Val extends MirrorGet> - implements $MirrorGetCopyWith<$Res> { - _$MirrorGetCopyWithImpl(this._value, this._then); +class _$ModifyPartitionV2CopyWithImpl<$Res, $Val extends ModifyPartitionV2> + implements $ModifyPartitionV2CopyWith<$Res> { + _$ModifyPartitionV2CopyWithImpl(this._value, this._then); // ignore: unused_field final $Val _value; @@ -14623,226 +14116,154 @@ class _$MirrorGetCopyWithImpl<$Res, $Val extends MirrorGet> @pragma('vm:prefer-inline') @override $Res call({ - Object? relevant = null, - Object? elected = freezed, - Object? candidates = null, - Object? staged = freezed, - Object? useDuringInstallation = null, + Object? diskId = null, + Object? partition = freezed, }) { return _then(_value.copyWith( - relevant: null == relevant - ? _value.relevant - : relevant // ignore: cast_nullable_to_non_nullable - as bool, - elected: freezed == elected - ? _value.elected - : elected // ignore: cast_nullable_to_non_nullable - as String?, - candidates: null == candidates - ? _value.candidates - : candidates // ignore: cast_nullable_to_non_nullable - as List, - staged: freezed == staged - ? _value.staged - : staged // ignore: cast_nullable_to_non_nullable - as String?, - useDuringInstallation: null == useDuringInstallation - ? _value.useDuringInstallation - : useDuringInstallation // ignore: cast_nullable_to_non_nullable - as bool, + diskId: null == diskId + ? _value.diskId + : diskId // ignore: cast_nullable_to_non_nullable + as String, + partition: freezed == partition + ? _value.partition + : partition // ignore: cast_nullable_to_non_nullable + as Partition, ) as $Val); } } /// @nodoc -abstract class _$$MirrorGetImplCopyWith<$Res> - implements $MirrorGetCopyWith<$Res> { - factory _$$MirrorGetImplCopyWith( - _$MirrorGetImpl value, $Res Function(_$MirrorGetImpl) then) = - __$$MirrorGetImplCopyWithImpl<$Res>; +abstract class _$$ModifyPartitionV2ImplCopyWith<$Res> + implements $ModifyPartitionV2CopyWith<$Res> { + factory _$$ModifyPartitionV2ImplCopyWith(_$ModifyPartitionV2Impl value, + $Res Function(_$ModifyPartitionV2Impl) then) = + __$$ModifyPartitionV2ImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {bool relevant, - String? elected, - List candidates, - String? staged, - bool useDuringInstallation}); + $Res call({String diskId, Partition partition}); } /// @nodoc -class __$$MirrorGetImplCopyWithImpl<$Res> - extends _$MirrorGetCopyWithImpl<$Res, _$MirrorGetImpl> - implements _$$MirrorGetImplCopyWith<$Res> { - __$$MirrorGetImplCopyWithImpl( - _$MirrorGetImpl _value, $Res Function(_$MirrorGetImpl) _then) +class __$$ModifyPartitionV2ImplCopyWithImpl<$Res> + extends _$ModifyPartitionV2CopyWithImpl<$Res, _$ModifyPartitionV2Impl> + implements _$$ModifyPartitionV2ImplCopyWith<$Res> { + __$$ModifyPartitionV2ImplCopyWithImpl(_$ModifyPartitionV2Impl _value, + $Res Function(_$ModifyPartitionV2Impl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? relevant = null, - Object? elected = freezed, - Object? candidates = null, - Object? staged = freezed, - Object? useDuringInstallation = null, - }) { - return _then(_$MirrorGetImpl( - relevant: null == relevant - ? _value.relevant - : relevant // ignore: cast_nullable_to_non_nullable - as bool, - elected: freezed == elected - ? _value.elected - : elected // ignore: cast_nullable_to_non_nullable - as String?, - candidates: null == candidates - ? _value._candidates - : candidates // ignore: cast_nullable_to_non_nullable - as List, - staged: freezed == staged - ? _value.staged - : staged // ignore: cast_nullable_to_non_nullable - as String?, - useDuringInstallation: null == useDuringInstallation - ? _value.useDuringInstallation - : useDuringInstallation // ignore: cast_nullable_to_non_nullable - as bool, + Object? diskId = null, + Object? partition = freezed, + }) { + return _then(_$ModifyPartitionV2Impl( + diskId: null == diskId + ? _value.diskId + : diskId // ignore: cast_nullable_to_non_nullable + as String, + partition: freezed == partition + ? _value.partition + : partition // ignore: cast_nullable_to_non_nullable + as Partition, )); } } /// @nodoc @JsonSerializable() -class _$MirrorGetImpl implements _MirrorGet { - const _$MirrorGetImpl( - {required this.relevant, - required this.elected, - required final List candidates, - required this.staged, - required this.useDuringInstallation}) - : _candidates = candidates; - - factory _$MirrorGetImpl.fromJson(Map json) => - _$$MirrorGetImplFromJson(json); +class _$ModifyPartitionV2Impl implements _ModifyPartitionV2 { + const _$ModifyPartitionV2Impl( + {required this.diskId, required this.partition}); - @override - final bool relevant; - @override - final String? elected; - final List _candidates; - @override - List get candidates { - if (_candidates is EqualUnmodifiableListView) return _candidates; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_candidates); - } + factory _$ModifyPartitionV2Impl.fromJson(Map json) => + _$$ModifyPartitionV2ImplFromJson(json); @override - final String? staged; + final String diskId; @override - final bool useDuringInstallation; + final Partition partition; @override String toString() { - return 'MirrorGet(relevant: $relevant, elected: $elected, candidates: $candidates, staged: $staged, useDuringInstallation: $useDuringInstallation)'; + return 'ModifyPartitionV2(diskId: $diskId, partition: $partition)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$MirrorGetImpl && - (identical(other.relevant, relevant) || - other.relevant == relevant) && - (identical(other.elected, elected) || other.elected == elected) && - const DeepCollectionEquality() - .equals(other._candidates, _candidates) && - (identical(other.staged, staged) || other.staged == staged) && - (identical(other.useDuringInstallation, useDuringInstallation) || - other.useDuringInstallation == useDuringInstallation)); + other is _$ModifyPartitionV2Impl && + (identical(other.diskId, diskId) || other.diskId == diskId) && + const DeepCollectionEquality().equals(other.partition, partition)); } @JsonKey(ignore: true) @override int get hashCode => Object.hash( - runtimeType, - relevant, - elected, - const DeepCollectionEquality().hash(_candidates), - staged, - useDuringInstallation); + runtimeType, diskId, const DeepCollectionEquality().hash(partition)); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$MirrorGetImplCopyWith<_$MirrorGetImpl> get copyWith => - __$$MirrorGetImplCopyWithImpl<_$MirrorGetImpl>(this, _$identity); + _$$ModifyPartitionV2ImplCopyWith<_$ModifyPartitionV2Impl> get copyWith => + __$$ModifyPartitionV2ImplCopyWithImpl<_$ModifyPartitionV2Impl>( + this, _$identity); @override Map toJson() { - return _$$MirrorGetImplToJson( + return _$$ModifyPartitionV2ImplToJson( this, ); } } -abstract class _MirrorGet implements MirrorGet { - const factory _MirrorGet( - {required final bool relevant, - required final String? elected, - required final List candidates, - required final String? staged, - required final bool useDuringInstallation}) = _$MirrorGetImpl; +abstract class _ModifyPartitionV2 implements ModifyPartitionV2 { + const factory _ModifyPartitionV2( + {required final String diskId, + required final Partition partition}) = _$ModifyPartitionV2Impl; - factory _MirrorGet.fromJson(Map json) = - _$MirrorGetImpl.fromJson; + factory _ModifyPartitionV2.fromJson(Map json) = + _$ModifyPartitionV2Impl.fromJson; @override - bool get relevant; - @override - String? get elected; - @override - List get candidates; - @override - String? get staged; + String get diskId; @override - bool get useDuringInstallation; + Partition get partition; @override @JsonKey(ignore: true) - _$$MirrorGetImplCopyWith<_$MirrorGetImpl> get copyWith => + _$$ModifyPartitionV2ImplCopyWith<_$ModifyPartitionV2Impl> get copyWith => throw _privateConstructorUsedError; } -AdConnectionInfo _$AdConnectionInfoFromJson(Map json) { - return _AdConnectionInfo.fromJson(json); +ReformatDisk _$ReformatDiskFromJson(Map json) { + return _ReformatDisk.fromJson(json); } /// @nodoc -mixin _$AdConnectionInfo { - String get adminName => throw _privateConstructorUsedError; - String get domainName => throw _privateConstructorUsedError; - String get password => throw _privateConstructorUsedError; +mixin _$ReformatDisk { + String get diskId => throw _privateConstructorUsedError; + String? get ptable => throw _privateConstructorUsedError; Map toJson() => throw _privateConstructorUsedError; @JsonKey(ignore: true) - $AdConnectionInfoCopyWith get copyWith => + $ReformatDiskCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class $AdConnectionInfoCopyWith<$Res> { - factory $AdConnectionInfoCopyWith( - AdConnectionInfo value, $Res Function(AdConnectionInfo) then) = - _$AdConnectionInfoCopyWithImpl<$Res, AdConnectionInfo>; +abstract class $ReformatDiskCopyWith<$Res> { + factory $ReformatDiskCopyWith( + ReformatDisk value, $Res Function(ReformatDisk) then) = + _$ReformatDiskCopyWithImpl<$Res, ReformatDisk>; @useResult - $Res call({String adminName, String domainName, String password}); + $Res call({String diskId, String? ptable}); } /// @nodoc -class _$AdConnectionInfoCopyWithImpl<$Res, $Val extends AdConnectionInfo> - implements $AdConnectionInfoCopyWith<$Res> { - _$AdConnectionInfoCopyWithImpl(this._value, this._then); +class _$ReformatDiskCopyWithImpl<$Res, $Val extends ReformatDisk> + implements $ReformatDiskCopyWith<$Res> { + _$ReformatDiskCopyWithImpl(this._value, this._then); // ignore: unused_field final $Val _value; @@ -14852,143 +14273,119 @@ class _$AdConnectionInfoCopyWithImpl<$Res, $Val extends AdConnectionInfo> @pragma('vm:prefer-inline') @override $Res call({ - Object? adminName = null, - Object? domainName = null, - Object? password = null, + Object? diskId = null, + Object? ptable = freezed, }) { return _then(_value.copyWith( - adminName: null == adminName - ? _value.adminName - : adminName // ignore: cast_nullable_to_non_nullable - as String, - domainName: null == domainName - ? _value.domainName - : domainName // ignore: cast_nullable_to_non_nullable - as String, - password: null == password - ? _value.password - : password // ignore: cast_nullable_to_non_nullable + diskId: null == diskId + ? _value.diskId + : diskId // ignore: cast_nullable_to_non_nullable as String, + ptable: freezed == ptable + ? _value.ptable + : ptable // ignore: cast_nullable_to_non_nullable + as String?, ) as $Val); } } /// @nodoc -abstract class _$$AdConnectionInfoImplCopyWith<$Res> - implements $AdConnectionInfoCopyWith<$Res> { - factory _$$AdConnectionInfoImplCopyWith(_$AdConnectionInfoImpl value, - $Res Function(_$AdConnectionInfoImpl) then) = - __$$AdConnectionInfoImplCopyWithImpl<$Res>; +abstract class _$$ReformatDiskImplCopyWith<$Res> + implements $ReformatDiskCopyWith<$Res> { + factory _$$ReformatDiskImplCopyWith( + _$ReformatDiskImpl value, $Res Function(_$ReformatDiskImpl) then) = + __$$ReformatDiskImplCopyWithImpl<$Res>; @override @useResult - $Res call({String adminName, String domainName, String password}); + $Res call({String diskId, String? ptable}); } /// @nodoc -class __$$AdConnectionInfoImplCopyWithImpl<$Res> - extends _$AdConnectionInfoCopyWithImpl<$Res, _$AdConnectionInfoImpl> - implements _$$AdConnectionInfoImplCopyWith<$Res> { - __$$AdConnectionInfoImplCopyWithImpl(_$AdConnectionInfoImpl _value, - $Res Function(_$AdConnectionInfoImpl) _then) +class __$$ReformatDiskImplCopyWithImpl<$Res> + extends _$ReformatDiskCopyWithImpl<$Res, _$ReformatDiskImpl> + implements _$$ReformatDiskImplCopyWith<$Res> { + __$$ReformatDiskImplCopyWithImpl( + _$ReformatDiskImpl _value, $Res Function(_$ReformatDiskImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @override $Res call({ - Object? adminName = null, - Object? domainName = null, - Object? password = null, + Object? diskId = null, + Object? ptable = freezed, }) { - return _then(_$AdConnectionInfoImpl( - adminName: null == adminName - ? _value.adminName - : adminName // ignore: cast_nullable_to_non_nullable - as String, - domainName: null == domainName - ? _value.domainName - : domainName // ignore: cast_nullable_to_non_nullable - as String, - password: null == password - ? _value.password - : password // ignore: cast_nullable_to_non_nullable + return _then(_$ReformatDiskImpl( + diskId: null == diskId + ? _value.diskId + : diskId // ignore: cast_nullable_to_non_nullable as String, + ptable: freezed == ptable + ? _value.ptable + : ptable // ignore: cast_nullable_to_non_nullable + as String?, )); } } /// @nodoc @JsonSerializable() -class _$AdConnectionInfoImpl implements _AdConnectionInfo { - const _$AdConnectionInfoImpl( - {this.adminName = '', this.domainName = '', this.password = ''}); +class _$ReformatDiskImpl implements _ReformatDisk { + const _$ReformatDiskImpl({required this.diskId, this.ptable}); - factory _$AdConnectionInfoImpl.fromJson(Map json) => - _$$AdConnectionInfoImplFromJson(json); + factory _$ReformatDiskImpl.fromJson(Map json) => + _$$ReformatDiskImplFromJson(json); @override - @JsonKey() - final String adminName; - @override - @JsonKey() - final String domainName; + final String diskId; @override - @JsonKey() - final String password; + final String? ptable; @override String toString() { - return 'AdConnectionInfo(adminName: $adminName, domainName: $domainName, password: $password)'; + return 'ReformatDisk(diskId: $diskId, ptable: $ptable)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$AdConnectionInfoImpl && - (identical(other.adminName, adminName) || - other.adminName == adminName) && - (identical(other.domainName, domainName) || - other.domainName == domainName) && - (identical(other.password, password) || - other.password == password)); + other is _$ReformatDiskImpl && + (identical(other.diskId, diskId) || other.diskId == diskId) && + (identical(other.ptable, ptable) || other.ptable == ptable)); } @JsonKey(ignore: true) @override - int get hashCode => Object.hash(runtimeType, adminName, domainName, password); + int get hashCode => Object.hash(runtimeType, diskId, ptable); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$AdConnectionInfoImplCopyWith<_$AdConnectionInfoImpl> get copyWith => - __$$AdConnectionInfoImplCopyWithImpl<_$AdConnectionInfoImpl>( - this, _$identity); + _$$ReformatDiskImplCopyWith<_$ReformatDiskImpl> get copyWith => + __$$ReformatDiskImplCopyWithImpl<_$ReformatDiskImpl>(this, _$identity); @override Map toJson() { - return _$$AdConnectionInfoImplToJson( + return _$$ReformatDiskImplToJson( this, ); } } -abstract class _AdConnectionInfo implements AdConnectionInfo { - const factory _AdConnectionInfo( - {final String adminName, - final String domainName, - final String password}) = _$AdConnectionInfoImpl; +abstract class _ReformatDisk implements ReformatDisk { + const factory _ReformatDisk( + {required final String diskId, + final String? ptable}) = _$ReformatDiskImpl; - factory _AdConnectionInfo.fromJson(Map json) = - _$AdConnectionInfoImpl.fromJson; + factory _ReformatDisk.fromJson(Map json) = + _$ReformatDiskImpl.fromJson; @override - String get adminName; - @override - String get domainName; + String get diskId; @override - String get password; + String? get ptable; @override @JsonKey(ignore: true) - _$$AdConnectionInfoImplCopyWith<_$AdConnectionInfoImpl> get copyWith => + _$$ReformatDiskImplCopyWith<_$ReformatDiskImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/packages/subiquity_client/lib/src/types.g.dart b/packages/subiquity_client/lib/src/types.g.dart index 6baf05d74..ff8add4df 100644 --- a/packages/subiquity_client/lib/src/types.g.dart +++ b/packages/subiquity_client/lib/src/types.g.dart @@ -372,1066 +372,1012 @@ const _$PackageInstallStateEnumMap = { PackageInstallState.DONE: 'DONE', }; -_$OsProberImpl _$$OsProberImplFromJson(Map json) => - _$OsProberImpl( - long: json['long'] as String, - label: json['label'] as String, - type: json['type'] as String, - subpath: json['subpath'] as String?, - version: json['version'] as String?, +_$IdentityDataImpl _$$IdentityDataImplFromJson(Map json) => + _$IdentityDataImpl( + realname: json['realname'] as String? ?? '', + username: json['username'] as String? ?? '', + cryptedPassword: json['crypted_password'] as String? ?? '', + hostname: json['hostname'] as String? ?? '', ); -Map _$$OsProberImplToJson(_$OsProberImpl instance) => +Map _$$IdentityDataImplToJson(_$IdentityDataImpl instance) => { - 'long': instance.long, - 'label': instance.label, - 'type': instance.type, - 'subpath': instance.subpath, - 'version': instance.version, + 'realname': instance.realname, + 'username': instance.username, + 'crypted_password': instance.cryptedPassword, + 'hostname': instance.hostname, }; -_$PartitionImpl _$$PartitionImplFromJson(Map json) => - _$PartitionImpl( - size: (json['size'] as num?)?.toInt(), - number: (json['number'] as num?)?.toInt(), - preserve: json['preserve'] as bool?, - wipe: json['wipe'] as String?, - annotations: (json['annotations'] as List?) +_$SSHDataImpl _$$SSHDataImplFromJson(Map json) => + _$SSHDataImpl( + installServer: json['install_server'] as bool, + allowPw: json['allow_pw'] as bool, + authorizedKeys: (json['authorized_keys'] as List?) ?.map((e) => e as String) .toList() ?? const [], - mount: json['mount'] as String?, - format: json['format'] as String?, - grubDevice: json['grub_device'] as bool?, - boot: json['boot'] as bool?, - os: json['os'] == null - ? null - : OsProber.fromJson(json['os'] as Map), - offset: (json['offset'] as num?)?.toInt(), - estimatedMinSize: (json['estimated_min_size'] as num?)?.toInt() ?? -1, - resize: json['resize'] as bool?, - path: json['path'] as String?, - isInUse: json['is_in_use'] as bool? ?? false, - $type: json[r'$type'] as String?, - ); - -Map _$$PartitionImplToJson(_$PartitionImpl instance) => - { - 'size': instance.size, - 'number': instance.number, - 'preserve': instance.preserve, - 'wipe': instance.wipe, - 'annotations': instance.annotations, - 'mount': instance.mount, - 'format': instance.format, - 'grub_device': instance.grubDevice, - 'boot': instance.boot, - 'os': instance.os?.toJson(), - 'offset': instance.offset, - 'estimated_min_size': instance.estimatedMinSize, - 'resize': instance.resize, - 'path': instance.path, - 'is_in_use': instance.isInUse, - r'$type': instance.$type, - }; - -_$GapImpl _$$GapImplFromJson(Map json) => _$GapImpl( - offset: (json['offset'] as num).toInt(), - size: (json['size'] as num).toInt(), - usable: $enumDecode(_$GapUsableEnumMap, json['usable']), - $type: json[r'$type'] as String?, ); -Map _$$GapImplToJson(_$GapImpl instance) => { - 'offset': instance.offset, - 'size': instance.size, - 'usable': _$GapUsableEnumMap[instance.usable]!, - r'$type': instance.$type, - }; - -const _$GapUsableEnumMap = { - GapUsable.YES: 'YES', - GapUsable.TOO_MANY_PRIMARY_PARTS: 'TOO_MANY_PRIMARY_PARTS', -}; - -_$ZFSImpl _$$ZFSImplFromJson(Map json) => _$ZFSImpl( - volume: json['volume'] as String, - properties: json['properties'] as Map?, - ); - -Map _$$ZFSImplToJson(_$ZFSImpl instance) => { - 'volume': instance.volume, - 'properties': instance.properties, - }; - -_$ZPoolImpl _$$ZPoolImplFromJson(Map json) => _$ZPoolImpl( - pool: json['pool'] as String, - mountpoint: json['mountpoint'] as String, - zfses: json['zfses'] == null - ? null - : ZFS.fromJson(json['zfses'] as Map), - poolProperties: json['pool_properties'] as Map?, - fsProperties: json['fs_properties'] as Map?, - defaultFeatures: json['default_features'] as bool? ?? true, - ); - -Map _$$ZPoolImplToJson(_$ZPoolImpl instance) => +Map _$$SSHDataImplToJson(_$SSHDataImpl instance) => { - 'pool': instance.pool, - 'mountpoint': instance.mountpoint, - 'zfses': instance.zfses?.toJson(), - 'pool_properties': instance.poolProperties, - 'fs_properties': instance.fsProperties, - 'default_features': instance.defaultFeatures, + 'install_server': instance.installServer, + 'allow_pw': instance.allowPw, + 'authorized_keys': instance.authorizedKeys, }; -_$DiskImpl _$$DiskImplFromJson(Map json) => _$DiskImpl( - id: json['id'] as String, - label: json['label'] as String, - type: json['type'] as String, - size: (json['size'] as num).toInt(), - usageLabels: (json['usage_labels'] as List) - .map((e) => e as String) - .toList(), - partitions: (json['partitions'] as List) - .map((e) => PartitionOrGap.fromJson(e as Map)) - .toList(), - okForGuided: json['ok_for_guided'] as bool, - ptable: json['ptable'] as String?, - preserve: json['preserve'] as bool, - path: json['path'] as String?, - bootDevice: json['boot_device'] as bool, - canBeBootDevice: json['can_be_boot_device'] as bool, - model: json['model'] as String?, - vendor: json['vendor'] as String?, - hasInUsePartition: json['has_in_use_partition'] as bool? ?? false, +_$SSHIdentityImpl _$$SSHIdentityImplFromJson(Map json) => + _$SSHIdentityImpl( + keyType: json['key_type'] as String, + key: json['key'] as String, + keyComment: json['key_comment'] as String, + keyFingerprint: json['key_fingerprint'] as String, ); -Map _$$DiskImplToJson(_$DiskImpl instance) => +Map _$$SSHIdentityImplToJson(_$SSHIdentityImpl instance) => { - 'id': instance.id, - 'label': instance.label, - 'type': instance.type, - 'size': instance.size, - 'usage_labels': instance.usageLabels, - 'partitions': instance.partitions.map((e) => e.toJson()).toList(), - 'ok_for_guided': instance.okForGuided, - 'ptable': instance.ptable, - 'preserve': instance.preserve, - 'path': instance.path, - 'boot_device': instance.bootDevice, - 'can_be_boot_device': instance.canBeBootDevice, - 'model': instance.model, - 'vendor': instance.vendor, - 'has_in_use_partition': instance.hasInUsePartition, + 'key_type': instance.keyType, + 'key': instance.key, + 'key_comment': instance.keyComment, + 'key_fingerprint': instance.keyFingerprint, }; -_$GuidedDisallowedCapabilityImpl _$$GuidedDisallowedCapabilityImplFromJson( +_$SSHFetchIdResponseImpl _$$SSHFetchIdResponseImplFromJson( Map json) => - _$GuidedDisallowedCapabilityImpl( - capability: $enumDecode(_$GuidedCapabilityEnumMap, json['capability']), - reason: $enumDecode( - _$GuidedDisallowedCapabilityReasonEnumMap, json['reason']), - message: json['message'] as String?, + _$SSHFetchIdResponseImpl( + status: $enumDecode(_$SSHFetchIdStatusEnumMap, json['status']), + identities: (json['identities'] as List?) + ?.map((e) => SSHIdentity.fromJson(e as Map)) + .toList(), + error: json['error'] as String?, ); -Map _$$GuidedDisallowedCapabilityImplToJson( - _$GuidedDisallowedCapabilityImpl instance) => +Map _$$SSHFetchIdResponseImplToJson( + _$SSHFetchIdResponseImpl instance) => { - 'capability': _$GuidedCapabilityEnumMap[instance.capability]!, - 'reason': _$GuidedDisallowedCapabilityReasonEnumMap[instance.reason]!, - 'message': instance.message, + 'status': _$SSHFetchIdStatusEnumMap[instance.status]!, + 'identities': instance.identities?.map((e) => e.toJson()).toList(), + 'error': instance.error, }; -const _$GuidedCapabilityEnumMap = { - GuidedCapability.MANUAL: 'MANUAL', - GuidedCapability.DIRECT: 'DIRECT', - GuidedCapability.LVM: 'LVM', - GuidedCapability.LVM_LUKS: 'LVM_LUKS', - GuidedCapability.ZFS: 'ZFS', - GuidedCapability.ZFS_LUKS_KEYSTORE: 'ZFS_LUKS_KEYSTORE', - GuidedCapability.CORE_BOOT_ENCRYPTED: 'CORE_BOOT_ENCRYPTED', - GuidedCapability.CORE_BOOT_UNENCRYPTED: 'CORE_BOOT_UNENCRYPTED', - GuidedCapability.CORE_BOOT_PREFER_ENCRYPTED: 'CORE_BOOT_PREFER_ENCRYPTED', - GuidedCapability.CORE_BOOT_PREFER_UNENCRYPTED: 'CORE_BOOT_PREFER_UNENCRYPTED', - GuidedCapability.DD: 'DD', -}; - -const _$GuidedDisallowedCapabilityReasonEnumMap = { - GuidedDisallowedCapabilityReason.TOO_SMALL: 'TOO_SMALL', - GuidedDisallowedCapabilityReason.CORE_BOOT_ENCRYPTION_UNAVAILABLE: - 'CORE_BOOT_ENCRYPTION_UNAVAILABLE', - GuidedDisallowedCapabilityReason.NOT_UEFI: 'NOT_UEFI', - GuidedDisallowedCapabilityReason.THIRD_PARTY_DRIVERS: 'THIRD_PARTY_DRIVERS', +const _$SSHFetchIdStatusEnumMap = { + SSHFetchIdStatus.OK: 'OK', + SSHFetchIdStatus.IMPORT_ERROR: 'IMPORT_ERROR', + SSHFetchIdStatus.FINGERPRINT_ERROR: 'FINGERPRINT_ERROR', }; -_$StorageResponseImpl _$$StorageResponseImplFromJson( +_$ChannelSnapInfoImpl _$$ChannelSnapInfoImplFromJson( Map json) => - _$StorageResponseImpl( - status: $enumDecode(_$ProbeStatusEnumMap, json['status']), - errorReport: json['error_report'] == null - ? null - : ErrorReportRef.fromJson( - json['error_report'] as Map), - bootloader: $enumDecodeNullable(_$BootloaderEnumMap, json['bootloader']), - origConfig: json['orig_config'] as List?, - config: json['config'] as List?, - dasd: json['dasd'] as Map?, - storageVersion: (json['storage_version'] as num?)?.toInt() ?? 1, + _$ChannelSnapInfoImpl( + channelName: json['channel_name'] as String, + revision: json['revision'] as String, + confinement: json['confinement'] as String, + version: json['version'] as String, + size: (json['size'] as num).toInt(), + releasedAt: DateTime.parse(json['released_at'] as String), ); -Map _$$StorageResponseImplToJson( - _$StorageResponseImpl instance) => +Map _$$ChannelSnapInfoImplToJson( + _$ChannelSnapInfoImpl instance) => { - 'status': _$ProbeStatusEnumMap[instance.status]!, - 'error_report': instance.errorReport?.toJson(), - 'bootloader': _$BootloaderEnumMap[instance.bootloader], - 'orig_config': instance.origConfig, - 'config': instance.config, - 'dasd': instance.dasd, - 'storage_version': instance.storageVersion, + 'channel_name': instance.channelName, + 'revision': instance.revision, + 'confinement': instance.confinement, + 'version': instance.version, + 'size': instance.size, + 'released_at': instance.releasedAt.toIso8601String(), }; -const _$ProbeStatusEnumMap = { - ProbeStatus.PROBING: 'PROBING', - ProbeStatus.FAILED: 'FAILED', - ProbeStatus.DONE: 'DONE', -}; - -const _$BootloaderEnumMap = { - Bootloader.NONE: 'NONE', - Bootloader.BIOS: 'BIOS', - Bootloader.UEFI: 'UEFI', - Bootloader.PREP: 'PREP', -}; - -_$StorageResponseV2Impl _$$StorageResponseV2ImplFromJson( - Map json) => - _$StorageResponseV2Impl( - status: $enumDecode(_$ProbeStatusEnumMap, json['status']), - errorReport: json['error_report'] == null - ? null - : ErrorReportRef.fromJson( - json['error_report'] as Map), - disks: (json['disks'] as List?) - ?.map((e) => Disk.fromJson(e as Map)) +_$SnapInfoImpl _$$SnapInfoImplFromJson(Map json) => + _$SnapInfoImpl( + name: json['name'] as String, + summary: json['summary'] as String? ?? '', + publisher: json['publisher'] as String? ?? '', + verified: json['verified'] as bool? ?? false, + starred: json['starred'] as bool? ?? false, + description: json['description'] as String? ?? '', + confinement: json['confinement'] as String? ?? '', + license: json['license'] as String? ?? '', + channels: (json['channels'] as List?) + ?.map((e) => ChannelSnapInfo.fromJson(e as Map)) .toList() ?? const [], - needRoot: json['need_root'] as bool?, - needBoot: json['need_boot'] as bool?, - installMinimumSize: (json['install_minimum_size'] as num?)?.toInt(), - ); - -Map _$$StorageResponseV2ImplToJson( - _$StorageResponseV2Impl instance) => - { - 'status': _$ProbeStatusEnumMap[instance.status]!, - 'error_report': instance.errorReport?.toJson(), - 'disks': instance.disks.map((e) => e.toJson()).toList(), - 'need_root': instance.needRoot, - 'need_boot': instance.needBoot, - 'install_minimum_size': instance.installMinimumSize, - }; - -_$GuidedResizeValuesImpl _$$GuidedResizeValuesImplFromJson( - Map json) => - _$GuidedResizeValuesImpl( - installMax: (json['install_max'] as num).toInt(), - minimum: (json['minimum'] as num).toInt(), - recommended: (json['recommended'] as num).toInt(), - maximum: (json['maximum'] as num).toInt(), ); -Map _$$GuidedResizeValuesImplToJson( - _$GuidedResizeValuesImpl instance) => +Map _$$SnapInfoImplToJson(_$SnapInfoImpl instance) => { - 'install_max': instance.installMax, - 'minimum': instance.minimum, - 'recommended': instance.recommended, - 'maximum': instance.maximum, + 'name': instance.name, + 'summary': instance.summary, + 'publisher': instance.publisher, + 'verified': instance.verified, + 'starred': instance.starred, + 'description': instance.description, + 'confinement': instance.confinement, + 'license': instance.license, + 'channels': instance.channels.map((e) => e.toJson()).toList(), }; -_$GuidedStorageTargetReformatImpl _$$GuidedStorageTargetReformatImplFromJson( +_$DriversResponseImpl _$$DriversResponseImplFromJson( Map json) => - _$GuidedStorageTargetReformatImpl( - diskId: json['disk_id'] as String, - allowed: (json['allowed'] as List?) - ?.map((e) => $enumDecode(_$GuidedCapabilityEnumMap, e)) - .toList() ?? - const [], - disallowed: (json['disallowed'] as List?) - ?.map((e) => GuidedDisallowedCapability.fromJson( - e as Map)) - .toList() ?? - const [], - $type: json[r'$type'] as String?, + _$DriversResponseImpl( + install: json['install'] as bool, + drivers: + (json['drivers'] as List?)?.map((e) => e as String).toList(), + localOnly: json['local_only'] as bool, + searchDrivers: json['search_drivers'] as bool, ); -Map _$$GuidedStorageTargetReformatImplToJson( - _$GuidedStorageTargetReformatImpl instance) => +Map _$$DriversResponseImplToJson( + _$DriversResponseImpl instance) => { - 'disk_id': instance.diskId, - 'allowed': - instance.allowed.map((e) => _$GuidedCapabilityEnumMap[e]!).toList(), - 'disallowed': instance.disallowed.map((e) => e.toJson()).toList(), - r'$type': instance.$type, + 'install': instance.install, + 'drivers': instance.drivers, + 'local_only': instance.localOnly, + 'search_drivers': instance.searchDrivers, }; -_$GuidedStorageTargetResizeImpl _$$GuidedStorageTargetResizeImplFromJson( - Map json) => - _$GuidedStorageTargetResizeImpl( - diskId: json['disk_id'] as String, - partitionNumber: (json['partition_number'] as num).toInt(), - newSize: (json['new_size'] as num).toInt(), - minimum: (json['minimum'] as num?)?.toInt(), - recommended: (json['recommended'] as num?)?.toInt(), - maximum: (json['maximum'] as num?)?.toInt(), - allowed: (json['allowed'] as List?) - ?.map((e) => $enumDecode(_$GuidedCapabilityEnumMap, e)) - .toList() ?? - const [], - disallowed: (json['disallowed'] as List?) - ?.map((e) => GuidedDisallowedCapability.fromJson( - e as Map)) - .toList() ?? - const [], - $type: json[r'$type'] as String?, +_$OEMResponseImpl _$$OEMResponseImplFromJson(Map json) => + _$OEMResponseImpl( + metapackages: (json['metapackages'] as List?) + ?.map((e) => e as String) + .toList(), ); -Map _$$GuidedStorageTargetResizeImplToJson( - _$GuidedStorageTargetResizeImpl instance) => +Map _$$OEMResponseImplToJson(_$OEMResponseImpl instance) => { - 'disk_id': instance.diskId, - 'partition_number': instance.partitionNumber, - 'new_size': instance.newSize, - 'minimum': instance.minimum, - 'recommended': instance.recommended, - 'maximum': instance.maximum, - 'allowed': - instance.allowed.map((e) => _$GuidedCapabilityEnumMap[e]!).toList(), - 'disallowed': instance.disallowed.map((e) => e.toJson()).toList(), - r'$type': instance.$type, + 'metapackages': instance.metapackages, }; -_$GuidedStorageTargetUseGapImpl _$$GuidedStorageTargetUseGapImplFromJson( - Map json) => - _$GuidedStorageTargetUseGapImpl( - diskId: json['disk_id'] as String, - gap: Gap.fromJson(json['gap'] as Map), - allowed: (json['allowed'] as List?) - ?.map((e) => $enumDecode(_$GuidedCapabilityEnumMap, e)) - .toList() ?? - const [], - disallowed: (json['disallowed'] as List?) - ?.map((e) => GuidedDisallowedCapability.fromJson( - e as Map)) - .toList() ?? - const [], - $type: json[r'$type'] as String?, +_$CodecsDataImpl _$$CodecsDataImplFromJson(Map json) => + _$CodecsDataImpl( + install: json['install'] as bool, ); -Map _$$GuidedStorageTargetUseGapImplToJson( - _$GuidedStorageTargetUseGapImpl instance) => +Map _$$CodecsDataImplToJson(_$CodecsDataImpl instance) => { - 'disk_id': instance.diskId, - 'gap': instance.gap.toJson(), - 'allowed': - instance.allowed.map((e) => _$GuidedCapabilityEnumMap[e]!).toList(), - 'disallowed': instance.disallowed.map((e) => e.toJson()).toList(), - r'$type': instance.$type, + 'install': instance.install, }; -_$GuidedStorageTargetManualImpl _$$GuidedStorageTargetManualImplFromJson( - Map json) => - _$GuidedStorageTargetManualImpl( - allowed: (json['allowed'] as List) - .map((e) => $enumDecode(_$GuidedCapabilityEnumMap, e)) - .toList(), - disallowed: (json['disallowed'] as List?) - ?.map((e) => GuidedDisallowedCapability.fromJson( - e as Map)) - .toList() ?? - const [], - $type: json[r'$type'] as String?, +_$DriversPayloadImpl _$$DriversPayloadImplFromJson(Map json) => + _$DriversPayloadImpl( + install: json['install'] as bool, ); -Map _$$GuidedStorageTargetManualImplToJson( - _$GuidedStorageTargetManualImpl instance) => +Map _$$DriversPayloadImplToJson( + _$DriversPayloadImpl instance) => { - 'allowed': - instance.allowed.map((e) => _$GuidedCapabilityEnumMap[e]!).toList(), - 'disallowed': instance.disallowed.map((e) => e.toJson()).toList(), - r'$type': instance.$type, + 'install': instance.install, }; -_$RecoveryKeyImpl _$$RecoveryKeyImplFromJson(Map json) => - _$RecoveryKeyImpl( - liveLocation: json['live_location'] as String?, - backupLocation: json['backup_location'] as String?, +_$SnapSelectionImpl _$$SnapSelectionImplFromJson(Map json) => + _$SnapSelectionImpl( + name: json['name'] as String, + channel: json['channel'] as String, + classic: json['classic'] as bool? ?? false, ); -Map _$$RecoveryKeyImplToJson(_$RecoveryKeyImpl instance) => +Map _$$SnapSelectionImplToJson(_$SnapSelectionImpl instance) => { - 'live_location': instance.liveLocation, - 'backup_location': instance.backupLocation, + 'name': instance.name, + 'channel': instance.channel, + 'classic': instance.classic, }; -_$GuidedChoiceV2Impl _$$GuidedChoiceV2ImplFromJson(Map json) => - _$GuidedChoiceV2Impl( - target: - GuidedStorageTarget.fromJson(json['target'] as Map), - capability: $enumDecode(_$GuidedCapabilityEnumMap, json['capability']), - password: json['password'] as String?, - recoveryKey: json['recovery_key'] == null - ? null - : RecoveryKey.fromJson(json['recovery_key'] as Map), - sizingPolicy: - $enumDecodeNullable(_$SizingPolicyEnumMap, json['sizing_policy']), - resetPartition: json['reset_partition'] as bool? ?? false, - resetPartitionSize: (json['reset_partition_size'] as num?)?.toInt(), +_$SnapListResponseImpl _$$SnapListResponseImplFromJson( + Map json) => + _$SnapListResponseImpl( + status: $enumDecode(_$SnapCheckStateEnumMap, json['status']), + snaps: (json['snaps'] as List?) + ?.map((e) => SnapInfo.fromJson(e as Map)) + .toList() ?? + const [], + selections: (json['selections'] as List?) + ?.map((e) => SnapSelection.fromJson(e as Map)) + .toList() ?? + const [], ); -Map _$$GuidedChoiceV2ImplToJson( - _$GuidedChoiceV2Impl instance) => +Map _$$SnapListResponseImplToJson( + _$SnapListResponseImpl instance) => { - 'target': instance.target.toJson(), - 'capability': _$GuidedCapabilityEnumMap[instance.capability]!, - 'password': instance.password, - 'recovery_key': instance.recoveryKey?.toJson(), - 'sizing_policy': _$SizingPolicyEnumMap[instance.sizingPolicy], - 'reset_partition': instance.resetPartition, - 'reset_partition_size': instance.resetPartitionSize, + 'status': _$SnapCheckStateEnumMap[instance.status]!, + 'snaps': instance.snaps.map((e) => e.toJson()).toList(), + 'selections': instance.selections.map((e) => e.toJson()).toList(), }; -const _$SizingPolicyEnumMap = { - SizingPolicy.SCALED: 'SCALED', - SizingPolicy.ALL: 'ALL', +const _$SnapCheckStateEnumMap = { + SnapCheckState.FAILED: 'FAILED', + SnapCheckState.LOADING: 'LOADING', + SnapCheckState.DONE: 'DONE', }; -_$GuidedStorageResponseV2Impl _$$GuidedStorageResponseV2ImplFromJson( - Map json) => - _$GuidedStorageResponseV2Impl( - status: $enumDecode(_$ProbeStatusEnumMap, json['status']), - errorReport: json['error_report'] == null - ? null - : ErrorReportRef.fromJson( - json['error_report'] as Map), - configured: json['configured'] == null - ? null - : GuidedChoiceV2.fromJson(json['configured'] as Map), - targets: (json['targets'] as List?) - ?.map((e) => - GuidedStorageTarget.fromJson(e as Map)) - .toList() ?? - const [], +_$TimeZoneInfoImpl _$$TimeZoneInfoImplFromJson(Map json) => + _$TimeZoneInfoImpl( + timezone: json['timezone'] as String, + fromGeoip: json['from_geoip'] as bool, ); -Map _$$GuidedStorageResponseV2ImplToJson( - _$GuidedStorageResponseV2Impl instance) => +Map _$$TimeZoneInfoImplToJson(_$TimeZoneInfoImpl instance) => { - 'status': _$ProbeStatusEnumMap[instance.status]!, - 'error_report': instance.errorReport?.toJson(), - 'configured': instance.configured?.toJson(), - 'targets': instance.targets.map((e) => e.toJson()).toList(), + 'timezone': instance.timezone, + 'from_geoip': instance.fromGeoip, }; -_$AddPartitionV2Impl _$$AddPartitionV2ImplFromJson(Map json) => - _$AddPartitionV2Impl( - diskId: json['disk_id'] as String, - partition: Partition.fromJson(json['partition'] as Map), - gap: Gap.fromJson(json['gap'] as Map), +_$UbuntuProInfoImpl _$$UbuntuProInfoImplFromJson(Map json) => + _$UbuntuProInfoImpl( + token: json['token'] as String, ); -Map _$$AddPartitionV2ImplToJson( - _$AddPartitionV2Impl instance) => +Map _$$UbuntuProInfoImplToJson(_$UbuntuProInfoImpl instance) => { - 'disk_id': instance.diskId, - 'partition': instance.partition.toJson(), - 'gap': instance.gap.toJson(), + 'token': instance.token, }; -_$ModifyPartitionV2Impl _$$ModifyPartitionV2ImplFromJson( +_$UbuntuProResponseImpl _$$UbuntuProResponseImplFromJson( Map json) => - _$ModifyPartitionV2Impl( - diskId: json['disk_id'] as String, - partition: Partition.fromJson(json['partition'] as Map), + _$UbuntuProResponseImpl( + token: json['token'] as String, + hasNetwork: json['has_network'] as bool, ); -Map _$$ModifyPartitionV2ImplToJson( - _$ModifyPartitionV2Impl instance) => +Map _$$UbuntuProResponseImplToJson( + _$UbuntuProResponseImpl instance) => { - 'disk_id': instance.diskId, - 'partition': instance.partition.toJson(), + 'token': instance.token, + 'has_network': instance.hasNetwork, }; -_$ReformatDiskImpl _$$ReformatDiskImplFromJson(Map json) => - _$ReformatDiskImpl( - diskId: json['disk_id'] as String, - ptable: json['ptable'] as String?, +_$UbuntuProGeneralInfoImpl _$$UbuntuProGeneralInfoImplFromJson( + Map json) => + _$UbuntuProGeneralInfoImpl( + eolEsmYear: (json['eol_esm_year'] as num?)?.toInt(), + universePackages: (json['universe_packages'] as num).toInt(), + mainPackages: (json['main_packages'] as num).toInt(), ); -Map _$$ReformatDiskImplToJson(_$ReformatDiskImpl instance) => +Map _$$UbuntuProGeneralInfoImplToJson( + _$UbuntuProGeneralInfoImpl instance) => { - 'disk_id': instance.diskId, - 'ptable': instance.ptable, + 'eol_esm_year': instance.eolEsmYear, + 'universe_packages': instance.universePackages, + 'main_packages': instance.mainPackages, }; -_$IdentityDataImpl _$$IdentityDataImplFromJson(Map json) => - _$IdentityDataImpl( - realname: json['realname'] as String? ?? '', - username: json['username'] as String? ?? '', - cryptedPassword: json['crypted_password'] as String? ?? '', - hostname: json['hostname'] as String? ?? '', +_$UPCSInitiateResponseImpl _$$UPCSInitiateResponseImplFromJson( + Map json) => + _$UPCSInitiateResponseImpl( + userCode: json['user_code'] as String, + validitySeconds: (json['validity_seconds'] as num).toInt(), ); -Map _$$IdentityDataImplToJson(_$IdentityDataImpl instance) => +Map _$$UPCSInitiateResponseImplToJson( + _$UPCSInitiateResponseImpl instance) => { - 'realname': instance.realname, - 'username': instance.username, - 'crypted_password': instance.cryptedPassword, - 'hostname': instance.hostname, + 'user_code': instance.userCode, + 'validity_seconds': instance.validitySeconds, }; -_$SSHDataImpl _$$SSHDataImplFromJson(Map json) => - _$SSHDataImpl( - installServer: json['install_server'] as bool, - allowPw: json['allow_pw'] as bool, - authorizedKeys: (json['authorized_keys'] as List?) - ?.map((e) => e as String) - .toList() ?? - const [], +_$UPCSWaitResponseImpl _$$UPCSWaitResponseImplFromJson( + Map json) => + _$UPCSWaitResponseImpl( + status: $enumDecode(_$UPCSWaitStatusEnumMap, json['status']), + contractToken: json['contract_token'] as String?, ); -Map _$$SSHDataImplToJson(_$SSHDataImpl instance) => +Map _$$UPCSWaitResponseImplToJson( + _$UPCSWaitResponseImpl instance) => { - 'install_server': instance.installServer, - 'allow_pw': instance.allowPw, - 'authorized_keys': instance.authorizedKeys, + 'status': _$UPCSWaitStatusEnumMap[instance.status]!, + 'contract_token': instance.contractToken, }; -_$SSHIdentityImpl _$$SSHIdentityImplFromJson(Map json) => - _$SSHIdentityImpl( - keyType: json['key_type'] as String, - key: json['key'] as String, - keyComment: json['key_comment'] as String, - keyFingerprint: json['key_fingerprint'] as String, +const _$UPCSWaitStatusEnumMap = { + UPCSWaitStatus.SUCCESS: 'SUCCESS', + UPCSWaitStatus.TIMEOUT: 'TIMEOUT', +}; + +_$UbuntuProServiceImpl _$$UbuntuProServiceImplFromJson( + Map json) => + _$UbuntuProServiceImpl( + name: json['name'] as String, + description: json['description'] as String, + autoEnabled: json['auto_enabled'] as bool, ); -Map _$$SSHIdentityImplToJson(_$SSHIdentityImpl instance) => +Map _$$UbuntuProServiceImplToJson( + _$UbuntuProServiceImpl instance) => { - 'key_type': instance.keyType, - 'key': instance.key, - 'key_comment': instance.keyComment, - 'key_fingerprint': instance.keyFingerprint, + 'name': instance.name, + 'description': instance.description, + 'auto_enabled': instance.autoEnabled, }; -_$SSHFetchIdResponseImpl _$$SSHFetchIdResponseImplFromJson( +_$UbuntuProSubscriptionImpl _$$UbuntuProSubscriptionImplFromJson( Map json) => - _$SSHFetchIdResponseImpl( - status: $enumDecode(_$SSHFetchIdStatusEnumMap, json['status']), - identities: (json['identities'] as List?) - ?.map((e) => SSHIdentity.fromJson(e as Map)) + _$UbuntuProSubscriptionImpl( + contractName: json['contract_name'] as String, + accountName: json['account_name'] as String, + contractToken: json['contract_token'] as String, + services: (json['services'] as List) + .map((e) => UbuntuProService.fromJson(e as Map)) .toList(), - error: json['error'] as String?, ); -Map _$$SSHFetchIdResponseImplToJson( - _$SSHFetchIdResponseImpl instance) => +Map _$$UbuntuProSubscriptionImplToJson( + _$UbuntuProSubscriptionImpl instance) => { - 'status': _$SSHFetchIdStatusEnumMap[instance.status]!, - 'identities': instance.identities?.map((e) => e.toJson()).toList(), - 'error': instance.error, + 'contract_name': instance.contractName, + 'account_name': instance.accountName, + 'contract_token': instance.contractToken, + 'services': instance.services.map((e) => e.toJson()).toList(), }; -const _$SSHFetchIdStatusEnumMap = { - SSHFetchIdStatus.OK: 'OK', - SSHFetchIdStatus.IMPORT_ERROR: 'IMPORT_ERROR', - SSHFetchIdStatus.FINGERPRINT_ERROR: 'FINGERPRINT_ERROR', +_$UbuntuProCheckTokenAnswerImpl _$$UbuntuProCheckTokenAnswerImplFromJson( + Map json) => + _$UbuntuProCheckTokenAnswerImpl( + status: $enumDecode(_$UbuntuProCheckTokenStatusEnumMap, json['status']), + subscription: json['subscription'] == null + ? null + : UbuntuProSubscription.fromJson( + json['subscription'] as Map), + ); + +Map _$$UbuntuProCheckTokenAnswerImplToJson( + _$UbuntuProCheckTokenAnswerImpl instance) => + { + 'status': _$UbuntuProCheckTokenStatusEnumMap[instance.status]!, + 'subscription': instance.subscription?.toJson(), + }; + +const _$UbuntuProCheckTokenStatusEnumMap = { + UbuntuProCheckTokenStatus.VALID_TOKEN: 'VALID_TOKEN', + UbuntuProCheckTokenStatus.INVALID_TOKEN: 'INVALID_TOKEN', + UbuntuProCheckTokenStatus.EXPIRED_TOKEN: 'EXPIRED_TOKEN', + UbuntuProCheckTokenStatus.UNKNOWN_ERROR: 'UNKNOWN_ERROR', }; -_$ChannelSnapInfoImpl _$$ChannelSnapInfoImplFromJson( - Map json) => - _$ChannelSnapInfoImpl( - channelName: json['channel_name'] as String, - revision: json['revision'] as String, - confinement: json['confinement'] as String, - version: json['version'] as String, - size: (json['size'] as num).toInt(), - releasedAt: DateTime.parse(json['released_at'] as String), +_$TaskProgressImpl _$$TaskProgressImplFromJson(Map json) => + _$TaskProgressImpl( + label: json['label'] as String? ?? '', + done: (json['done'] as num?)?.toInt() ?? 0, + total: (json['total'] as num?)?.toInt() ?? 0, ); -Map _$$ChannelSnapInfoImplToJson( - _$ChannelSnapInfoImpl instance) => +Map _$$TaskProgressImplToJson(_$TaskProgressImpl instance) => { - 'channel_name': instance.channelName, - 'revision': instance.revision, - 'confinement': instance.confinement, - 'version': instance.version, - 'size': instance.size, - 'released_at': instance.releasedAt.toIso8601String(), + 'label': instance.label, + 'done': instance.done, + 'total': instance.total, + }; + +_$TaskImpl _$$TaskImplFromJson(Map json) => _$TaskImpl( + id: json['id'] as String, + kind: json['kind'] as String, + summary: json['summary'] as String, + status: $enumDecode(_$TaskStatusEnumMap, json['status']), + progress: TaskProgress.fromJson(json['progress'] as Map), + ); + +Map _$$TaskImplToJson(_$TaskImpl instance) => + { + 'id': instance.id, + 'kind': instance.kind, + 'summary': instance.summary, + 'status': _$TaskStatusEnumMap[instance.status]!, + 'progress': instance.progress.toJson(), }; -_$SnapInfoImpl _$$SnapInfoImplFromJson(Map json) => - _$SnapInfoImpl( - name: json['name'] as String, - summary: json['summary'] as String? ?? '', - publisher: json['publisher'] as String? ?? '', - verified: json['verified'] as bool? ?? false, - starred: json['starred'] as bool? ?? false, - description: json['description'] as String? ?? '', - confinement: json['confinement'] as String? ?? '', - license: json['license'] as String? ?? '', - channels: (json['channels'] as List?) - ?.map((e) => ChannelSnapInfo.fromJson(e as Map)) - .toList() ?? - const [], +const _$TaskStatusEnumMap = { + TaskStatus.DO: 'DO', + TaskStatus.DOING: 'DOING', + TaskStatus.DONE: 'DONE', + TaskStatus.ABORT: 'ABORT', + TaskStatus.UNDO: 'UNDO', + TaskStatus.UNDOING: 'UNDOING', + TaskStatus.HOLD: 'HOLD', + TaskStatus.ERROR: 'ERROR', +}; + +_$ChangeImpl _$$ChangeImplFromJson(Map json) => _$ChangeImpl( + id: json['id'] as String, + kind: json['kind'] as String, + summary: json['summary'] as String, + status: $enumDecode(_$TaskStatusEnumMap, json['status']), + tasks: (json['tasks'] as List) + .map((e) => Task.fromJson(e as Map)) + .toList(), + ready: json['ready'] as bool, + err: json['err'] as String?, + data: json['data'], ); -Map _$$SnapInfoImplToJson(_$SnapInfoImpl instance) => +Map _$$ChangeImplToJson(_$ChangeImpl instance) => { - 'name': instance.name, + 'id': instance.id, + 'kind': instance.kind, 'summary': instance.summary, - 'publisher': instance.publisher, - 'verified': instance.verified, - 'starred': instance.starred, - 'description': instance.description, - 'confinement': instance.confinement, - 'license': instance.license, - 'channels': instance.channels.map((e) => e.toJson()).toList(), + 'status': _$TaskStatusEnumMap[instance.status]!, + 'tasks': instance.tasks.map((e) => e.toJson()).toList(), + 'ready': instance.ready, + 'err': instance.err, + 'data': instance.data, }; -_$DriversResponseImpl _$$DriversResponseImplFromJson( +_$MirrorCheckResponseImpl _$$MirrorCheckResponseImplFromJson( Map json) => - _$DriversResponseImpl( - install: json['install'] as bool, - drivers: - (json['drivers'] as List?)?.map((e) => e as String).toList(), - localOnly: json['local_only'] as bool, - searchDrivers: json['search_drivers'] as bool, + _$MirrorCheckResponseImpl( + url: json['url'] as String, + status: $enumDecode(_$MirrorCheckStatusEnumMap, json['status']), + output: json['output'] as String, ); -Map _$$DriversResponseImplToJson( - _$DriversResponseImpl instance) => +Map _$$MirrorCheckResponseImplToJson( + _$MirrorCheckResponseImpl instance) => { - 'install': instance.install, - 'drivers': instance.drivers, - 'local_only': instance.localOnly, - 'search_drivers': instance.searchDrivers, + 'url': instance.url, + 'status': _$MirrorCheckStatusEnumMap[instance.status]!, + 'output': instance.output, }; -_$OEMResponseImpl _$$OEMResponseImplFromJson(Map json) => - _$OEMResponseImpl( - metapackages: (json['metapackages'] as List?) +const _$MirrorCheckStatusEnumMap = { + MirrorCheckStatus.OK: 'OK', + MirrorCheckStatus.RUNNING: 'RUNNING', + MirrorCheckStatus.FAILED: 'FAILED', +}; + +_$MirrorPostImpl _$$MirrorPostImplFromJson(Map json) => + _$MirrorPostImpl( + elected: json['elected'] as String?, + candidates: (json['candidates'] as List?) ?.map((e) => e as String) .toList(), + staged: json['staged'] as String?, + useDuringInstallation: json['use_during_installation'] as bool?, ); -Map _$$OEMResponseImplToJson(_$OEMResponseImpl instance) => +Map _$$MirrorPostImplToJson(_$MirrorPostImpl instance) => { - 'metapackages': instance.metapackages, + 'elected': instance.elected, + 'candidates': instance.candidates, + 'staged': instance.staged, + 'use_during_installation': instance.useDuringInstallation, }; -_$CodecsDataImpl _$$CodecsDataImplFromJson(Map json) => - _$CodecsDataImpl( - install: json['install'] as bool, +_$MirrorGetImpl _$$MirrorGetImplFromJson(Map json) => + _$MirrorGetImpl( + relevant: json['relevant'] as bool, + elected: json['elected'] as String?, + candidates: (json['candidates'] as List) + .map((e) => e as String) + .toList(), + staged: json['staged'] as String?, + useDuringInstallation: json['use_during_installation'] as bool, ); -Map _$$CodecsDataImplToJson(_$CodecsDataImpl instance) => +Map _$$MirrorGetImplToJson(_$MirrorGetImpl instance) => { - 'install': instance.install, + 'relevant': instance.relevant, + 'elected': instance.elected, + 'candidates': instance.candidates, + 'staged': instance.staged, + 'use_during_installation': instance.useDuringInstallation, }; -_$DriversPayloadImpl _$$DriversPayloadImplFromJson(Map json) => - _$DriversPayloadImpl( - install: json['install'] as bool, +_$AdConnectionInfoImpl _$$AdConnectionInfoImplFromJson( + Map json) => + _$AdConnectionInfoImpl( + adminName: json['admin_name'] as String? ?? '', + domainName: json['domain_name'] as String? ?? '', + password: json['password'] as String? ?? '', ); -Map _$$DriversPayloadImplToJson( - _$DriversPayloadImpl instance) => +Map _$$AdConnectionInfoImplToJson( + _$AdConnectionInfoImpl instance) => { - 'install': instance.install, + 'admin_name': instance.adminName, + 'domain_name': instance.domainName, + 'password': instance.password, }; -_$SnapSelectionImpl _$$SnapSelectionImplFromJson(Map json) => - _$SnapSelectionImpl( - name: json['name'] as String, - channel: json['channel'] as String, - classic: json['classic'] as bool? ?? false, +_$OsProberImpl _$$OsProberImplFromJson(Map json) => + _$OsProberImpl( + long: json['long'] as String, + label: json['label'] as String, + type: json['type'] as String, + subpath: json['subpath'] as String?, + version: json['version'] as String?, ); -Map _$$SnapSelectionImplToJson(_$SnapSelectionImpl instance) => +Map _$$OsProberImplToJson(_$OsProberImpl instance) => { - 'name': instance.name, - 'channel': instance.channel, - 'classic': instance.classic, + 'long': instance.long, + 'label': instance.label, + 'type': instance.type, + 'subpath': instance.subpath, + 'version': instance.version, }; -_$SnapListResponseImpl _$$SnapListResponseImplFromJson( - Map json) => - _$SnapListResponseImpl( - status: $enumDecode(_$SnapCheckStateEnumMap, json['status']), - snaps: (json['snaps'] as List?) - ?.map((e) => SnapInfo.fromJson(e as Map)) - .toList() ?? - const [], - selections: (json['selections'] as List?) - ?.map((e) => SnapSelection.fromJson(e as Map)) +_$PartitionImpl _$$PartitionImplFromJson(Map json) => + _$PartitionImpl( + size: (json['size'] as num?)?.toInt(), + number: (json['number'] as num?)?.toInt(), + preserve: json['preserve'] as bool?, + wipe: json['wipe'] as String?, + annotations: (json['annotations'] as List?) + ?.map((e) => e as String) .toList() ?? const [], + mount: json['mount'] as String?, + format: json['format'] as String?, + grubDevice: json['grub_device'] as bool?, + boot: json['boot'] as bool?, + os: json['os'] == null + ? null + : OsProber.fromJson(json['os'] as Map), + offset: (json['offset'] as num?)?.toInt(), + estimatedMinSize: (json['estimated_min_size'] as num?)?.toInt() ?? -1, + resize: json['resize'] as bool?, + path: json['path'] as String?, + isInUse: json['is_in_use'] as bool? ?? false, + $type: json[r'$type'] as String?, ); -Map _$$SnapListResponseImplToJson( - _$SnapListResponseImpl instance) => +Map _$$PartitionImplToJson(_$PartitionImpl instance) => { - 'status': _$SnapCheckStateEnumMap[instance.status]!, - 'snaps': instance.snaps.map((e) => e.toJson()).toList(), - 'selections': instance.selections.map((e) => e.toJson()).toList(), + 'size': instance.size, + 'number': instance.number, + 'preserve': instance.preserve, + 'wipe': instance.wipe, + 'annotations': instance.annotations, + 'mount': instance.mount, + 'format': instance.format, + 'grub_device': instance.grubDevice, + 'boot': instance.boot, + 'os': instance.os?.toJson(), + 'offset': instance.offset, + 'estimated_min_size': instance.estimatedMinSize, + 'resize': instance.resize, + 'path': instance.path, + 'is_in_use': instance.isInUse, + r'$type': instance.$type, }; -const _$SnapCheckStateEnumMap = { - SnapCheckState.FAILED: 'FAILED', - SnapCheckState.LOADING: 'LOADING', - SnapCheckState.DONE: 'DONE', -}; - -_$TimeZoneInfoImpl _$$TimeZoneInfoImplFromJson(Map json) => - _$TimeZoneInfoImpl( - timezone: json['timezone'] as String, - fromGeoip: json['from_geoip'] as bool, +_$GapImpl _$$GapImplFromJson(Map json) => _$GapImpl( + offset: (json['offset'] as num).toInt(), + size: (json['size'] as num).toInt(), + usable: $enumDecode(_$GapUsableEnumMap, json['usable']), + $type: json[r'$type'] as String?, ); -Map _$$TimeZoneInfoImplToJson(_$TimeZoneInfoImpl instance) => - { - 'timezone': instance.timezone, - 'from_geoip': instance.fromGeoip, +Map _$$GapImplToJson(_$GapImpl instance) => { + 'offset': instance.offset, + 'size': instance.size, + 'usable': _$GapUsableEnumMap[instance.usable]!, + r'$type': instance.$type, }; -_$UbuntuProInfoImpl _$$UbuntuProInfoImplFromJson(Map json) => - _$UbuntuProInfoImpl( - token: json['token'] as String, +const _$GapUsableEnumMap = { + GapUsable.YES: 'YES', + GapUsable.TOO_MANY_PRIMARY_PARTS: 'TOO_MANY_PRIMARY_PARTS', +}; + +_$ZFSImpl _$$ZFSImplFromJson(Map json) => _$ZFSImpl( + volume: json['volume'] as String, + properties: json['properties'] as Map?, ); -Map _$$UbuntuProInfoImplToJson(_$UbuntuProInfoImpl instance) => - { - 'token': instance.token, +Map _$$ZFSImplToJson(_$ZFSImpl instance) => { + 'volume': instance.volume, + 'properties': instance.properties, }; -_$UbuntuProResponseImpl _$$UbuntuProResponseImplFromJson( - Map json) => - _$UbuntuProResponseImpl( - token: json['token'] as String, - hasNetwork: json['has_network'] as bool, +_$ZPoolImpl _$$ZPoolImplFromJson(Map json) => _$ZPoolImpl( + pool: json['pool'] as String, + mountpoint: json['mountpoint'] as String, + zfses: json['zfses'] == null + ? null + : ZFS.fromJson(json['zfses'] as Map), + poolProperties: json['pool_properties'] as Map?, + fsProperties: json['fs_properties'] as Map?, + defaultFeatures: json['default_features'] as bool? ?? true, ); -Map _$$UbuntuProResponseImplToJson( - _$UbuntuProResponseImpl instance) => +Map _$$ZPoolImplToJson(_$ZPoolImpl instance) => { - 'token': instance.token, - 'has_network': instance.hasNetwork, + 'pool': instance.pool, + 'mountpoint': instance.mountpoint, + 'zfses': instance.zfses?.toJson(), + 'pool_properties': instance.poolProperties, + 'fs_properties': instance.fsProperties, + 'default_features': instance.defaultFeatures, }; -_$UbuntuProGeneralInfoImpl _$$UbuntuProGeneralInfoImplFromJson( - Map json) => - _$UbuntuProGeneralInfoImpl( - eolEsmYear: (json['eol_esm_year'] as num?)?.toInt(), - universePackages: (json['universe_packages'] as num).toInt(), - mainPackages: (json['main_packages'] as num).toInt(), +_$DiskImpl _$$DiskImplFromJson(Map json) => _$DiskImpl( + id: json['id'] as String, + label: json['label'] as String, + type: json['type'] as String, + size: (json['size'] as num).toInt(), + usageLabels: (json['usage_labels'] as List) + .map((e) => e as String) + .toList(), + partitions: (json['partitions'] as List) + .map((e) => PartitionOrGap.fromJson(e as Map)) + .toList(), + okForGuided: json['ok_for_guided'] as bool, + ptable: json['ptable'] as String?, + preserve: json['preserve'] as bool, + path: json['path'] as String?, + bootDevice: json['boot_device'] as bool, + canBeBootDevice: json['can_be_boot_device'] as bool, + model: json['model'] as String?, + vendor: json['vendor'] as String?, + hasInUsePartition: json['has_in_use_partition'] as bool? ?? false, ); -Map _$$UbuntuProGeneralInfoImplToJson( - _$UbuntuProGeneralInfoImpl instance) => +Map _$$DiskImplToJson(_$DiskImpl instance) => { - 'eol_esm_year': instance.eolEsmYear, - 'universe_packages': instance.universePackages, - 'main_packages': instance.mainPackages, + 'id': instance.id, + 'label': instance.label, + 'type': instance.type, + 'size': instance.size, + 'usage_labels': instance.usageLabels, + 'partitions': instance.partitions.map((e) => e.toJson()).toList(), + 'ok_for_guided': instance.okForGuided, + 'ptable': instance.ptable, + 'preserve': instance.preserve, + 'path': instance.path, + 'boot_device': instance.bootDevice, + 'can_be_boot_device': instance.canBeBootDevice, + 'model': instance.model, + 'vendor': instance.vendor, + 'has_in_use_partition': instance.hasInUsePartition, }; -_$UPCSInitiateResponseImpl _$$UPCSInitiateResponseImplFromJson( +_$GuidedDisallowedCapabilityImpl _$$GuidedDisallowedCapabilityImplFromJson( Map json) => - _$UPCSInitiateResponseImpl( - userCode: json['user_code'] as String, - validitySeconds: (json['validity_seconds'] as num).toInt(), + _$GuidedDisallowedCapabilityImpl( + capability: $enumDecode(_$GuidedCapabilityEnumMap, json['capability']), + reason: $enumDecode( + _$GuidedDisallowedCapabilityReasonEnumMap, json['reason']), + message: json['message'] as String?, ); -Map _$$UPCSInitiateResponseImplToJson( - _$UPCSInitiateResponseImpl instance) => +Map _$$GuidedDisallowedCapabilityImplToJson( + _$GuidedDisallowedCapabilityImpl instance) => { - 'user_code': instance.userCode, - 'validity_seconds': instance.validitySeconds, + 'capability': _$GuidedCapabilityEnumMap[instance.capability]!, + 'reason': _$GuidedDisallowedCapabilityReasonEnumMap[instance.reason]!, + 'message': instance.message, }; -_$UPCSWaitResponseImpl _$$UPCSWaitResponseImplFromJson( +const _$GuidedCapabilityEnumMap = { + GuidedCapability.MANUAL: 'MANUAL', + GuidedCapability.DIRECT: 'DIRECT', + GuidedCapability.LVM: 'LVM', + GuidedCapability.LVM_LUKS: 'LVM_LUKS', + GuidedCapability.ZFS: 'ZFS', + GuidedCapability.ZFS_LUKS_KEYSTORE: 'ZFS_LUKS_KEYSTORE', + GuidedCapability.CORE_BOOT_ENCRYPTED: 'CORE_BOOT_ENCRYPTED', + GuidedCapability.CORE_BOOT_UNENCRYPTED: 'CORE_BOOT_UNENCRYPTED', + GuidedCapability.CORE_BOOT_PREFER_ENCRYPTED: 'CORE_BOOT_PREFER_ENCRYPTED', + GuidedCapability.CORE_BOOT_PREFER_UNENCRYPTED: 'CORE_BOOT_PREFER_UNENCRYPTED', + GuidedCapability.DD: 'DD', +}; + +const _$GuidedDisallowedCapabilityReasonEnumMap = { + GuidedDisallowedCapabilityReason.TOO_SMALL: 'TOO_SMALL', + GuidedDisallowedCapabilityReason.CORE_BOOT_ENCRYPTION_UNAVAILABLE: + 'CORE_BOOT_ENCRYPTION_UNAVAILABLE', + GuidedDisallowedCapabilityReason.NOT_UEFI: 'NOT_UEFI', + GuidedDisallowedCapabilityReason.THIRD_PARTY_DRIVERS: 'THIRD_PARTY_DRIVERS', +}; + +_$StorageResponseImpl _$$StorageResponseImplFromJson( Map json) => - _$UPCSWaitResponseImpl( - status: $enumDecode(_$UPCSWaitStatusEnumMap, json['status']), - contractToken: json['contract_token'] as String?, + _$StorageResponseImpl( + status: $enumDecode(_$ProbeStatusEnumMap, json['status']), + errorReport: json['error_report'] == null + ? null + : ErrorReportRef.fromJson( + json['error_report'] as Map), + bootloader: $enumDecodeNullable(_$BootloaderEnumMap, json['bootloader']), + origConfig: json['orig_config'] as List?, + config: json['config'] as List?, + dasd: json['dasd'] as Map?, + storageVersion: (json['storage_version'] as num?)?.toInt() ?? 1, ); -Map _$$UPCSWaitResponseImplToJson( - _$UPCSWaitResponseImpl instance) => +Map _$$StorageResponseImplToJson( + _$StorageResponseImpl instance) => { - 'status': _$UPCSWaitStatusEnumMap[instance.status]!, - 'contract_token': instance.contractToken, + 'status': _$ProbeStatusEnumMap[instance.status]!, + 'error_report': instance.errorReport?.toJson(), + 'bootloader': _$BootloaderEnumMap[instance.bootloader], + 'orig_config': instance.origConfig, + 'config': instance.config, + 'dasd': instance.dasd, + 'storage_version': instance.storageVersion, }; -const _$UPCSWaitStatusEnumMap = { - UPCSWaitStatus.SUCCESS: 'SUCCESS', - UPCSWaitStatus.TIMEOUT: 'TIMEOUT', +const _$ProbeStatusEnumMap = { + ProbeStatus.PROBING: 'PROBING', + ProbeStatus.FAILED: 'FAILED', + ProbeStatus.DONE: 'DONE', }; -_$UbuntuProServiceImpl _$$UbuntuProServiceImplFromJson( +const _$BootloaderEnumMap = { + Bootloader.NONE: 'NONE', + Bootloader.BIOS: 'BIOS', + Bootloader.UEFI: 'UEFI', + Bootloader.PREP: 'PREP', +}; + +_$StorageResponseV2Impl _$$StorageResponseV2ImplFromJson( Map json) => - _$UbuntuProServiceImpl( - name: json['name'] as String, - description: json['description'] as String, - autoEnabled: json['auto_enabled'] as bool, + _$StorageResponseV2Impl( + status: $enumDecode(_$ProbeStatusEnumMap, json['status']), + errorReport: json['error_report'] == null + ? null + : ErrorReportRef.fromJson( + json['error_report'] as Map), + disks: (json['disks'] as List?) + ?.map((e) => Disk.fromJson(e as Map)) + .toList() ?? + const [], + needRoot: json['need_root'] as bool?, + needBoot: json['need_boot'] as bool?, + installMinimumSize: (json['install_minimum_size'] as num?)?.toInt(), ); -Map _$$UbuntuProServiceImplToJson( - _$UbuntuProServiceImpl instance) => +Map _$$StorageResponseV2ImplToJson( + _$StorageResponseV2Impl instance) => { - 'name': instance.name, - 'description': instance.description, - 'auto_enabled': instance.autoEnabled, + 'status': _$ProbeStatusEnumMap[instance.status]!, + 'error_report': instance.errorReport?.toJson(), + 'disks': instance.disks.map((e) => e.toJson()).toList(), + 'need_root': instance.needRoot, + 'need_boot': instance.needBoot, + 'install_minimum_size': instance.installMinimumSize, }; -_$UbuntuProSubscriptionImpl _$$UbuntuProSubscriptionImplFromJson( +_$GuidedResizeValuesImpl _$$GuidedResizeValuesImplFromJson( Map json) => - _$UbuntuProSubscriptionImpl( - contractName: json['contract_name'] as String, - accountName: json['account_name'] as String, - contractToken: json['contract_token'] as String, - services: (json['services'] as List) - .map((e) => UbuntuProService.fromJson(e as Map)) - .toList(), + _$GuidedResizeValuesImpl( + installMax: (json['install_max'] as num).toInt(), + minimum: (json['minimum'] as num).toInt(), + recommended: (json['recommended'] as num).toInt(), + maximum: (json['maximum'] as num).toInt(), ); -Map _$$UbuntuProSubscriptionImplToJson( - _$UbuntuProSubscriptionImpl instance) => +Map _$$GuidedResizeValuesImplToJson( + _$GuidedResizeValuesImpl instance) => { - 'contract_name': instance.contractName, - 'account_name': instance.accountName, - 'contract_token': instance.contractToken, - 'services': instance.services.map((e) => e.toJson()).toList(), + 'install_max': instance.installMax, + 'minimum': instance.minimum, + 'recommended': instance.recommended, + 'maximum': instance.maximum, }; -_$UbuntuProCheckTokenAnswerImpl _$$UbuntuProCheckTokenAnswerImplFromJson( +_$GuidedStorageTargetReformatImpl _$$GuidedStorageTargetReformatImplFromJson( Map json) => - _$UbuntuProCheckTokenAnswerImpl( - status: $enumDecode(_$UbuntuProCheckTokenStatusEnumMap, json['status']), - subscription: json['subscription'] == null - ? null - : UbuntuProSubscription.fromJson( - json['subscription'] as Map), + _$GuidedStorageTargetReformatImpl( + diskId: json['disk_id'] as String, + allowed: (json['allowed'] as List?) + ?.map((e) => $enumDecode(_$GuidedCapabilityEnumMap, e)) + .toList() ?? + const [], + disallowed: (json['disallowed'] as List?) + ?.map((e) => GuidedDisallowedCapability.fromJson( + e as Map)) + .toList() ?? + const [], + $type: json[r'$type'] as String?, ); -Map _$$UbuntuProCheckTokenAnswerImplToJson( - _$UbuntuProCheckTokenAnswerImpl instance) => +Map _$$GuidedStorageTargetReformatImplToJson( + _$GuidedStorageTargetReformatImpl instance) => { - 'status': _$UbuntuProCheckTokenStatusEnumMap[instance.status]!, - 'subscription': instance.subscription?.toJson(), + 'disk_id': instance.diskId, + 'allowed': + instance.allowed.map((e) => _$GuidedCapabilityEnumMap[e]!).toList(), + 'disallowed': instance.disallowed.map((e) => e.toJson()).toList(), + r'$type': instance.$type, }; -const _$UbuntuProCheckTokenStatusEnumMap = { - UbuntuProCheckTokenStatus.VALID_TOKEN: 'VALID_TOKEN', - UbuntuProCheckTokenStatus.INVALID_TOKEN: 'INVALID_TOKEN', - UbuntuProCheckTokenStatus.EXPIRED_TOKEN: 'EXPIRED_TOKEN', - UbuntuProCheckTokenStatus.UNKNOWN_ERROR: 'UNKNOWN_ERROR', -}; - -_$WSLConfigurationBaseImpl _$$WSLConfigurationBaseImplFromJson( +_$GuidedStorageTargetResizeImpl _$$GuidedStorageTargetResizeImplFromJson( Map json) => - _$WSLConfigurationBaseImpl( - automountRoot: json['automount_root'] as String? ?? '/mnt/', - automountOptions: json['automount_options'] as String? ?? '', - networkGeneratehosts: json['network_generatehosts'] as bool? ?? true, - networkGenerateresolvconf: - json['network_generateresolvconf'] as bool? ?? true, + _$GuidedStorageTargetResizeImpl( + diskId: json['disk_id'] as String, + partitionNumber: (json['partition_number'] as num).toInt(), + newSize: (json['new_size'] as num).toInt(), + minimum: (json['minimum'] as num?)?.toInt(), + recommended: (json['recommended'] as num?)?.toInt(), + maximum: (json['maximum'] as num?)?.toInt(), + allowed: (json['allowed'] as List?) + ?.map((e) => $enumDecode(_$GuidedCapabilityEnumMap, e)) + .toList() ?? + const [], + disallowed: (json['disallowed'] as List?) + ?.map((e) => GuidedDisallowedCapability.fromJson( + e as Map)) + .toList() ?? + const [], + $type: json[r'$type'] as String?, ); -Map _$$WSLConfigurationBaseImplToJson( - _$WSLConfigurationBaseImpl instance) => +Map _$$GuidedStorageTargetResizeImplToJson( + _$GuidedStorageTargetResizeImpl instance) => { - 'automount_root': instance.automountRoot, - 'automount_options': instance.automountOptions, - 'network_generatehosts': instance.networkGeneratehosts, - 'network_generateresolvconf': instance.networkGenerateresolvconf, + 'disk_id': instance.diskId, + 'partition_number': instance.partitionNumber, + 'new_size': instance.newSize, + 'minimum': instance.minimum, + 'recommended': instance.recommended, + 'maximum': instance.maximum, + 'allowed': + instance.allowed.map((e) => _$GuidedCapabilityEnumMap[e]!).toList(), + 'disallowed': instance.disallowed.map((e) => e.toJson()).toList(), + r'$type': instance.$type, }; -_$WSLConfigurationAdvancedImpl _$$WSLConfigurationAdvancedImplFromJson( +_$GuidedStorageTargetUseGapImpl _$$GuidedStorageTargetUseGapImplFromJson( Map json) => - _$WSLConfigurationAdvancedImpl( - automountEnabled: json['automount_enabled'] as bool? ?? true, - automountMountfstab: json['automount_mountfstab'] as bool? ?? true, - interopEnabled: json['interop_enabled'] as bool? ?? true, - interopAppendwindowspath: - json['interop_appendwindowspath'] as bool? ?? true, - systemdEnabled: json['systemd_enabled'] as bool? ?? false, + _$GuidedStorageTargetUseGapImpl( + diskId: json['disk_id'] as String, + gap: Gap.fromJson(json['gap'] as Map), + allowed: (json['allowed'] as List?) + ?.map((e) => $enumDecode(_$GuidedCapabilityEnumMap, e)) + .toList() ?? + const [], + disallowed: (json['disallowed'] as List?) + ?.map((e) => GuidedDisallowedCapability.fromJson( + e as Map)) + .toList() ?? + const [], + $type: json[r'$type'] as String?, ); -Map _$$WSLConfigurationAdvancedImplToJson( - _$WSLConfigurationAdvancedImpl instance) => +Map _$$GuidedStorageTargetUseGapImplToJson( + _$GuidedStorageTargetUseGapImpl instance) => { - 'automount_enabled': instance.automountEnabled, - 'automount_mountfstab': instance.automountMountfstab, - 'interop_enabled': instance.interopEnabled, - 'interop_appendwindowspath': instance.interopAppendwindowspath, - 'systemd_enabled': instance.systemdEnabled, + 'disk_id': instance.diskId, + 'gap': instance.gap.toJson(), + 'allowed': + instance.allowed.map((e) => _$GuidedCapabilityEnumMap[e]!).toList(), + 'disallowed': instance.disallowed.map((e) => e.toJson()).toList(), + r'$type': instance.$type, }; -_$WSLSetupOptionsImpl _$$WSLSetupOptionsImplFromJson( +_$GuidedStorageTargetManualImpl _$$GuidedStorageTargetManualImplFromJson( Map json) => - _$WSLSetupOptionsImpl( - installLanguageSupportPackages: - json['install_language_support_packages'] as bool? ?? true, + _$GuidedStorageTargetManualImpl( + allowed: (json['allowed'] as List) + .map((e) => $enumDecode(_$GuidedCapabilityEnumMap, e)) + .toList(), + disallowed: (json['disallowed'] as List?) + ?.map((e) => GuidedDisallowedCapability.fromJson( + e as Map)) + .toList() ?? + const [], + $type: json[r'$type'] as String?, ); -Map _$$WSLSetupOptionsImplToJson( - _$WSLSetupOptionsImpl instance) => +Map _$$GuidedStorageTargetManualImplToJson( + _$GuidedStorageTargetManualImpl instance) => { - 'install_language_support_packages': - instance.installLanguageSupportPackages, + 'allowed': + instance.allowed.map((e) => _$GuidedCapabilityEnumMap[e]!).toList(), + 'disallowed': instance.disallowed.map((e) => e.toJson()).toList(), + r'$type': instance.$type, }; -_$TaskProgressImpl _$$TaskProgressImplFromJson(Map json) => - _$TaskProgressImpl( - label: json['label'] as String? ?? '', - done: (json['done'] as num?)?.toInt() ?? 0, - total: (json['total'] as num?)?.toInt() ?? 0, +_$RecoveryKeyImpl _$$RecoveryKeyImplFromJson(Map json) => + _$RecoveryKeyImpl( + liveLocation: json['live_location'] as String?, + backupLocation: json['backup_location'] as String?, ); -Map _$$TaskProgressImplToJson(_$TaskProgressImpl instance) => +Map _$$RecoveryKeyImplToJson(_$RecoveryKeyImpl instance) => { - 'label': instance.label, - 'done': instance.done, - 'total': instance.total, + 'live_location': instance.liveLocation, + 'backup_location': instance.backupLocation, }; -_$TaskImpl _$$TaskImplFromJson(Map json) => _$TaskImpl( - id: json['id'] as String, - kind: json['kind'] as String, - summary: json['summary'] as String, - status: $enumDecode(_$TaskStatusEnumMap, json['status']), - progress: TaskProgress.fromJson(json['progress'] as Map), +_$GuidedChoiceV2Impl _$$GuidedChoiceV2ImplFromJson(Map json) => + _$GuidedChoiceV2Impl( + target: + GuidedStorageTarget.fromJson(json['target'] as Map), + capability: $enumDecode(_$GuidedCapabilityEnumMap, json['capability']), + password: json['password'] as String?, + recoveryKey: json['recovery_key'] == null + ? null + : RecoveryKey.fromJson(json['recovery_key'] as Map), + sizingPolicy: + $enumDecodeNullable(_$SizingPolicyEnumMap, json['sizing_policy']), + resetPartition: json['reset_partition'] as bool? ?? false, + resetPartitionSize: (json['reset_partition_size'] as num?)?.toInt(), ); -Map _$$TaskImplToJson(_$TaskImpl instance) => +Map _$$GuidedChoiceV2ImplToJson( + _$GuidedChoiceV2Impl instance) => { - 'id': instance.id, - 'kind': instance.kind, - 'summary': instance.summary, - 'status': _$TaskStatusEnumMap[instance.status]!, - 'progress': instance.progress.toJson(), + 'target': instance.target.toJson(), + 'capability': _$GuidedCapabilityEnumMap[instance.capability]!, + 'password': instance.password, + 'recovery_key': instance.recoveryKey?.toJson(), + 'sizing_policy': _$SizingPolicyEnumMap[instance.sizingPolicy], + 'reset_partition': instance.resetPartition, + 'reset_partition_size': instance.resetPartitionSize, }; -const _$TaskStatusEnumMap = { - TaskStatus.DO: 'DO', - TaskStatus.DOING: 'DOING', - TaskStatus.DONE: 'DONE', - TaskStatus.ABORT: 'ABORT', - TaskStatus.UNDO: 'UNDO', - TaskStatus.UNDOING: 'UNDOING', - TaskStatus.HOLD: 'HOLD', - TaskStatus.ERROR: 'ERROR', +const _$SizingPolicyEnumMap = { + SizingPolicy.SCALED: 'SCALED', + SizingPolicy.ALL: 'ALL', }; -_$ChangeImpl _$$ChangeImplFromJson(Map json) => _$ChangeImpl( - id: json['id'] as String, - kind: json['kind'] as String, - summary: json['summary'] as String, - status: $enumDecode(_$TaskStatusEnumMap, json['status']), - tasks: (json['tasks'] as List) - .map((e) => Task.fromJson(e as Map)) - .toList(), - ready: json['ready'] as bool, - err: json['err'] as String?, - data: json['data'], - ); - -Map _$$ChangeImplToJson(_$ChangeImpl instance) => - { - 'id': instance.id, - 'kind': instance.kind, - 'summary': instance.summary, - 'status': _$TaskStatusEnumMap[instance.status]!, - 'tasks': instance.tasks.map((e) => e.toJson()).toList(), - 'ready': instance.ready, - 'err': instance.err, - 'data': instance.data, - }; - -_$MirrorCheckResponseImpl _$$MirrorCheckResponseImplFromJson( +_$GuidedStorageResponseV2Impl _$$GuidedStorageResponseV2ImplFromJson( Map json) => - _$MirrorCheckResponseImpl( - url: json['url'] as String, - status: $enumDecode(_$MirrorCheckStatusEnumMap, json['status']), - output: json['output'] as String, + _$GuidedStorageResponseV2Impl( + status: $enumDecode(_$ProbeStatusEnumMap, json['status']), + errorReport: json['error_report'] == null + ? null + : ErrorReportRef.fromJson( + json['error_report'] as Map), + configured: json['configured'] == null + ? null + : GuidedChoiceV2.fromJson(json['configured'] as Map), + targets: (json['targets'] as List?) + ?.map((e) => + GuidedStorageTarget.fromJson(e as Map)) + .toList() ?? + const [], ); -Map _$$MirrorCheckResponseImplToJson( - _$MirrorCheckResponseImpl instance) => +Map _$$GuidedStorageResponseV2ImplToJson( + _$GuidedStorageResponseV2Impl instance) => { - 'url': instance.url, - 'status': _$MirrorCheckStatusEnumMap[instance.status]!, - 'output': instance.output, + 'status': _$ProbeStatusEnumMap[instance.status]!, + 'error_report': instance.errorReport?.toJson(), + 'configured': instance.configured?.toJson(), + 'targets': instance.targets.map((e) => e.toJson()).toList(), }; -const _$MirrorCheckStatusEnumMap = { - MirrorCheckStatus.OK: 'OK', - MirrorCheckStatus.RUNNING: 'RUNNING', - MirrorCheckStatus.FAILED: 'FAILED', -}; - -_$MirrorPostImpl _$$MirrorPostImplFromJson(Map json) => - _$MirrorPostImpl( - elected: json['elected'] as String?, - candidates: (json['candidates'] as List?) - ?.map((e) => e as String) - .toList(), - staged: json['staged'] as String?, - useDuringInstallation: json['use_during_installation'] as bool?, +_$AddPartitionV2Impl _$$AddPartitionV2ImplFromJson(Map json) => + _$AddPartitionV2Impl( + diskId: json['disk_id'] as String, + partition: Partition.fromJson(json['partition'] as Map), + gap: Gap.fromJson(json['gap'] as Map), ); -Map _$$MirrorPostImplToJson(_$MirrorPostImpl instance) => +Map _$$AddPartitionV2ImplToJson( + _$AddPartitionV2Impl instance) => { - 'elected': instance.elected, - 'candidates': instance.candidates, - 'staged': instance.staged, - 'use_during_installation': instance.useDuringInstallation, + 'disk_id': instance.diskId, + 'partition': instance.partition.toJson(), + 'gap': instance.gap.toJson(), }; -_$MirrorGetImpl _$$MirrorGetImplFromJson(Map json) => - _$MirrorGetImpl( - relevant: json['relevant'] as bool, - elected: json['elected'] as String?, - candidates: (json['candidates'] as List) - .map((e) => e as String) - .toList(), - staged: json['staged'] as String?, - useDuringInstallation: json['use_during_installation'] as bool, +_$ModifyPartitionV2Impl _$$ModifyPartitionV2ImplFromJson( + Map json) => + _$ModifyPartitionV2Impl( + diskId: json['disk_id'] as String, + partition: Partition.fromJson(json['partition'] as Map), ); -Map _$$MirrorGetImplToJson(_$MirrorGetImpl instance) => +Map _$$ModifyPartitionV2ImplToJson( + _$ModifyPartitionV2Impl instance) => { - 'relevant': instance.relevant, - 'elected': instance.elected, - 'candidates': instance.candidates, - 'staged': instance.staged, - 'use_during_installation': instance.useDuringInstallation, + 'disk_id': instance.diskId, + 'partition': instance.partition.toJson(), }; -_$AdConnectionInfoImpl _$$AdConnectionInfoImplFromJson( - Map json) => - _$AdConnectionInfoImpl( - adminName: json['admin_name'] as String? ?? '', - domainName: json['domain_name'] as String? ?? '', - password: json['password'] as String? ?? '', +_$ReformatDiskImpl _$$ReformatDiskImplFromJson(Map json) => + _$ReformatDiskImpl( + diskId: json['disk_id'] as String, + ptable: json['ptable'] as String?, ); -Map _$$AdConnectionInfoImplToJson( - _$AdConnectionInfoImpl instance) => +Map _$$ReformatDiskImplToJson(_$ReformatDiskImpl instance) => { - 'admin_name': instance.adminName, - 'domain_name': instance.domainName, - 'password': instance.password, + 'disk_id': instance.diskId, + 'ptable': instance.ptable, }; diff --git a/packages/subiquity_client/test/subiquity_client_test.dart b/packages/subiquity_client/test/subiquity_client_test.dart index 9b60765de..93967b6ea 100644 --- a/packages/subiquity_client/test/subiquity_client_test.dart +++ b/packages/subiquity_client/test/subiquity_client_test.dart @@ -621,126 +621,6 @@ void main() { }); }); - group('wsl', () { - setUpAll(() async { - final endpoint = await defaultEndpoint(ServerMode.DRY_RUN); - final subiquityPath = await getSubiquityPath(); - final process = SubiquityProcess.python( - 'system_setup.cmd.server', - serverMode: ServerMode.DRY_RUN, - subiquityPath: subiquityPath, - ); - testServer = SubiquityServer( - process: process, - endpoint: endpoint, - ); - client = SubiquityClient(); - final socketPath = await testServer.start(); - client.open(socketPath); - }); - - tearDownAll(() async { - await client.close(); - await testServer.stop(); - }); - - test('variant', () async { - await client.setVariant(Variant.WSL_SETUP); - expect(await client.getVariant(), equals(Variant.WSL_SETUP)); - - await client.setVariant(Variant.WSL_CONFIGURATION); - expect(await client.getVariant(), equals(Variant.WSL_CONFIGURATION)); - }); - - test('wslsetupoptions', () async { - var newConf = const WSLSetupOptions( - installLanguageSupportPackages: false, - ); - - await client.setWslSetupOptions(newConf); - - var conf = await client.wslSetupOptions(); - expect(conf.installLanguageSupportPackages, false); - - newConf = const WSLSetupOptions( - installLanguageSupportPackages: true, - ); - - await client.setWslSetupOptions(newConf); - - conf = await client.wslSetupOptions(); - expect(conf.installLanguageSupportPackages, true); - }); - - test('wslconfbase', () async { - var newConf = const WSLConfigurationBase( - automountRoot: '/mnt/', - automountOptions: '-f', - networkGeneratehosts: false, - networkGenerateresolvconf: false, - ); - - await client.setWslConfigurationBase(newConf); - - var conf = await client.wslConfigurationBase(); - expect(conf.automountRoot, '/mnt/'); - expect(conf.automountOptions, '-f'); - expect(conf.networkGeneratehosts, false); - expect(conf.networkGenerateresolvconf, false); - - newConf = const WSLConfigurationBase( - automountRoot: '', - automountOptions: '', - networkGeneratehosts: true, - networkGenerateresolvconf: true, - ); - - await client.setWslConfigurationBase(newConf); - - conf = await client.wslConfigurationBase(); - expect(conf.automountRoot, ''); - expect(conf.automountOptions, ''); - expect(conf.networkGeneratehosts, true); - expect(conf.networkGenerateresolvconf, true); - }); - - test('wslconfadvanced', () async { - var newConf = const WSLConfigurationAdvanced( - automountEnabled: true, - automountMountfstab: true, - interopEnabled: true, - interopAppendwindowspath: true, - systemdEnabled: false, - ); - - await client.setWslConfigurationAdvanced(newConf); - - var conf = await client.wslConfigurationAdvanced(); - expect(conf.automountEnabled, true); - expect(conf.automountMountfstab, true); - expect(conf.interopEnabled, true); - expect(conf.interopAppendwindowspath, true); - expect(conf.systemdEnabled, false); - - newConf = const WSLConfigurationAdvanced( - automountEnabled: false, - automountMountfstab: false, - interopEnabled: false, - interopAppendwindowspath: false, - systemdEnabled: true, - ); - - await client.setWslConfigurationAdvanced(newConf); - - conf = await client.wslConfigurationAdvanced(); - expect(conf.automountEnabled, false); - expect(conf.automountMountfstab, false); - expect(conf.interopEnabled, false); - expect(conf.interopAppendwindowspath, false); - expect(conf.systemdEnabled, true); - }); - }); - group('autoinstall', () { setUpAll(() async { final subiquityPath = await getSubiquityPath(); diff --git a/packages/subiquity_client/test/types_test.dart b/packages/subiquity_client/test/types_test.dart index ec33f882d..615c3254d 100644 --- a/packages/subiquity_client/test/types_test.dart +++ b/packages/subiquity_client/test/types_test.dart @@ -292,42 +292,6 @@ void main() { expect(GuidedChoiceV2.fromJson(json), choice); }); - test('wsl configuration base data', () { - const conf = WSLConfigurationBase( - automountRoot: '/mnt/', - automountOptions: '', - networkGeneratehosts: true, - networkGenerateresolvconf: true, - ); - const json = { - 'automount_root': '/mnt/', - 'automount_options': '', - 'network_generatehosts': true, - 'network_generateresolvconf': true, - }; - expect(conf.toJson(), equals(json)); - expect(WSLConfigurationBase.fromJson(json), conf); - }); - - test('wsl configuration advanced', () { - const conf = WSLConfigurationAdvanced( - automountEnabled: true, - automountMountfstab: true, - interopEnabled: true, - interopAppendwindowspath: true, - systemdEnabled: false, - ); - const json = { - 'automount_enabled': true, - 'automount_mountfstab': true, - 'interop_enabled': true, - 'interop_appendwindowspath': true, - 'systemd_enabled': false, - }; - expect(conf.toJson(), equals(json)); - expect(WSLConfigurationAdvanced.fromJson(json), conf); - }); - test('keyboard layout key press step', () { const step = StepPressKey( symbols: ['z'], diff --git a/packages/subiquity_test/lib/src/generated.mocks.dart b/packages/subiquity_test/lib/src/generated.mocks.dart index 8608c85c8..b4ee774f4 100644 --- a/packages/subiquity_test/lib/src/generated.mocks.dart +++ b/packages/subiquity_test/lib/src/generated.mocks.dart @@ -111,9 +111,8 @@ class _FakeStorageResponseV2_7 extends _i1.SmartFake ); } -class _FakeWSLSetupOptions_8 extends _i1.SmartFake - implements _i2.WSLSetupOptions { - _FakeWSLSetupOptions_8( +class _FakeAnyStep_8 extends _i1.SmartFake implements _i2.AnyStep { + _FakeAnyStep_8( Object parent, Invocation parentInvocation, ) : super( @@ -122,41 +121,9 @@ class _FakeWSLSetupOptions_8 extends _i1.SmartFake ); } -class _FakeWSLConfigurationBase_9 extends _i1.SmartFake - implements _i2.WSLConfigurationBase { - _FakeWSLConfigurationBase_9( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeWSLConfigurationAdvanced_10 extends _i1.SmartFake - implements _i2.WSLConfigurationAdvanced { - _FakeWSLConfigurationAdvanced_10( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeAnyStep_11 extends _i1.SmartFake implements _i2.AnyStep { - _FakeAnyStep_11( - Object parent, - Invocation parentInvocation, - ) : super( - parent, - parentInvocation, - ); -} - -class _FakeDriversResponse_12 extends _i1.SmartFake +class _FakeDriversResponse_9 extends _i1.SmartFake implements _i2.DriversResponse { - _FakeDriversResponse_12( + _FakeDriversResponse_9( Object parent, Invocation parentInvocation, ) : super( @@ -165,8 +132,8 @@ class _FakeDriversResponse_12 extends _i1.SmartFake ); } -class _FakeCodecsData_13 extends _i1.SmartFake implements _i2.CodecsData { - _FakeCodecsData_13( +class _FakeCodecsData_10 extends _i1.SmartFake implements _i2.CodecsData { + _FakeCodecsData_10( Object parent, Invocation parentInvocation, ) : super( @@ -175,8 +142,8 @@ class _FakeCodecsData_13 extends _i1.SmartFake implements _i2.CodecsData { ); } -class _FakeRefreshStatus_14 extends _i1.SmartFake implements _i2.RefreshStatus { - _FakeRefreshStatus_14( +class _FakeRefreshStatus_11 extends _i1.SmartFake implements _i2.RefreshStatus { + _FakeRefreshStatus_11( Object parent, Invocation parentInvocation, ) : super( @@ -185,8 +152,8 @@ class _FakeRefreshStatus_14 extends _i1.SmartFake implements _i2.RefreshStatus { ); } -class _FakeChange_15 extends _i1.SmartFake implements _i2.Change { - _FakeChange_15( +class _FakeChange_12 extends _i1.SmartFake implements _i2.Change { + _FakeChange_12( Object parent, Invocation parentInvocation, ) : super( @@ -195,9 +162,9 @@ class _FakeChange_15 extends _i1.SmartFake implements _i2.Change { ); } -class _FakeAdConnectionInfo_16 extends _i1.SmartFake +class _FakeAdConnectionInfo_13 extends _i1.SmartFake implements _i2.AdConnectionInfo { - _FakeAdConnectionInfo_16( + _FakeAdConnectionInfo_13( Object parent, Invocation parentInvocation, ) : super( @@ -206,8 +173,8 @@ class _FakeAdConnectionInfo_16 extends _i1.SmartFake ); } -class _FakeEndpoint_17 extends _i1.SmartFake implements _i3.Endpoint { - _FakeEndpoint_17( +class _FakeEndpoint_14 extends _i1.SmartFake implements _i3.Endpoint { + _FakeEndpoint_14( Object parent, Invocation parentInvocation, ) : super( @@ -801,90 +768,6 @@ class MockSubiquityClient extends _i1.Mock implements _i4.SubiquityClient { returnValueForMissingStub: _i5.Future.value(), ) as _i5.Future); - @override - _i5.Future<_i2.WSLSetupOptions> wslSetupOptions() => (super.noSuchMethod( - Invocation.method( - #wslSetupOptions, - [], - ), - returnValue: - _i5.Future<_i2.WSLSetupOptions>.value(_FakeWSLSetupOptions_8( - this, - Invocation.method( - #wslSetupOptions, - [], - ), - )), - ) as _i5.Future<_i2.WSLSetupOptions>); - - @override - _i5.Future setWslSetupOptions(_i2.WSLSetupOptions? options) => - (super.noSuchMethod( - Invocation.method( - #setWslSetupOptions, - [options], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future<_i2.WSLConfigurationBase> wslConfigurationBase() => - (super.noSuchMethod( - Invocation.method( - #wslConfigurationBase, - [], - ), - returnValue: _i5.Future<_i2.WSLConfigurationBase>.value( - _FakeWSLConfigurationBase_9( - this, - Invocation.method( - #wslConfigurationBase, - [], - ), - )), - ) as _i5.Future<_i2.WSLConfigurationBase>); - - @override - _i5.Future setWslConfigurationBase(_i2.WSLConfigurationBase? conf) => - (super.noSuchMethod( - Invocation.method( - #setWslConfigurationBase, - [conf], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future<_i2.WSLConfigurationAdvanced> wslConfigurationAdvanced() => - (super.noSuchMethod( - Invocation.method( - #wslConfigurationAdvanced, - [], - ), - returnValue: _i5.Future<_i2.WSLConfigurationAdvanced>.value( - _FakeWSLConfigurationAdvanced_10( - this, - Invocation.method( - #wslConfigurationAdvanced, - [], - ), - )), - ) as _i5.Future<_i2.WSLConfigurationAdvanced>); - - @override - _i5.Future setWslConfigurationAdvanced( - _i2.WSLConfigurationAdvanced? conf) => - (super.noSuchMethod( - Invocation.method( - #setWslConfigurationAdvanced, - [conf], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - @override _i5.Future<_i2.AnyStep> getKeyboardStep([String? step = r'0']) => (super.noSuchMethod( @@ -892,7 +775,7 @@ class MockSubiquityClient extends _i1.Mock implements _i4.SubiquityClient { #getKeyboardStep, [step], ), - returnValue: _i5.Future<_i2.AnyStep>.value(_FakeAnyStep_11( + returnValue: _i5.Future<_i2.AnyStep>.value(_FakeAnyStep_8( this, Invocation.method( #getKeyboardStep, @@ -908,7 +791,7 @@ class MockSubiquityClient extends _i1.Mock implements _i4.SubiquityClient { [], ), returnValue: - _i5.Future<_i2.DriversResponse>.value(_FakeDriversResponse_12( + _i5.Future<_i2.DriversResponse>.value(_FakeDriversResponse_9( this, Invocation.method( #getDrivers, @@ -934,7 +817,7 @@ class MockSubiquityClient extends _i1.Mock implements _i4.SubiquityClient { #getCodecs, [], ), - returnValue: _i5.Future<_i2.CodecsData>.value(_FakeCodecsData_13( + returnValue: _i5.Future<_i2.CodecsData>.value(_FakeCodecsData_10( this, Invocation.method( #getCodecs, @@ -962,7 +845,7 @@ class MockSubiquityClient extends _i1.Mock implements _i4.SubiquityClient { [], {#wait: wait}, ), - returnValue: _i5.Future<_i2.RefreshStatus>.value(_FakeRefreshStatus_14( + returnValue: _i5.Future<_i2.RefreshStatus>.value(_FakeRefreshStatus_11( this, Invocation.method( #checkRefresh, @@ -994,7 +877,7 @@ class MockSubiquityClient extends _i1.Mock implements _i4.SubiquityClient { #getRefreshProgress, [changeId], ), - returnValue: _i5.Future<_i2.Change>.value(_FakeChange_15( + returnValue: _i5.Future<_i2.Change>.value(_FakeChange_12( this, Invocation.method( #getRefreshProgress, @@ -1019,7 +902,7 @@ class MockSubiquityClient extends _i1.Mock implements _i4.SubiquityClient { [], ), returnValue: - _i5.Future<_i2.AdConnectionInfo>.value(_FakeAdConnectionInfo_16( + _i5.Future<_i2.AdConnectionInfo>.value(_FakeAdConnectionInfo_13( this, Invocation.method( #getActiveDirectory, @@ -1130,7 +1013,7 @@ class MockSubiquityServer extends _i1.Mock implements _i7.SubiquityServer { @override _i3.Endpoint get endpoint => (super.noSuchMethod( Invocation.getter(#endpoint), - returnValue: _FakeEndpoint_17( + returnValue: _FakeEndpoint_14( this, Invocation.getter(#endpoint), ), @@ -1150,7 +1033,7 @@ class MockSubiquityServer extends _i1.Mock implements _i7.SubiquityServer { #environment: environment, }, ), - returnValue: _i5.Future<_i3.Endpoint>.value(_FakeEndpoint_17( + returnValue: _i5.Future<_i3.Endpoint>.value(_FakeEndpoint_14( this, Invocation.method( #start, From b146ac16a470086ac8c95201bbe7e30145e96c42 Mon Sep 17 00:00:00 2001 From: Dennis Loose Date: Fri, 6 Sep 2024 12:06:22 +0200 Subject: [PATCH 4/4] ci: remove snapcraft files for bootstrap We're deprecating the old rebase-flow for the installer and use dedicated branches for snap builds now (snap/ubuntu-desktop-bootstrap/*) --- .github/workflows/ci.yml | 10 - ci/snap/bootstrap/local/launcher | 46 --- .../local/postinst.d/10_configure_auto_login | 97 ------ .../local/postinst.d/10_copy_bluetooth_config | 11 - .../local/postinst.d/10_copy_network_config | 17 -- .../local/postinst.d/10_flash_kernel | 11 - .../postinst.d/10_override_desktop_settings | 28 -- .../bootstrap/local/postinst.d/50_zfs_cache | 36 --- .../local/postinst.d/99_telemetry_done | 23 -- ci/snap/bootstrap/local/subiquity-server | 31 -- .../local/ubuntu-desktop-bootstrap.desktop | 12 - ci/snap/bootstrap/snapcraft.yaml | 276 ------------------ ci/subiquity_integration | 28 -- 13 files changed, 626 deletions(-) delete mode 100755 ci/snap/bootstrap/local/launcher delete mode 100755 ci/snap/bootstrap/local/postinst.d/10_configure_auto_login delete mode 100755 ci/snap/bootstrap/local/postinst.d/10_copy_bluetooth_config delete mode 100755 ci/snap/bootstrap/local/postinst.d/10_copy_network_config delete mode 100755 ci/snap/bootstrap/local/postinst.d/10_flash_kernel delete mode 100755 ci/snap/bootstrap/local/postinst.d/10_override_desktop_settings delete mode 100755 ci/snap/bootstrap/local/postinst.d/50_zfs_cache delete mode 100755 ci/snap/bootstrap/local/postinst.d/99_telemetry_done delete mode 100755 ci/snap/bootstrap/local/subiquity-server delete mode 100644 ci/snap/bootstrap/local/ubuntu-desktop-bootstrap.desktop delete mode 100644 ci/snap/bootstrap/snapcraft.yaml delete mode 100755 ci/subiquity_integration diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index adfdc4155..c34dcd3fd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,16 +28,6 @@ jobs: - uses: bluefireteam/melos-action@v3 - run: melos analyze --fatal-infos - consistency-check: - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - - name: Check actual subiquity submodule sha matches expected - run: | - ci/subiquity_integration - bootstrap: runs-on: ubuntu-22.04 strategy: diff --git a/ci/snap/bootstrap/local/launcher b/ci/snap/bootstrap/local/launcher deleted file mode 100755 index 24fa8c3ca..000000000 --- a/ci/snap/bootstrap/local/launcher +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash - -source "$SNAP_USER_DATA/.last_revision" 2>/dev/null || true -if [ "$SNAP_DESKTOP_LAST_REVISION" = "$SNAP_REVISION" ]; then - needs_update=false -else - needs_update=true -fi - -if [ "$SNAP_ARCH" = "amd64" ]; then - ARCH="x86_64-linux-gnu" -elif [ "$SNAP_ARCH" = "armhf" ]; then - ARCH="arm-linux-gnueabihf" -elif [ "$SNAP_ARCH" = "arm64" ]; then - ARCH="aarch64-linux-gnu" -elif [ "$SNAP_ARCH" = "ppc64el" ]; then - ARCH="powerpc64le-linux-gnu" -else - ARCH="$SNAP_ARCH-linux-gnu" -fi - -# Set cache folder to local path -export XDG_CACHE_HOME="$SNAP_USER_COMMON/.cache" -[ -d "$XDG_CACHE_HOME" ] || mkdir -p "$XDG_CACHE_HOME" - -# Workaround for flickering corners and other graphical glitches with GTK's -# OpenGL backend for X11. See: -# - https://github.com/canonical/ubuntu-desktop-installer/issues/1397 -# - https://gitlab.gnome.org/GNOME/gtk/-/issues/5600 -export GDK_RENDERING=image - -export GDK_PIXBUF_MODULE_FILE="$XDG_CACHE_HOME/gdk-pixbuf-loaders.cache" -export GDK_PIXBUF_MODULEDIR="$SNAP/usr/lib/$ARCH/gdk-pixbuf-2.0/2.10.0/loaders" -if [ "$needs_update" = true ] || [ ! -f "$GDK_PIXBUF_MODULE_FILE" ]; then - rm -f "$GDK_PIXBUF_MODULE_FILE" - if [ -f "$SNAP/usr/lib/$ARCH/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders" ]; then - $SNAP/usr/lib/$ARCH/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders > "$GDK_PIXBUF_MODULE_FILE" - fi -fi - -[ "$needs_update" = true ] && echo "SNAP_DESKTOP_LAST_REVISION=$SNAP_REVISION" > "$SNAP_USER_DATA/.last_revision" - -# Disable storage automounting (/usr/lib/udisks2/udisks2-inhibit) -trap "sudo systemctl stop udisks2-inhibit.service" EXIT HUP INT QUIT ILL ABRT FPE KILL SEGV PIPE ALRM TERM BUS -sudo systemctl start udisks2-inhibit.service -"$@" diff --git a/ci/snap/bootstrap/local/postinst.d/10_configure_auto_login b/ci/snap/bootstrap/local/postinst.d/10_configure_auto_login deleted file mode 100755 index aab9c8d57..000000000 --- a/ci/snap/bootstrap/local/postinst.d/10_configure_auto_login +++ /dev/null @@ -1,97 +0,0 @@ -#!/bin/bash -set -e - -installer_conf=/tmp/bootstrap-postinst.conf - -if ! source $installer_conf 2>/dev/null || [ -z "$AutoLoginUser" ]; then - exit -fi - -USER=$AutoLoginUser -ROOT=/target -chroot=chroot -BACKUP= - -# Adapted from https://git.launchpad.net/ubiquity/tree/d-i/source/user-setup/user-setup-apply - -if [ -d "$ROOT/etc/gdm3" ]; then - # Configure GDM autologin - GDMCustomFile=$ROOT/etc/gdm3/custom.conf - if [ -e "$GDMCustomFile" ] && [ "$BACKUP" ]; then - cp "$GDMCustomFile" "${GDMCustomFile}$BACKUP" - fi - AutologinParameters="AutomaticLoginEnable=true\n\ -AutomaticLogin=$USER\n" - - # Prevent from updating if parameters already present (persistent usb key) - if ! `grep -qs "AutomaticLogin=$USER" $GDMCustomFile` ; then - if [ -e "$GDMCustomFile" ]; then - sed -i '/\(Automatic\)Login/d' $GDMCustomFile - fi - if ! `grep -qs '\[daemon\]' $GDMCustomFile` ; then - echo '[daemon]' >> $GDMCustomFile - fi - sed -i "s/\[daemon\]/\[daemon\]\n$AutologinParameters/" $GDMCustomFile - fi -fi - -if $chroot $ROOT [ -f /etc/kde4/kdm/kdmrc ]; then - # Configure KDM autologin - $chroot $ROOT sed -i$BACKUP -r \ - -e "s/^#?AutoLoginEnable=.*\$/AutoLoginEnable=true/" \ - -e "s/^#?AutoLoginUser=.*\$/AutoLoginUser=$USER/" \ - -e "s/^#?AutoReLogin=.*\$/AutoReLogin=true/" \ - /etc/kde4/kdm/kdmrc -fi - -if $chroot $ROOT [ -f /etc/lxdm/lxdm.conf ]; then - # Configure LXDM autologin with LXDE session - $chroot $ROOT sed -i$BACKUP -r \ - -e "s/^# autologin=dgod/autologin=$USER/" \ - -e "s/^# session/session/" \ - /etc/lxdm/lxdm.conf -fi - -if $chroot $ROOT [ -f /etc/xdg/lubuntu/lxdm/lxdm.conf ]; then - # Configure LXDM autologin with Lubuntu session - $chroot $ROOT sed -i$BACKUP -r \ - -e "s/^# autologin=dgod/autologin=$USER/" \ - -e "s/^# session/session/" \ - -e "s/startlxde/startlubuntu/" \ - /etc/xdg/lubuntu/lxdm/lxdm.conf -fi - -if $chroot $ROOT [ -f /usr/bin/sddm ]; then - # Configure SDDM autologin with an appropiate session - $chroot $ROOT /bin/sh -c "cat > /etc/sddm.conf" << EOF -[Autologin] -User=$USER -Session=PLACEHOLDER -EOF - if $chroot $ROOT [ -f /usr/share/xsessions/plasma.desktop ]; then - sed -i 's/PLACEHOLDER/plasma.desktop/' $ROOT/etc/sddm.conf - elif $chroot $ROOT [ -f /usr/share/xsessions/Lubuntu.desktop ]; then - sed -i 's/PLACEHOLDER/Lubuntu.desktop/' $ROOT/etc/sddm.conf - elif $chroot $ROOT [ -f /usr/share/xsessions/lxqt.desktop ]; then - sed -i 's/PLACEHOLDER/lxqt.desktop/' $ROOT/etc/sddm.conf - else #fallback if some other DE/WM is used - SDDMSESSION=$(ls /usr/share/xsessions | head -1) - sed -i "s/PLACEHOLDER/$SDDMSESSION/" $ROOT/etc/sddm.conf - fi -fi -if $chroot $ROOT [ -d /etc/lightdm ]; then - # Configure LightDM autologin - LightDMCustomFile=$ROOT/etc/lightdm/lightdm.conf - AutologinParameters="autologin-guest=false\n\ -autologin-user=$USER\n\ -autologin-user-timeout=0" - if ! grep -qs '^autologin-user' $LightDMCustomFile; then - if ! grep -qs '^\[Seat:\*\]' $LightDMCustomFile; then - echo '[Seat:*]' >> $LightDMCustomFile - fi - sed -i "s/\[Seat:\*\]/\[Seat:\*\]\n$AutologinParameters/" $LightDMCustomFile - #oem config scenario - else - sed -i "s/^\(\(str *\)\?autologin-user\)=.*$/\1=$USER/g;" $ROOT/etc/lightdm/lightdm.conf - fi -fi diff --git a/ci/snap/bootstrap/local/postinst.d/10_copy_bluetooth_config b/ci/snap/bootstrap/local/postinst.d/10_copy_bluetooth_config deleted file mode 100755 index fef1ba072..000000000 --- a/ci/snap/bootstrap/local/postinst.d/10_copy_bluetooth_config +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -set -e - -target=/target -source_bluetooth=/var/lib/bluetooth -target_bluetooth=$target/$source_bluetooth - -if [ -d $source_bluetooth ]; then - rm -rf $target_bluetooth - cp -a $source_bluetooth $target_bluetooth -fi diff --git a/ci/snap/bootstrap/local/postinst.d/10_copy_network_config b/ci/snap/bootstrap/local/postinst.d/10_copy_network_config deleted file mode 100755 index 7bb414b4e..000000000 --- a/ci/snap/bootstrap/local/postinst.d/10_copy_network_config +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh -set -e - -target=/target -source_nm=/etc/NetworkManager/system-connections -target_nm=$target/$source_nm - -if [ -d $source_nm ] && [ -d $target_nm ]; then - cp -anr $source_nm/. $target_nm -fi - -source_netplan=/etc/netplan -target_netplan=$target/$source_netplan - -if [ -d $source_netplan ] && [ -d $target_netplan ]; then - cp -anr $source_netplan/90-NM-* $target_netplan -fi diff --git a/ci/snap/bootstrap/local/postinst.d/10_flash_kernel b/ci/snap/bootstrap/local/postinst.d/10_flash_kernel deleted file mode 100755 index a17a791c7..000000000 --- a/ci/snap/bootstrap/local/postinst.d/10_flash_kernel +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -set -e -# Currently curtin doesn't call flash-kernel after installing kernel -# and generating initrd, but we need it on arm64 -# and we need to update-grub after flash-kernel installed dtb -if [ -e /target/usr/sbin/flash-kernel ]; then - FK_FORCE=yes $SNAP/bin/subiquity/bin/subiquity-cmd curtin in-target -t /target -- flash-kernel -fi -if [ -e /target/usr/sbin/update-grub ]; then - $SNAP/bin/subiquity/bin/subiquity-cmd curtin in-target -t /target -- update-grub -fi diff --git a/ci/snap/bootstrap/local/postinst.d/10_override_desktop_settings b/ci/snap/bootstrap/local/postinst.d/10_override_desktop_settings deleted file mode 100755 index 1623dfd59..000000000 --- a/ci/snap/bootstrap/local/postinst.d/10_override_desktop_settings +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh -set -e - -user=ubuntu -target=/target -source_schemas=/usr/share/glib-2.0/schemas -target_schemas=$target/$source_schemas - -if [ ! -d $source_schemas ] || [ ! -d $target_schemas ] || ! id $user >/dev/null 2>&1; then - exit -fi - -dconf_dump() { - target_schema=$target_schemas/20_ubuntu-desktop-installer-$1.gschema.override - sudo -u $user dconf dump /org/gnome/desktop/$1/ > $target_schema - # - [foo] -> [org.gnome.desktop.$1.foo:ubuntu] - sed -i -E "s/^\[([^/]*)\]/\[org.gnome.desktop.$1.\1:ubuntu\]/g" $target_schema - # - [/] -> [org.gnome.desktop.$1:ubuntu] - sed -i -E "s/^\[\/\]$/\[org.gnome.desktop.$1:ubuntu\]/g" $target_schema - [ -s $target_schema ] || rm $target_schema -} - -dconf_dump a11y -dconf_dump interface -dconf_dump peripherals -dconf_dump wm - -glib-compile-schemas $target_schemas diff --git a/ci/snap/bootstrap/local/postinst.d/50_zfs_cache b/ci/snap/bootstrap/local/postinst.d/50_zfs_cache deleted file mode 100755 index 653413f99..000000000 --- a/ci/snap/bootstrap/local/postinst.d/50_zfs_cache +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash - -# Provide a workaround so that ubuntu-desktop-installer does not -# recreate LP: #1993318 - -TARGET=/target - -for pool in $(zpool list -H | cut -f1); do - zpool set cachefile= "${pool}" - if [ ! -d "/etc/zfs/zfs-list.cache" ] ; then - mkdir -p "/etc/zfs/zfs-list.cache" - fi - if [ ! -d "${TARGET}/etc/zfs/zfs-list.cache" ] ; then - mkdir -p "${TARGET}/etc/zfs/zfs-list.cache" - fi - # Force cache generation - : >"/etc/zfs/zfs-list.cache/${pool}" - # Execute zfs-list-cacher with a manual fake event - env -i \ - ZEVENT_POOL=${pool} \ - ZED_ZEDLET_DIR=/etc/zfs/zed.d \ - ZEVENT_SUBCLASS=history_event \ - ZFS=zfs \ - ZEVENT_HISTORY_INTERNAL_NAME=create \ - /etc/zfs/zed.d/history_event-zfs-list-cacher.sh - # ZFS list doesn't honor target prefix for chroots for - # the mountpoint property - # https://github.com/openzfs/zfs/issues/1078 - # Drop leading /target from all mountpoint fields - sed -E "s|\t${TARGET}/?|\t/|g" "/etc/zfs/zfs-list.cache/${pool}" \ - > "${TARGET}/etc/zfs/zfs-list.cache/${pool}" - # Ensure installer system doesn't generate mount units - rm -f "/etc/zfs/zfs-list.cache/${pool}" -done - - diff --git a/ci/snap/bootstrap/local/postinst.d/99_telemetry_done b/ci/snap/bootstrap/local/postinst.d/99_telemetry_done deleted file mode 100755 index 37345a09b..000000000 --- a/ci/snap/bootstrap/local/postinst.d/99_telemetry_done +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh - -telemetry=/var/log/installer/telemetry - -if [ ! -f $telemetry ]; then - exit -fi - -current_time=$(date +%s) -created_at=$(stat --format %W $telemetry) -duration=$(($current_time - $created_at)) - -# { -# ... -# "Stages": { -# "0": "welcome", -# ... -# "1234": "done" // <== -# } -# } - -jq ".Stages.\"$duration\"=\"done\"" $telemetry > $telemetry.tmp -mv $telemetry.tmp $telemetry diff --git a/ci/snap/bootstrap/local/subiquity-server b/ci/snap/bootstrap/local/subiquity-server deleted file mode 100755 index a15a47bd4..000000000 --- a/ci/snap/bootstrap/local/subiquity-server +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash - -# store current script directories -SCRIPT_DIR=`dirname $0` - -# configure python environment -export PYTHONIOENCODING=utf-8 -PYTHONPATH=$SNAP/usr/lib/python3/site-packages:$PYTHONPATH -PYTHONPATH=$SNAP/usr/lib/python3/dist-packages:$PYTHONPATH -PYTHONPATH=$SNAP/lib/python3.10/site-packages:$PYTHONPATH -export PYTHONPATH -export PYTHON=$SNAP/usr/bin/python3.10 - -# ensure curtin points at PYTHON -export PY3OR2_PYTHON=$PYTHON - -# set the PATH so subiquity finds curtin -# sbin for bundled tools such as ntfsresize -export PATH=$SNAP/bin:$SNAP/sbin:$PATH - -# allow subiquity to run setxkbmap -export DISPLAY=:0 - -# base directory for subiquity to locate resources -export SUBIQUITY_ROOT=$SNAP/bin/subiquity - -# run subiquity server -cd $SCRIPT_DIR/subiquity - -args=(--use-os-prober --storage-version=2 --postinst-hooks-dir=$SNAP/etc/subiquity/postinst.d) -$PYTHON -m subiquity.cmd.server "${args[@]}" diff --git a/ci/snap/bootstrap/local/ubuntu-desktop-bootstrap.desktop b/ci/snap/bootstrap/local/ubuntu-desktop-bootstrap.desktop deleted file mode 100644 index 88ec4ecc0..000000000 --- a/ci/snap/bootstrap/local/ubuntu-desktop-bootstrap.desktop +++ /dev/null @@ -1,12 +0,0 @@ -[Desktop Entry] -Type=Application -Version=1.0 -# Do not translate the word "RELEASE". It is used as a marker by casper. -Name=Install RELEASE -Comment=Install this system permanently to your hard disk -Keywords=ubiquity; -#use sh because pkexec is broken under xfce/lxce http://pad.lv/1193526 -Exec=ubuntu-desktop-bootstrap -Icon=ubiquity -Terminal=false -Categories=GTK;System;Settings; diff --git a/ci/snap/bootstrap/snapcraft.yaml b/ci/snap/bootstrap/snapcraft.yaml deleted file mode 100644 index ffba4c8eb..000000000 --- a/ci/snap/bootstrap/snapcraft.yaml +++ /dev/null @@ -1,276 +0,0 @@ -name: ubuntu-desktop-bootstrap -version: git -summary: Ubuntu Desktop Bootstrap -description: | - A modern implementation of the Ubuntu Desktop installer. - It comprises a Flutter-based UI and uses subiquity as the backend. -contact: https://bugs.launchpad.net/ubuntu-desktop-provision -issues: https://bugs.launchpad.net/ubuntu-desktop-provision -grade: stable -confinement: classic -base: core22 -architectures: - - build-on: amd64 - - build-on: arm64 - -apps: - subiquity-server: - command: bin/subiquity-server - daemon: simple - restart-condition: always - environment: - PATH_ORIG: $PATH - PYTHONPATH_ORIG: $PYTHONPATH - LD_LIBRARY_PATH_ORIG: $LD_LIBRARY_PATH - - subiquity-loadkeys: - command: bin/subiquity/bin/subiquity-loadkeys - - ubuntu-desktop-bootstrap: - command: bin/ubuntu_bootstrap - command-chain: [bin/launcher] - desktop: usr/share/applications/ubuntu-desktop-bootstrap.desktop - environment: - PATH: $SNAP/usr/bin:$SNAP/bin:$PATH - LIBGL_DRIVERS_PATH: $SNAP/usr/lib/$CRAFT_ARCH_TRIPLET/dri - GIO_MODULE_DIR: $SNAP/usr/lib/$CRAFT_ARCH_TRIPLET/gio/modules - LIVE_RUN: 1 - LOG_LEVEL: debug - SNAP_PYTHON: python3 - - probert: - command: bin/probert - - os-prober: - command: usr/bin/os-prober - -parts: - curtin: - plugin: nil - source: https://git.launchpad.net/curtin - source-type: git - source-commit: 7fbc96a413ed4a85370edbdb4e7bfa456c350346 - override-pull: | - craftctl default - PACKAGED_VERSION="$(git describe --long --abbrev=9 --match=[0-9][0-9]*)" - sed -e "s,@@PACKAGED_VERSION@@,$PACKAGED_VERSION,g" -i curtin/version.py - override-build: &pyinstall | - # We install without dependencies because all dependencies come from - # archive packages. - # XXX: On core22, running `pip3 install --prefix xxx` does not do the - # right thing. The package ends up installed in xxx/local and the modules - # get installed to dist-packages instead of site-packages. - # See https://discuss.python.org/t/18240 - # As a workaround, we use a fake user install to get the package - # installed in the expected place. - PYTHONUSERBASE="$CRAFT_PART_INSTALL" pip3 install --user --no-dependencies . - build-packages: - - python3-pip - organize: - lib/python*/site-packages/usr/lib/curtin: usr/lib/ - - probert: - plugin: nil - source: https://github.com/canonical/probert.git - source-type: git - source-commit: f34ae3c3f942a9c479fe928911053a302e146251 - override-build: *pyinstall - build-packages: - - build-essential - - libnl-3-dev - - libnl-genl-3-dev - - libnl-route-3-dev - - pkg-config - - python3-dev - - python3-pip - build-attributes: [enable-patchelf] - stage: - - "*" - - -bin/python3* - - subiquitydeps: - plugin: nil - build-attributes: [enable-patchelf] - stage-packages: - # This list includes the dependencies for curtin and probert as well, - # there doesn't seem to be any real benefit to listing them separately. - - cloud-init - - dctrl-tools - - iso-codes - - libpython3-stdlib - - libpython3.10-minimal - - libpython3.10-stdlib - - libsystemd0 - - lsb-release - - ntfs-3g - - python3-aiohttp - - python3-apport - - python3-attr - - python3-bson - - python3-debian - - python3-distro-info - - python3-jsonschema - - python3-minimal - - python3-oauthlib - - python3-pkg-resources - - python3-pyroute2 - - python3-pyrsistent - - python3-pyudev - - python3-requests - - python3-requests-unixsocket - - python3-systemd - - python3-urwid - - python3-yaml - - python3-yarl - - python3.10-minimal - - ssh-import-id - - ubuntu-advantage-tools - # WSL specifics: - - language-selector-common - - locales - prime: - - -lib/systemd/system/* - - flutter-git: - plugin: nil - source: . - override-pull: | - # necessary when reruns using the same container - if [ -d "flutter" ]; then - rm -rf "flutter" - fi - - craftctl default - FLUTTER_VERSION=$(sed -n "s/^flutter \([0-9.]\+\).*/\1/p" .tool-versions) - git clone -b $FLUTTER_VERSION --depth 1 https://github.com/flutter/flutter.git - override-build: | - mkdir -p $CRAFT_PART_INSTALL/usr/bin - mkdir -p $CRAFT_PART_INSTALL/usr/libexec - cp -r $CRAFT_PART_SRC/flutter $CRAFT_PART_INSTALL/usr/libexec/flutter - ln -s $CRAFT_PART_INSTALL/usr/libexec/flutter/bin/flutter $CRAFT_PART_INSTALL/usr/bin/flutter - ln -s $CRAFT_PART_INSTALL/usr/libexec/flutter/bin/dart $CRAFT_PART_INSTALL/usr/bin/dart - $CRAFT_PART_INSTALL/usr/bin/flutter doctor - build-packages: - - clang - - cmake - - curl - - libgtk-3-dev - - ninja-build - - unzip - - xz-utils - - zip - override-prime: "" - - ubuntu-bootstrap: - after: [flutter-git] - plugin: nil - source: . - source-type: git - build-attributes: [enable-patchelf] - override-build: | - set -eux - mkdir -p $CRAFT_PART_INSTALL/bin/lib - cp snap/local/launcher $CRAFT_PART_INSTALL/bin/ - cp snap/local/subiquity-server $CRAFT_PART_INSTALL/bin/ - cp -r packages/subiquity_client/subiquity $CRAFT_PART_INSTALL/bin/ - mkdir -p $CRAFT_PART_INSTALL/etc/subiquity - cp -r snap/local/postinst.d $CRAFT_PART_INSTALL/etc/subiquity - mkdir -p $CRAFT_PART_INSTALL/usr/share/applications - cp snap/local/ubuntu-desktop-bootstrap.desktop $CRAFT_PART_INSTALL/usr/share/applications/ - - dart pub global activate melos - dart pub global run melos bootstrap - cd packages/ubuntu_bootstrap - flutter build linux --release -v - cp -r build/linux/*/release/bundle/* $CRAFT_PART_INSTALL/bin/ - - libraries: - plugin: nil - build-attributes: [enable-patchelf] - stage-packages: - - libatk1.0-0 - - libcairo-gobject2 - - libcairo2 - - libegl-mesa0 - - libegl1 - # Needed for the dri drivers see https://github.com/canonical/ubuntu-desktop-installer/issues/2391 - - libelf1 - - libgl1 - - libglib2.0-0 - - libglib2.0-dev - - libgtk-3-0 - - libpango-1.0-0 - - libpangocairo-1.0-0 - - libpng16-16 - - libwayland-egl1 - - libx11-6 - - libdatrie1 - - libdrm2 - - libgbm1 - - libglapi-mesa - - libgraphite2-3 - - libxshmfence1 - - libpciaccess0 - - libvulkan1 - - shared-mime-info - - libglib2.0-bin - - libibus-1.0-5 - prime: - - usr/lib/*/libEGL*.so.* - - usr/lib/*/libGL*.so.* - - usr/lib/*/libX*.so.* - - usr/lib/*/liba*.so.* - - usr/lib/*/libcairo*.so.* - - usr/lib/*/libe*.so.* - - usr/lib/*/libf*.so.* - - usr/lib/*/libg*.so.* - - usr/lib/*/libharfbuzz*.so.* - - usr/lib/*/libibus*.so.* - - usr/lib/*/libpango*.so.* - - usr/lib/*/libpixman*.so.* - - usr/lib/*/libpng*.so.* - - usr/lib/*/libthai*.so.* - - usr/lib/*/libwayland*.so.* - - usr/lib/*/libxcb*.so.* - - usr/lib/*/libxkb*.so.* - - usr/lib/*/libdatrie*.so.* - - usr/lib/*/libdrm*.so.* - - usr/lib/*/libgbm*.so.* - - usr/lib/*/libglapi*.so.* - - usr/lib/*/libgraphite2*.so.* - - usr/lib/*/libxshmfence*.so.* - - usr/lib/*/libpciaccess*.so.* - - usr/lib/*/libsensors*.so.* - - usr/lib/*/libvulkan*.so.* - - usr/share/glvnd/egl_vendor.d - - usr/lib/*/gdk-pixbuf-2.0 - - usr/lib/*/ - - usr/bin/update-mime-database - - usr/bin/g* - - usr/share/mime - - -usr/lib/*/pkgconfig - - -usr/lib/pkgconfig - - -usr/share/pkgconfig - - dri-no-patchelf: - after: [libraries] - plugin: nil - stage-packages: - - libgl1-mesa-dri - build-attributes: - - no-patchelf # Otherwise snapcraft may strip the build ID and cause the driver to crash - stage: - - usr/lib/${CRAFT_ARCH_TRIPLET}/dri - - usr/share/drirc.d - - os-prober: - plugin: nil - stage-packages: [os-prober] - build-attributes: [enable-patchelf] - override-stage: | - craftctl default - for file in $(grep -lr /usr | grep 'usr/[^/]*/[^/]*-probe[sr]'); do - sed -i 's, \(/usr\), $SNAP\1,' $file - done - sed -i 's/mkdir "$tmpmnt"/mkdir -p "$tmpmnt"/' \ - usr/lib/os-probes/50mounted-tests diff --git a/ci/subiquity_integration b/ci/subiquity_integration deleted file mode 100755 index cf6367f40..000000000 --- a/ci/subiquity_integration +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env python3 - -# consistency checks between ubuntu-desktop-bootstrap and subiquity - -import unittest -import yaml - - -class Tests(unittest.TestCase): - def test_depends(self): - with open("ci/snap/bootstrap/snapcraft.yaml", "r") as udi_snapcraft: - udi_data = yaml.safe_load(udi_snapcraft) - - with open( - "packages/subiquity_client/subiquity/snapcraft.yaml", "r" - ) as subiquity_snapcraft: - subiquity_data = yaml.safe_load(subiquity_snapcraft) - - for part in ("probert", "curtin"): - self.assertEqual( - udi_data["parts"][part]["source-commit"], - subiquity_data["parts"][part]["source-commit"], - f"comparison of {part}", - ) - - -if __name__ == "__main__": - unittest.main()