// GENERATED CODE - DO NOT MODIFY BY HAND // coverage:ignore-file // ignore_for_file: type=lint, type=warning, deprecated_member_use, deprecated_member_use_from_same_package // 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 'workspace_navigation.dart'; // ************************************************************************** // FreezedGenerator // ************************************************************************** // GENERATED CODE - DO NOT MODIFY BY HAND T _$identity(T value) => value; /// @nodoc mixin _$WorkspaceNavigationState implements DiagnosticableTreeMixin { bool get ready; bool get switchingProject; String? get selectedProjectId; /// Create a copy of WorkspaceNavigationState /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $WorkspaceNavigationStateCopyWith get copyWith => _$WorkspaceNavigationStateCopyWithImpl( this as WorkspaceNavigationState, _$identity, ); @override void debugFillProperties(DiagnosticPropertiesBuilder properties) { final _this = this as WorkspaceNavigationState; properties ..add(DiagnosticsProperty('type', 'WorkspaceNavigationState')) ..add(DiagnosticsProperty('ready', _this.ready)) ..add(DiagnosticsProperty('switchingProject', _this.switchingProject)) ..add(DiagnosticsProperty('selectedProjectId', _this.selectedProjectId)); } @override bool operator ==(Object other) { final _this = this as WorkspaceNavigationState; return identical(this, other) || (other.runtimeType == runtimeType && other is WorkspaceNavigationState && (identical(other.ready, _this.ready) || other.ready == _this.ready) && (identical(other.switchingProject, _this.switchingProject) || other.switchingProject == _this.switchingProject) && (identical(other.selectedProjectId, _this.selectedProjectId) || other.selectedProjectId == _this.selectedProjectId)); } @override int get hashCode { final _this = this as WorkspaceNavigationState; return Object.hash( runtimeType, _this.ready, _this.switchingProject, _this.selectedProjectId, ); } @override String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { final _this = this as WorkspaceNavigationState; return 'WorkspaceNavigationState(ready: ${_this.ready}, switchingProject: ${_this.switchingProject}, selectedProjectId: ${_this.selectedProjectId})'; } } /// @nodoc abstract mixin class $WorkspaceNavigationStateCopyWith<$Res> { factory $WorkspaceNavigationStateCopyWith( WorkspaceNavigationState value, $Res Function(WorkspaceNavigationState) _then, ) = _$WorkspaceNavigationStateCopyWithImpl; @useResult $Res call({bool ready, bool switchingProject, String? selectedProjectId}); } /// @nodoc class _$WorkspaceNavigationStateCopyWithImpl<$Res> implements $WorkspaceNavigationStateCopyWith<$Res> { _$WorkspaceNavigationStateCopyWithImpl(this._self, this._then); final WorkspaceNavigationState _self; final $Res Function(WorkspaceNavigationState) _then; /// Create a copy of WorkspaceNavigationState /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ Object? ready = null, Object? switchingProject = null, Object? selectedProjectId = freezed, }) { return _then( WorkspaceNavigationState( ready: null == ready ? _self.ready : ready // ignore: cast_nullable_to_non_nullable as bool, switchingProject: null == switchingProject ? _self.switchingProject : switchingProject // ignore: cast_nullable_to_non_nullable as bool, selectedProjectId: freezed == selectedProjectId ? _self.selectedProjectId : selectedProjectId // ignore: cast_nullable_to_non_nullable as String?, ), ); } } /// Adds pattern-matching-related methods to [WorkspaceNavigationState]. extension WorkspaceNavigationStatePatterns on WorkspaceNavigationState { /// 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(_WorkspaceNavigationState value)? $default, { required TResult orElse(), }) { final _that = this; switch (_that) { case _WorkspaceNavigationState() 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(_WorkspaceNavigationState value) $default, ) { final _that = this; switch (_that) { case _WorkspaceNavigationState(): return $default(_that); case _: throw StateError('Unexpected subclass'); } } /// 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(_WorkspaceNavigationState value)? $default, ) { final _that = this; switch (_that) { case _WorkspaceNavigationState() 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( bool ready, bool switchingProject, String? selectedProjectId, )? $default, { required TResult orElse(), }) { final _that = this; switch (_that) { case _WorkspaceNavigationState() when $default != null: return $default( _that.ready, _that.switchingProject, _that.selectedProjectId, ); 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( bool ready, bool switchingProject, String? selectedProjectId, ) $default, ) { final _that = this; switch (_that) { case _WorkspaceNavigationState(): return $default( _that.ready, _that.switchingProject, _that.selectedProjectId, ); case _: throw StateError('Unexpected subclass'); } } /// 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( bool ready, bool switchingProject, String? selectedProjectId, )? $default, ) { final _that = this; switch (_that) { case _WorkspaceNavigationState() when $default != null: return $default( _that.ready, _that.switchingProject, _that.selectedProjectId, ); case _: return null; } } } /// @nodoc class _WorkspaceNavigationState with DiagnosticableTreeMixin implements WorkspaceNavigationState { const _WorkspaceNavigationState({ this.ready = false, this.switchingProject = false, this.selectedProjectId, }); @override @JsonKey() final bool ready; @override @JsonKey() final bool switchingProject; @override final String? selectedProjectId; /// Create a copy of WorkspaceNavigationState /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$WorkspaceNavigationStateCopyWith<_WorkspaceNavigationState> get copyWith => __$WorkspaceNavigationStateCopyWithImpl<_WorkspaceNavigationState>( this, _$identity, ); @override void debugFillProperties(DiagnosticPropertiesBuilder properties) { properties ..add(DiagnosticsProperty('type', 'WorkspaceNavigationState')) ..add(DiagnosticsProperty('ready', ready)) ..add(DiagnosticsProperty('switchingProject', switchingProject)) ..add(DiagnosticsProperty('selectedProjectId', selectedProjectId)); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _WorkspaceNavigationState && (identical(other.ready, ready) || other.ready == ready) && (identical(other.switchingProject, switchingProject) || other.switchingProject == switchingProject) && (identical(other.selectedProjectId, selectedProjectId) || other.selectedProjectId == selectedProjectId)); } @override int get hashCode { return Object.hash(runtimeType, ready, switchingProject, selectedProjectId); } @override String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { return 'WorkspaceNavigationState(ready: $ready, switchingProject: $switchingProject, selectedProjectId: $selectedProjectId)'; } } /// @nodoc abstract mixin class _$WorkspaceNavigationStateCopyWith<$Res> implements $WorkspaceNavigationStateCopyWith<$Res> { factory _$WorkspaceNavigationStateCopyWith( _WorkspaceNavigationState value, $Res Function(_WorkspaceNavigationState) _then, ) = __$WorkspaceNavigationStateCopyWithImpl; @override @useResult $Res call({bool ready, bool switchingProject, String? selectedProjectId}); } /// @nodoc class __$WorkspaceNavigationStateCopyWithImpl<$Res> implements _$WorkspaceNavigationStateCopyWith<$Res> { __$WorkspaceNavigationStateCopyWithImpl(this._self, this._then); final _WorkspaceNavigationState _self; final $Res Function(_WorkspaceNavigationState) _then; /// Create a copy of WorkspaceNavigationState /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $Res call({ Object? ready = null, Object? switchingProject = null, Object? selectedProjectId = freezed, }) { return _then( _WorkspaceNavigationState( ready: null == ready ? _self.ready : ready // ignore: cast_nullable_to_non_nullable as bool, switchingProject: null == switchingProject ? _self.switchingProject : switchingProject // ignore: cast_nullable_to_non_nullable as bool, selectedProjectId: freezed == selectedProjectId ? _self.selectedProjectId : selectedProjectId // ignore: cast_nullable_to_non_nullable as String?, ), ); } }