// 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 'node_info.dart'; // ************************************************************************** // FreezedGenerator // ************************************************************************** // dart format off T _$identity(T value) => value; /// @nodoc mixin _$NodeInfo { String get hostname; String? get description;@JsonKey(name: 'update_history') List get updateHistory; BackupConfig get backup;@JsonKey(name: 'restic_password_set') bool get resticPasswordSet;@JsonKey(name: 'restic_password', includeIfNull: false) String? get resticPassword; /// Create a copy of NodeInfo /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $NodeInfoCopyWith get copyWith => _$NodeInfoCopyWithImpl(this as NodeInfo, _$identity); /// Serializes this NodeInfo to a JSON map. Map toJson(); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is NodeInfo&&(identical(other.hostname, hostname) || other.hostname == hostname)&&(identical(other.description, description) || other.description == description)&&const DeepCollectionEquality().equals(other.updateHistory, updateHistory)&&(identical(other.backup, backup) || other.backup == backup)&&(identical(other.resticPasswordSet, resticPasswordSet) || other.resticPasswordSet == resticPasswordSet)&&(identical(other.resticPassword, resticPassword) || other.resticPassword == resticPassword)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,hostname,description,const DeepCollectionEquality().hash(updateHistory),backup,resticPasswordSet,resticPassword); @override String toString() { return 'NodeInfo(hostname: $hostname, description: $description, updateHistory: $updateHistory, backup: $backup, resticPasswordSet: $resticPasswordSet, resticPassword: $resticPassword)'; } } /// @nodoc abstract mixin class $NodeInfoCopyWith<$Res> { factory $NodeInfoCopyWith(NodeInfo value, $Res Function(NodeInfo) _then) = _$NodeInfoCopyWithImpl; @useResult $Res call({ String hostname, String? description,@JsonKey(name: 'update_history') List updateHistory, BackupConfig backup,@JsonKey(name: 'restic_password_set') bool resticPasswordSet,@JsonKey(name: 'restic_password', includeIfNull: false) String? resticPassword }); $BackupConfigCopyWith<$Res> get backup; } /// @nodoc class _$NodeInfoCopyWithImpl<$Res> implements $NodeInfoCopyWith<$Res> { _$NodeInfoCopyWithImpl(this._self, this._then); final NodeInfo _self; final $Res Function(NodeInfo) _then; /// Create a copy of NodeInfo /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({Object? hostname = null,Object? description = freezed,Object? updateHistory = null,Object? backup = null,Object? resticPasswordSet = null,Object? resticPassword = freezed,}) { return _then(_self.copyWith( hostname: null == hostname ? _self.hostname : hostname // ignore: cast_nullable_to_non_nullable as String,description: freezed == description ? _self.description : description // ignore: cast_nullable_to_non_nullable as String?,updateHistory: null == updateHistory ? _self.updateHistory : updateHistory // ignore: cast_nullable_to_non_nullable as List,backup: null == backup ? _self.backup : backup // ignore: cast_nullable_to_non_nullable as BackupConfig,resticPasswordSet: null == resticPasswordSet ? _self.resticPasswordSet : resticPasswordSet // ignore: cast_nullable_to_non_nullable as bool,resticPassword: freezed == resticPassword ? _self.resticPassword : resticPassword // ignore: cast_nullable_to_non_nullable as String?, )); } /// Create a copy of NodeInfo /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $BackupConfigCopyWith<$Res> get backup { return $BackupConfigCopyWith<$Res>(_self.backup, (value) { return _then(_self.copyWith(backup: value)); }); } } /// Adds pattern-matching-related methods to [NodeInfo]. extension NodeInfoPatterns on NodeInfo { /// 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 Function( _NodeInfo value)? $default,{required TResult orElse(),}){ final _that = this; switch (_that) { case _NodeInfo() 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 Function( _NodeInfo value) $default,){ final _that = this; switch (_that) { case _NodeInfo(): 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? Function( _NodeInfo value)? $default,){ final _that = this; switch (_that) { case _NodeInfo() 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 Function( String hostname, String? description, @JsonKey(name: 'update_history') List updateHistory, BackupConfig backup, @JsonKey(name: 'restic_password_set') bool resticPasswordSet, @JsonKey(name: 'restic_password', includeIfNull: false) String? resticPassword)? $default,{required TResult orElse(),}) {final _that = this; switch (_that) { case _NodeInfo() when $default != null: return $default(_that.hostname,_that.description,_that.updateHistory,_that.backup,_that.resticPasswordSet,_that.resticPassword);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 Function( String hostname, String? description, @JsonKey(name: 'update_history') List updateHistory, BackupConfig backup, @JsonKey(name: 'restic_password_set') bool resticPasswordSet, @JsonKey(name: 'restic_password', includeIfNull: false) String? resticPassword) $default,) {final _that = this; switch (_that) { case _NodeInfo(): return $default(_that.hostname,_that.description,_that.updateHistory,_that.backup,_that.resticPasswordSet,_that.resticPassword);} } /// 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? Function( String hostname, String? description, @JsonKey(name: 'update_history') List updateHistory, BackupConfig backup, @JsonKey(name: 'restic_password_set') bool resticPasswordSet, @JsonKey(name: 'restic_password', includeIfNull: false) String? resticPassword)? $default,) {final _that = this; switch (_that) { case _NodeInfo() when $default != null: return $default(_that.hostname,_that.description,_that.updateHistory,_that.backup,_that.resticPasswordSet,_that.resticPassword);case _: return null; } } } /// @nodoc @JsonSerializable() class _NodeInfo implements NodeInfo { const _NodeInfo({required this.hostname, this.description, @JsonKey(name: 'update_history') final List updateHistory = const [], required this.backup, @JsonKey(name: 'restic_password_set') this.resticPasswordSet = false, @JsonKey(name: 'restic_password', includeIfNull: false) this.resticPassword}): _updateHistory = updateHistory; factory _NodeInfo.fromJson(Map json) => _$NodeInfoFromJson(json); @override final String hostname; @override final String? description; final List _updateHistory; @override@JsonKey(name: 'update_history') List get updateHistory { if (_updateHistory is EqualUnmodifiableListView) return _updateHistory; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(_updateHistory); } @override final BackupConfig backup; @override@JsonKey(name: 'restic_password_set') final bool resticPasswordSet; @override@JsonKey(name: 'restic_password', includeIfNull: false) final String? resticPassword; /// Create a copy of NodeInfo /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$NodeInfoCopyWith<_NodeInfo> get copyWith => __$NodeInfoCopyWithImpl<_NodeInfo>(this, _$identity); @override Map toJson() { return _$NodeInfoToJson(this, ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _NodeInfo&&(identical(other.hostname, hostname) || other.hostname == hostname)&&(identical(other.description, description) || other.description == description)&&const DeepCollectionEquality().equals(other._updateHistory, _updateHistory)&&(identical(other.backup, backup) || other.backup == backup)&&(identical(other.resticPasswordSet, resticPasswordSet) || other.resticPasswordSet == resticPasswordSet)&&(identical(other.resticPassword, resticPassword) || other.resticPassword == resticPassword)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,hostname,description,const DeepCollectionEquality().hash(_updateHistory),backup,resticPasswordSet,resticPassword); @override String toString() { return 'NodeInfo(hostname: $hostname, description: $description, updateHistory: $updateHistory, backup: $backup, resticPasswordSet: $resticPasswordSet, resticPassword: $resticPassword)'; } } /// @nodoc abstract mixin class _$NodeInfoCopyWith<$Res> implements $NodeInfoCopyWith<$Res> { factory _$NodeInfoCopyWith(_NodeInfo value, $Res Function(_NodeInfo) _then) = __$NodeInfoCopyWithImpl; @override @useResult $Res call({ String hostname, String? description,@JsonKey(name: 'update_history') List updateHistory, BackupConfig backup,@JsonKey(name: 'restic_password_set') bool resticPasswordSet,@JsonKey(name: 'restic_password', includeIfNull: false) String? resticPassword }); @override $BackupConfigCopyWith<$Res> get backup; } /// @nodoc class __$NodeInfoCopyWithImpl<$Res> implements _$NodeInfoCopyWith<$Res> { __$NodeInfoCopyWithImpl(this._self, this._then); final _NodeInfo _self; final $Res Function(_NodeInfo) _then; /// Create a copy of NodeInfo /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $Res call({Object? hostname = null,Object? description = freezed,Object? updateHistory = null,Object? backup = null,Object? resticPasswordSet = null,Object? resticPassword = freezed,}) { return _then(_NodeInfo( hostname: null == hostname ? _self.hostname : hostname // ignore: cast_nullable_to_non_nullable as String,description: freezed == description ? _self.description : description // ignore: cast_nullable_to_non_nullable as String?,updateHistory: null == updateHistory ? _self._updateHistory : updateHistory // ignore: cast_nullable_to_non_nullable as List,backup: null == backup ? _self.backup : backup // ignore: cast_nullable_to_non_nullable as BackupConfig,resticPasswordSet: null == resticPasswordSet ? _self.resticPasswordSet : resticPasswordSet // ignore: cast_nullable_to_non_nullable as bool,resticPassword: freezed == resticPassword ? _self.resticPassword : resticPassword // ignore: cast_nullable_to_non_nullable as String?, )); } /// Create a copy of NodeInfo /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $BackupConfigCopyWith<$Res> get backup { return $BackupConfigCopyWith<$Res>(_self.backup, (value) { return _then(_self.copyWith(backup: value)); }); } } // dart format on