323 lines
16 KiB
Dart
323 lines
16 KiB
Dart
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
// coverage:ignore-file
|
|
// ignore_for_file: type=lint
|
|
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
|
|
|
part of 'service.dart';
|
|
|
|
// **************************************************************************
|
|
// FreezedGenerator
|
|
// **************************************************************************
|
|
|
|
// dart format off
|
|
T _$identity<T>(T value) => value;
|
|
|
|
/// @nodoc
|
|
mixin _$Service {
|
|
|
|
String get id; String get name;@JsonKey(name: 'compose_file') String get composeFile;@JsonKey(name: 'compose_type') String? get composeType;@JsonKey(name: 'backup_folder') String? get backupFolder; String get status;@JsonKey(name: 'stop_on_backup') bool get stopOnBackup;@JsonKey(name: 'external_backup_stop_minutes') int get externalBackupStopMinutes;@JsonKey(name: 'external_backup_start_minutes') int get externalBackupStartMinutes; BackupConfig? get backup;
|
|
/// Create a copy of Service
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
$ServiceCopyWith<Service> get copyWith => _$ServiceCopyWithImpl<Service>(this as Service, _$identity);
|
|
|
|
/// Serializes this Service to a JSON map.
|
|
Map<String, dynamic> toJson();
|
|
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is Service&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.composeFile, composeFile) || other.composeFile == composeFile)&&(identical(other.composeType, composeType) || other.composeType == composeType)&&(identical(other.backupFolder, backupFolder) || other.backupFolder == backupFolder)&&(identical(other.status, status) || other.status == status)&&(identical(other.stopOnBackup, stopOnBackup) || other.stopOnBackup == stopOnBackup)&&(identical(other.externalBackupStopMinutes, externalBackupStopMinutes) || other.externalBackupStopMinutes == externalBackupStopMinutes)&&(identical(other.externalBackupStartMinutes, externalBackupStartMinutes) || other.externalBackupStartMinutes == externalBackupStartMinutes)&&(identical(other.backup, backup) || other.backup == backup));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType,id,name,composeFile,composeType,backupFolder,status,stopOnBackup,externalBackupStopMinutes,externalBackupStartMinutes,backup);
|
|
|
|
@override
|
|
String toString() {
|
|
return 'Service(id: $id, name: $name, composeFile: $composeFile, composeType: $composeType, backupFolder: $backupFolder, status: $status, stopOnBackup: $stopOnBackup, externalBackupStopMinutes: $externalBackupStopMinutes, externalBackupStartMinutes: $externalBackupStartMinutes, backup: $backup)';
|
|
}
|
|
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class $ServiceCopyWith<$Res> {
|
|
factory $ServiceCopyWith(Service value, $Res Function(Service) _then) = _$ServiceCopyWithImpl;
|
|
@useResult
|
|
$Res call({
|
|
String id, String name,@JsonKey(name: 'compose_file') String composeFile,@JsonKey(name: 'compose_type') String? composeType,@JsonKey(name: 'backup_folder') String? backupFolder, String status,@JsonKey(name: 'stop_on_backup') bool stopOnBackup,@JsonKey(name: 'external_backup_stop_minutes') int externalBackupStopMinutes,@JsonKey(name: 'external_backup_start_minutes') int externalBackupStartMinutes, BackupConfig? backup
|
|
});
|
|
|
|
|
|
$BackupConfigCopyWith<$Res>? get backup;
|
|
|
|
}
|
|
/// @nodoc
|
|
class _$ServiceCopyWithImpl<$Res>
|
|
implements $ServiceCopyWith<$Res> {
|
|
_$ServiceCopyWithImpl(this._self, this._then);
|
|
|
|
final Service _self;
|
|
final $Res Function(Service) _then;
|
|
|
|
/// Create a copy of Service
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? name = null,Object? composeFile = null,Object? composeType = freezed,Object? backupFolder = freezed,Object? status = null,Object? stopOnBackup = null,Object? externalBackupStopMinutes = null,Object? externalBackupStartMinutes = null,Object? backup = freezed,}) {
|
|
return _then(_self.copyWith(
|
|
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
|
as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
|
as String,composeFile: null == composeFile ? _self.composeFile : composeFile // ignore: cast_nullable_to_non_nullable
|
|
as String,composeType: freezed == composeType ? _self.composeType : composeType // ignore: cast_nullable_to_non_nullable
|
|
as String?,backupFolder: freezed == backupFolder ? _self.backupFolder : backupFolder // ignore: cast_nullable_to_non_nullable
|
|
as String?,status: null == status ? _self.status : status // ignore: cast_nullable_to_non_nullable
|
|
as String,stopOnBackup: null == stopOnBackup ? _self.stopOnBackup : stopOnBackup // ignore: cast_nullable_to_non_nullable
|
|
as bool,externalBackupStopMinutes: null == externalBackupStopMinutes ? _self.externalBackupStopMinutes : externalBackupStopMinutes // ignore: cast_nullable_to_non_nullable
|
|
as int,externalBackupStartMinutes: null == externalBackupStartMinutes ? _self.externalBackupStartMinutes : externalBackupStartMinutes // ignore: cast_nullable_to_non_nullable
|
|
as int,backup: freezed == backup ? _self.backup : backup // ignore: cast_nullable_to_non_nullable
|
|
as BackupConfig?,
|
|
));
|
|
}
|
|
/// Create a copy of Service
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
$BackupConfigCopyWith<$Res>? get backup {
|
|
if (_self.backup == null) {
|
|
return null;
|
|
}
|
|
|
|
return $BackupConfigCopyWith<$Res>(_self.backup!, (value) {
|
|
return _then(_self.copyWith(backup: value));
|
|
});
|
|
}
|
|
}
|
|
|
|
|
|
/// Adds pattern-matching-related methods to [Service].
|
|
extension ServicePatterns on Service {
|
|
/// A variant of `map` that fallback to returning `orElse`.
|
|
///
|
|
/// It is equivalent to doing:
|
|
/// ```dart
|
|
/// switch (sealedClass) {
|
|
/// case final Subclass value:
|
|
/// return ...;
|
|
/// case _:
|
|
/// return orElse();
|
|
/// }
|
|
/// ```
|
|
|
|
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _Service value)? $default,{required TResult orElse(),}){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _Service() when $default != null:
|
|
return $default(_that);case _:
|
|
return orElse();
|
|
|
|
}
|
|
}
|
|
/// A `switch`-like method, using callbacks.
|
|
///
|
|
/// Callbacks receives the raw object, upcasted.
|
|
/// It is equivalent to doing:
|
|
/// ```dart
|
|
/// switch (sealedClass) {
|
|
/// case final Subclass value:
|
|
/// return ...;
|
|
/// case final Subclass2 value:
|
|
/// return ...;
|
|
/// }
|
|
/// ```
|
|
|
|
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _Service value) $default,){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _Service():
|
|
return $default(_that);}
|
|
}
|
|
/// A variant of `map` that fallback to returning `null`.
|
|
///
|
|
/// It is equivalent to doing:
|
|
/// ```dart
|
|
/// switch (sealedClass) {
|
|
/// case final Subclass value:
|
|
/// return ...;
|
|
/// case _:
|
|
/// return null;
|
|
/// }
|
|
/// ```
|
|
|
|
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _Service value)? $default,){
|
|
final _that = this;
|
|
switch (_that) {
|
|
case _Service() when $default != null:
|
|
return $default(_that);case _:
|
|
return null;
|
|
|
|
}
|
|
}
|
|
/// A variant of `when` that fallback to an `orElse` callback.
|
|
///
|
|
/// It is equivalent to doing:
|
|
/// ```dart
|
|
/// switch (sealedClass) {
|
|
/// case Subclass(:final field):
|
|
/// return ...;
|
|
/// case _:
|
|
/// return orElse();
|
|
/// }
|
|
/// ```
|
|
|
|
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String id, String name, @JsonKey(name: 'compose_file') String composeFile, @JsonKey(name: 'compose_type') String? composeType, @JsonKey(name: 'backup_folder') String? backupFolder, String status, @JsonKey(name: 'stop_on_backup') bool stopOnBackup, @JsonKey(name: 'external_backup_stop_minutes') int externalBackupStopMinutes, @JsonKey(name: 'external_backup_start_minutes') int externalBackupStartMinutes, BackupConfig? backup)? $default,{required TResult orElse(),}) {final _that = this;
|
|
switch (_that) {
|
|
case _Service() when $default != null:
|
|
return $default(_that.id,_that.name,_that.composeFile,_that.composeType,_that.backupFolder,_that.status,_that.stopOnBackup,_that.externalBackupStopMinutes,_that.externalBackupStartMinutes,_that.backup);case _:
|
|
return orElse();
|
|
|
|
}
|
|
}
|
|
/// A `switch`-like method, using callbacks.
|
|
///
|
|
/// As opposed to `map`, this offers destructuring.
|
|
/// It is equivalent to doing:
|
|
/// ```dart
|
|
/// switch (sealedClass) {
|
|
/// case Subclass(:final field):
|
|
/// return ...;
|
|
/// case Subclass2(:final field2):
|
|
/// return ...;
|
|
/// }
|
|
/// ```
|
|
|
|
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String id, String name, @JsonKey(name: 'compose_file') String composeFile, @JsonKey(name: 'compose_type') String? composeType, @JsonKey(name: 'backup_folder') String? backupFolder, String status, @JsonKey(name: 'stop_on_backup') bool stopOnBackup, @JsonKey(name: 'external_backup_stop_minutes') int externalBackupStopMinutes, @JsonKey(name: 'external_backup_start_minutes') int externalBackupStartMinutes, BackupConfig? backup) $default,) {final _that = this;
|
|
switch (_that) {
|
|
case _Service():
|
|
return $default(_that.id,_that.name,_that.composeFile,_that.composeType,_that.backupFolder,_that.status,_that.stopOnBackup,_that.externalBackupStopMinutes,_that.externalBackupStartMinutes,_that.backup);}
|
|
}
|
|
/// A variant of `when` that fallback to returning `null`
|
|
///
|
|
/// It is equivalent to doing:
|
|
/// ```dart
|
|
/// switch (sealedClass) {
|
|
/// case Subclass(:final field):
|
|
/// return ...;
|
|
/// case _:
|
|
/// return null;
|
|
/// }
|
|
/// ```
|
|
|
|
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String id, String name, @JsonKey(name: 'compose_file') String composeFile, @JsonKey(name: 'compose_type') String? composeType, @JsonKey(name: 'backup_folder') String? backupFolder, String status, @JsonKey(name: 'stop_on_backup') bool stopOnBackup, @JsonKey(name: 'external_backup_stop_minutes') int externalBackupStopMinutes, @JsonKey(name: 'external_backup_start_minutes') int externalBackupStartMinutes, BackupConfig? backup)? $default,) {final _that = this;
|
|
switch (_that) {
|
|
case _Service() when $default != null:
|
|
return $default(_that.id,_that.name,_that.composeFile,_that.composeType,_that.backupFolder,_that.status,_that.stopOnBackup,_that.externalBackupStopMinutes,_that.externalBackupStartMinutes,_that.backup);case _:
|
|
return null;
|
|
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
@JsonSerializable()
|
|
|
|
class _Service implements Service {
|
|
const _Service({this.id = '', required this.name, @JsonKey(name: 'compose_file') required this.composeFile, @JsonKey(name: 'compose_type') this.composeType, @JsonKey(name: 'backup_folder') this.backupFolder, this.status = 'unknown', @JsonKey(name: 'stop_on_backup') this.stopOnBackup = false, @JsonKey(name: 'external_backup_stop_minutes') this.externalBackupStopMinutes = 0, @JsonKey(name: 'external_backup_start_minutes') this.externalBackupStartMinutes = 0, this.backup});
|
|
factory _Service.fromJson(Map<String, dynamic> json) => _$ServiceFromJson(json);
|
|
|
|
@override@JsonKey() final String id;
|
|
@override final String name;
|
|
@override@JsonKey(name: 'compose_file') final String composeFile;
|
|
@override@JsonKey(name: 'compose_type') final String? composeType;
|
|
@override@JsonKey(name: 'backup_folder') final String? backupFolder;
|
|
@override@JsonKey() final String status;
|
|
@override@JsonKey(name: 'stop_on_backup') final bool stopOnBackup;
|
|
@override@JsonKey(name: 'external_backup_stop_minutes') final int externalBackupStopMinutes;
|
|
@override@JsonKey(name: 'external_backup_start_minutes') final int externalBackupStartMinutes;
|
|
@override final BackupConfig? backup;
|
|
|
|
/// Create a copy of Service
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
|
@pragma('vm:prefer-inline')
|
|
_$ServiceCopyWith<_Service> get copyWith => __$ServiceCopyWithImpl<_Service>(this, _$identity);
|
|
|
|
@override
|
|
Map<String, dynamic> toJson() {
|
|
return _$ServiceToJson(this, );
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _Service&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.composeFile, composeFile) || other.composeFile == composeFile)&&(identical(other.composeType, composeType) || other.composeType == composeType)&&(identical(other.backupFolder, backupFolder) || other.backupFolder == backupFolder)&&(identical(other.status, status) || other.status == status)&&(identical(other.stopOnBackup, stopOnBackup) || other.stopOnBackup == stopOnBackup)&&(identical(other.externalBackupStopMinutes, externalBackupStopMinutes) || other.externalBackupStopMinutes == externalBackupStopMinutes)&&(identical(other.externalBackupStartMinutes, externalBackupStartMinutes) || other.externalBackupStartMinutes == externalBackupStartMinutes)&&(identical(other.backup, backup) || other.backup == backup));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType,id,name,composeFile,composeType,backupFolder,status,stopOnBackup,externalBackupStopMinutes,externalBackupStartMinutes,backup);
|
|
|
|
@override
|
|
String toString() {
|
|
return 'Service(id: $id, name: $name, composeFile: $composeFile, composeType: $composeType, backupFolder: $backupFolder, status: $status, stopOnBackup: $stopOnBackup, externalBackupStopMinutes: $externalBackupStopMinutes, externalBackupStartMinutes: $externalBackupStartMinutes, backup: $backup)';
|
|
}
|
|
|
|
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract mixin class _$ServiceCopyWith<$Res> implements $ServiceCopyWith<$Res> {
|
|
factory _$ServiceCopyWith(_Service value, $Res Function(_Service) _then) = __$ServiceCopyWithImpl;
|
|
@override @useResult
|
|
$Res call({
|
|
String id, String name,@JsonKey(name: 'compose_file') String composeFile,@JsonKey(name: 'compose_type') String? composeType,@JsonKey(name: 'backup_folder') String? backupFolder, String status,@JsonKey(name: 'stop_on_backup') bool stopOnBackup,@JsonKey(name: 'external_backup_stop_minutes') int externalBackupStopMinutes,@JsonKey(name: 'external_backup_start_minutes') int externalBackupStartMinutes, BackupConfig? backup
|
|
});
|
|
|
|
|
|
@override $BackupConfigCopyWith<$Res>? get backup;
|
|
|
|
}
|
|
/// @nodoc
|
|
class __$ServiceCopyWithImpl<$Res>
|
|
implements _$ServiceCopyWith<$Res> {
|
|
__$ServiceCopyWithImpl(this._self, this._then);
|
|
|
|
final _Service _self;
|
|
final $Res Function(_Service) _then;
|
|
|
|
/// Create a copy of Service
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? name = null,Object? composeFile = null,Object? composeType = freezed,Object? backupFolder = freezed,Object? status = null,Object? stopOnBackup = null,Object? externalBackupStopMinutes = null,Object? externalBackupStartMinutes = null,Object? backup = freezed,}) {
|
|
return _then(_Service(
|
|
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
|
as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
|
as String,composeFile: null == composeFile ? _self.composeFile : composeFile // ignore: cast_nullable_to_non_nullable
|
|
as String,composeType: freezed == composeType ? _self.composeType : composeType // ignore: cast_nullable_to_non_nullable
|
|
as String?,backupFolder: freezed == backupFolder ? _self.backupFolder : backupFolder // ignore: cast_nullable_to_non_nullable
|
|
as String?,status: null == status ? _self.status : status // ignore: cast_nullable_to_non_nullable
|
|
as String,stopOnBackup: null == stopOnBackup ? _self.stopOnBackup : stopOnBackup // ignore: cast_nullable_to_non_nullable
|
|
as bool,externalBackupStopMinutes: null == externalBackupStopMinutes ? _self.externalBackupStopMinutes : externalBackupStopMinutes // ignore: cast_nullable_to_non_nullable
|
|
as int,externalBackupStartMinutes: null == externalBackupStartMinutes ? _self.externalBackupStartMinutes : externalBackupStartMinutes // ignore: cast_nullable_to_non_nullable
|
|
as int,backup: freezed == backup ? _self.backup : backup // ignore: cast_nullable_to_non_nullable
|
|
as BackupConfig?,
|
|
));
|
|
}
|
|
|
|
/// Create a copy of Service
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
$BackupConfigCopyWith<$Res>? get backup {
|
|
if (_self.backup == null) {
|
|
return null;
|
|
}
|
|
|
|
return $BackupConfigCopyWith<$Res>(_self.backup!, (value) {
|
|
return _then(_self.copyWith(backup: value));
|
|
});
|
|
}
|
|
}
|
|
|
|
// dart format on
|