// 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 'agent_settings_panel.dart'; // ************************************************************************** // FreezedGenerator // ************************************************************************** // GENERATED CODE - DO NOT MODIFY BY HAND T _$identity(T value) => value; /// @nodoc mixin _$ProviderFormValue { String get name; AgentApiType get apiType; String get baseUrl; List get models; String? get apiKey; bool get clearApiKey; /// Create a copy of _ProviderFormValue /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$ProviderFormValueCopyWith<_ProviderFormValue> get copyWith => __$ProviderFormValueCopyWithImpl<_ProviderFormValue>( this as _ProviderFormValue, _$identity, ); @override bool operator ==(Object other) { final _this = this as _ProviderFormValue; return identical(this, other) || (other.runtimeType == runtimeType && other is _ProviderFormValue && (identical(other.name, _this.name) || other.name == _this.name) && (identical(other.apiType, _this.apiType) || other.apiType == _this.apiType) && (identical(other.baseUrl, _this.baseUrl) || other.baseUrl == _this.baseUrl) && const DeepCollectionEquality().equals(other.models, _this.models) && (identical(other.apiKey, _this.apiKey) || other.apiKey == _this.apiKey) && (identical(other.clearApiKey, _this.clearApiKey) || other.clearApiKey == _this.clearApiKey)); } @override int get hashCode { final _this = this as _ProviderFormValue; return Object.hash( runtimeType, _this.name, _this.apiType, _this.baseUrl, const DeepCollectionEquality().hash(_this.models), _this.apiKey, _this.clearApiKey, ); } @override String toString() { final _this = this as _ProviderFormValue; return '_ProviderFormValue(name: ${_this.name}, apiType: ${_this.apiType}, baseUrl: ${_this.baseUrl}, models: ${_this.models}, apiKey: ${_this.apiKey}, clearApiKey: ${_this.clearApiKey})'; } } /// @nodoc abstract mixin class _$ProviderFormValueCopyWith<$Res> { factory _$ProviderFormValueCopyWith( _ProviderFormValue value, $Res Function(_ProviderFormValue) _then, ) = __$ProviderFormValueCopyWithImpl; @useResult $Res call({ String name, AgentApiType apiType, String baseUrl, List models, String? apiKey, bool clearApiKey, }); } /// @nodoc class __$ProviderFormValueCopyWithImpl<$Res> implements _$ProviderFormValueCopyWith<$Res> { __$ProviderFormValueCopyWithImpl(this._self, this._then); final _ProviderFormValue _self; final $Res Function(_ProviderFormValue) _then; /// Create a copy of _ProviderFormValue /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ Object? name = null, Object? apiType = null, Object? baseUrl = null, Object? models = null, Object? apiKey = freezed, Object? clearApiKey = null, }) { return _then( _ProviderFormValue( name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable as String, apiType: null == apiType ? _self.apiType : apiType // ignore: cast_nullable_to_non_nullable as AgentApiType, baseUrl: null == baseUrl ? _self.baseUrl : baseUrl // ignore: cast_nullable_to_non_nullable as String, models: null == models ? _self.models : models // ignore: cast_nullable_to_non_nullable as List, apiKey: freezed == apiKey ? _self.apiKey : apiKey // ignore: cast_nullable_to_non_nullable as String?, clearApiKey: null == clearApiKey ? _self.clearApiKey : clearApiKey // ignore: cast_nullable_to_non_nullable as bool, ), ); } } /// Adds pattern-matching-related methods to [_ProviderFormValue]. extension _ProviderFormValuePatterns on _ProviderFormValue { /// 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(_ProviderFormData value)? $default, { required TResult orElse(), }) { final _that = this; switch (_that) { case _ProviderFormData() 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(_ProviderFormData value) $default, ) { final _that = this; switch (_that) { case _ProviderFormData(): 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(_ProviderFormData value)? $default, ) { final _that = this; switch (_that) { case _ProviderFormData() 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 name, AgentApiType apiType, String baseUrl, List models, String? apiKey, bool clearApiKey, )? $default, { required TResult orElse(), }) { final _that = this; switch (_that) { case _ProviderFormData() when $default != null: return $default( _that.name, _that.apiType, _that.baseUrl, _that.models, _that.apiKey, _that.clearApiKey, ); 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 name, AgentApiType apiType, String baseUrl, List models, String? apiKey, bool clearApiKey, ) $default, ) { final _that = this; switch (_that) { case _ProviderFormData(): return $default( _that.name, _that.apiType, _that.baseUrl, _that.models, _that.apiKey, _that.clearApiKey, ); 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( String name, AgentApiType apiType, String baseUrl, List models, String? apiKey, bool clearApiKey, )? $default, ) { final _that = this; switch (_that) { case _ProviderFormData() when $default != null: return $default( _that.name, _that.apiType, _that.baseUrl, _that.models, _that.apiKey, _that.clearApiKey, ); case _: return null; } } } /// @nodoc class _ProviderFormData implements _ProviderFormValue { const _ProviderFormData({ required this.name, required this.apiType, required this.baseUrl, required List models, required this.apiKey, required this.clearApiKey, }) : _models = models; @override final String name; @override final AgentApiType apiType; @override final String baseUrl; final List _models; @override List get models { if (_models is EqualUnmodifiableListView) return _models; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(_models); } @override final String? apiKey; @override final bool clearApiKey; /// Create a copy of _ProviderFormValue /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$ProviderFormDataCopyWith<_ProviderFormData> get copyWith => __$ProviderFormDataCopyWithImpl<_ProviderFormData>(this, _$identity); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _ProviderFormData && (identical(other.name, name) || other.name == name) && (identical(other.apiType, apiType) || other.apiType == apiType) && (identical(other.baseUrl, baseUrl) || other.baseUrl == baseUrl) && const DeepCollectionEquality().equals(other.models, _models) && (identical(other.apiKey, apiKey) || other.apiKey == apiKey) && (identical(other.clearApiKey, clearApiKey) || other.clearApiKey == clearApiKey)); } @override int get hashCode { return Object.hash( runtimeType, name, apiType, baseUrl, const DeepCollectionEquality().hash(_models), apiKey, clearApiKey, ); } @override String toString() { return '_ProviderFormValue(name: $name, apiType: $apiType, baseUrl: $baseUrl, models: $models, apiKey: $apiKey, clearApiKey: $clearApiKey)'; } } /// @nodoc abstract mixin class _$ProviderFormDataCopyWith<$Res> implements _$ProviderFormValueCopyWith<$Res> { factory _$ProviderFormDataCopyWith( _ProviderFormData value, $Res Function(_ProviderFormData) _then, ) = __$ProviderFormDataCopyWithImpl; @override @useResult $Res call({ String name, AgentApiType apiType, String baseUrl, List models, String? apiKey, bool clearApiKey, }); } /// @nodoc class __$ProviderFormDataCopyWithImpl<$Res> implements _$ProviderFormDataCopyWith<$Res> { __$ProviderFormDataCopyWithImpl(this._self, this._then); final _ProviderFormData _self; final $Res Function(_ProviderFormData) _then; /// Create a copy of _ProviderFormValue /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $Res call({ Object? name = null, Object? apiType = null, Object? baseUrl = null, Object? models = null, Object? apiKey = freezed, Object? clearApiKey = null, }) { return _then( _ProviderFormData( name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable as String, apiType: null == apiType ? _self.apiType : apiType // ignore: cast_nullable_to_non_nullable as AgentApiType, baseUrl: null == baseUrl ? _self.baseUrl : baseUrl // ignore: cast_nullable_to_non_nullable as String, models: null == models ? _self._models : models // ignore: cast_nullable_to_non_nullable as List, apiKey: freezed == apiKey ? _self.apiKey : apiKey // ignore: cast_nullable_to_non_nullable as String?, clearApiKey: null == clearApiKey ? _self.clearApiKey : clearApiKey // ignore: cast_nullable_to_non_nullable as bool, ), ); } }