// 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 'connection.dart'; // ************************************************************************** // FreezedGenerator // ************************************************************************** // dart format off T _$identity(T value) => value; /// @nodoc mixin _$Connection { String get id; String get name; String get baseUrl; /// Create a copy of Connection /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $ConnectionCopyWith get copyWith => _$ConnectionCopyWithImpl(this as Connection, _$identity); /// Serializes this Connection to a JSON map. Map toJson(); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is Connection&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.baseUrl, baseUrl) || other.baseUrl == baseUrl)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,id,name,baseUrl); @override String toString() { return 'Connection(id: $id, name: $name, baseUrl: $baseUrl)'; } } /// @nodoc abstract mixin class $ConnectionCopyWith<$Res> { factory $ConnectionCopyWith(Connection value, $Res Function(Connection) _then) = _$ConnectionCopyWithImpl; @useResult $Res call({ String id, String name, String baseUrl }); } /// @nodoc class _$ConnectionCopyWithImpl<$Res> implements $ConnectionCopyWith<$Res> { _$ConnectionCopyWithImpl(this._self, this._then); final Connection _self; final $Res Function(Connection) _then; /// Create a copy of Connection /// 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? baseUrl = null,}) { 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,baseUrl: null == baseUrl ? _self.baseUrl : baseUrl // ignore: cast_nullable_to_non_nullable as String, )); } } /// Adds pattern-matching-related methods to [Connection]. extension ConnectionPatterns on Connection { /// 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( _Connection value)? $default,{required TResult orElse(),}){ final _that = this; switch (_that) { case _Connection() 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( _Connection value) $default,){ final _that = this; switch (_that) { case _Connection(): 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( _Connection value)? $default,){ final _that = this; switch (_that) { case _Connection() 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 id, String name, String baseUrl)? $default,{required TResult orElse(),}) {final _that = this; switch (_that) { case _Connection() when $default != null: return $default(_that.id,_that.name,_that.baseUrl);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 id, String name, String baseUrl) $default,) {final _that = this; switch (_that) { case _Connection(): return $default(_that.id,_that.name,_that.baseUrl);} } /// 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 id, String name, String baseUrl)? $default,) {final _that = this; switch (_that) { case _Connection() when $default != null: return $default(_that.id,_that.name,_that.baseUrl);case _: return null; } } } /// @nodoc @JsonSerializable() class _Connection implements Connection { const _Connection({required this.id, required this.name, required this.baseUrl}); factory _Connection.fromJson(Map json) => _$ConnectionFromJson(json); @override final String id; @override final String name; @override final String baseUrl; /// Create a copy of Connection /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$ConnectionCopyWith<_Connection> get copyWith => __$ConnectionCopyWithImpl<_Connection>(this, _$identity); @override Map toJson() { return _$ConnectionToJson(this, ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType&&other is _Connection&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.baseUrl, baseUrl) || other.baseUrl == baseUrl)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType,id,name,baseUrl); @override String toString() { return 'Connection(id: $id, name: $name, baseUrl: $baseUrl)'; } } /// @nodoc abstract mixin class _$ConnectionCopyWith<$Res> implements $ConnectionCopyWith<$Res> { factory _$ConnectionCopyWith(_Connection value, $Res Function(_Connection) _then) = __$ConnectionCopyWithImpl; @override @useResult $Res call({ String id, String name, String baseUrl }); } /// @nodoc class __$ConnectionCopyWithImpl<$Res> implements _$ConnectionCopyWith<$Res> { __$ConnectionCopyWithImpl(this._self, this._then); final _Connection _self; final $Res Function(_Connection) _then; /// Create a copy of Connection /// 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? baseUrl = null,}) { return _then(_Connection( 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,baseUrl: null == baseUrl ? _self.baseUrl : baseUrl // ignore: cast_nullable_to_non_nullable as String, )); } } // dart format on