// 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 'editor_tools.dart'; // ************************************************************************** // FreezedGenerator // ************************************************************************** // GENERATED CODE - DO NOT MODIFY BY HAND T _$identity(T value) => value; /// @nodoc mixin _$EditorMcpConfiguration { int get port; String get token; /// Create a copy of EditorMcpConfiguration /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $EditorMcpConfigurationCopyWith get copyWith => _$EditorMcpConfigurationCopyWithImpl( this as EditorMcpConfiguration, _$identity, ); @override bool operator ==(Object other) { final _this = this as EditorMcpConfiguration; return identical(this, other) || (other.runtimeType == runtimeType && other is EditorMcpConfiguration && (identical(other.port, _this.port) || other.port == _this.port) && (identical(other.token, _this.token) || other.token == _this.token)); } @override int get hashCode { final _this = this as EditorMcpConfiguration; return Object.hash(runtimeType, _this.port, _this.token); } @override String toString() { final _this = this as EditorMcpConfiguration; return 'EditorMcpConfiguration(port: ${_this.port}, token: ${_this.token})'; } } /// @nodoc abstract mixin class $EditorMcpConfigurationCopyWith<$Res> { factory $EditorMcpConfigurationCopyWith( EditorMcpConfiguration value, $Res Function(EditorMcpConfiguration) _then, ) = _$EditorMcpConfigurationCopyWithImpl; @useResult $Res call({int port, String token}); } /// @nodoc class _$EditorMcpConfigurationCopyWithImpl<$Res> implements $EditorMcpConfigurationCopyWith<$Res> { _$EditorMcpConfigurationCopyWithImpl(this._self, this._then); final EditorMcpConfiguration _self; final $Res Function(EditorMcpConfiguration) _then; /// Create a copy of EditorMcpConfiguration /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({Object? port = null, Object? token = null}) { return _then( EditorMcpConfiguration( port: null == port ? _self.port : port // ignore: cast_nullable_to_non_nullable as int, token: null == token ? _self.token : token // ignore: cast_nullable_to_non_nullable as String, ), ); } } /// Adds pattern-matching-related methods to [EditorMcpConfiguration]. extension EditorMcpConfigurationPatterns on EditorMcpConfiguration { /// 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(_EditorMcpConfiguration value)? $default, { required TResult orElse(), }) { final _that = this; switch (_that) { case _EditorMcpConfiguration() 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(_EditorMcpConfiguration value) $default, ) { final _that = this; switch (_that) { case _EditorMcpConfiguration(): 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(_EditorMcpConfiguration value)? $default, ) { final _that = this; switch (_that) { case _EditorMcpConfiguration() 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(int port, String token)? $default, { required TResult orElse(), }) { final _that = this; switch (_that) { case _EditorMcpConfiguration() when $default != null: return $default(_that.port, _that.token); 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(int port, String token) $default, ) { final _that = this; switch (_that) { case _EditorMcpConfiguration(): return $default(_that.port, _that.token); 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(int port, String token)? $default, ) { final _that = this; switch (_that) { case _EditorMcpConfiguration() when $default != null: return $default(_that.port, _that.token); case _: return null; } } } /// @nodoc class _EditorMcpConfiguration implements EditorMcpConfiguration { const _EditorMcpConfiguration({required this.port, required this.token}); @override final int port; @override final String token; /// Create a copy of EditorMcpConfiguration /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$EditorMcpConfigurationCopyWith<_EditorMcpConfiguration> get copyWith => __$EditorMcpConfigurationCopyWithImpl<_EditorMcpConfiguration>( this, _$identity, ); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _EditorMcpConfiguration && (identical(other.port, port) || other.port == port) && (identical(other.token, token) || other.token == token)); } @override int get hashCode { return Object.hash(runtimeType, port, token); } @override String toString() { return 'EditorMcpConfiguration(port: $port, token: $token)'; } } /// @nodoc abstract mixin class _$EditorMcpConfigurationCopyWith<$Res> implements $EditorMcpConfigurationCopyWith<$Res> { factory _$EditorMcpConfigurationCopyWith( _EditorMcpConfiguration value, $Res Function(_EditorMcpConfiguration) _then, ) = __$EditorMcpConfigurationCopyWithImpl; @override @useResult $Res call({int port, String token}); } /// @nodoc class __$EditorMcpConfigurationCopyWithImpl<$Res> implements _$EditorMcpConfigurationCopyWith<$Res> { __$EditorMcpConfigurationCopyWithImpl(this._self, this._then); final _EditorMcpConfiguration _self; final $Res Function(_EditorMcpConfiguration) _then; /// Create a copy of EditorMcpConfiguration /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $Res call({Object? port = null, Object? token = null}) { return _then( _EditorMcpConfiguration( port: null == port ? _self.port : port // ignore: cast_nullable_to_non_nullable as int, token: null == token ? _self.token : token // ignore: cast_nullable_to_non_nullable as String, ), ); } }