// dart format width=80 // coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND // 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 'bluetooth_device_model.dart'; // ************************************************************************** // FreezedGenerator // ************************************************************************** // dart format off T _$identity(T value) => value; /// @nodoc mixin _$BluetoothDeviceModel { /// Unique identifier for the device String get id; /// Name of the device as advertised String? get name; /// MAC address of the device String get address; /// Type of the device DeviceType get type; /// Additional device information Map? get manufacturerData; /// Identifier of the device @DeviceIdentJsonConverter() DeviceIdentifier get deviceIdent; /// Create a copy of BluetoothDeviceModel /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') $BluetoothDeviceModelCopyWith get copyWith => _$BluetoothDeviceModelCopyWithImpl( this as BluetoothDeviceModel, _$identity); /// Serializes this BluetoothDeviceModel to a JSON map. Map toJson(); @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is BluetoothDeviceModel && (identical(other.id, id) || other.id == id) && (identical(other.name, name) || other.name == name) && (identical(other.address, address) || other.address == address) && (identical(other.type, type) || other.type == type) && const DeepCollectionEquality() .equals(other.manufacturerData, manufacturerData) && (identical(other.deviceIdent, deviceIdent) || other.deviceIdent == deviceIdent)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType, id, name, address, type, const DeepCollectionEquality().hash(manufacturerData), deviceIdent); @override String toString() { return 'BluetoothDeviceModel(id: $id, name: $name, address: $address, type: $type, manufacturerData: $manufacturerData, deviceIdent: $deviceIdent)'; } } /// @nodoc abstract mixin class $BluetoothDeviceModelCopyWith<$Res> { factory $BluetoothDeviceModelCopyWith(BluetoothDeviceModel value, $Res Function(BluetoothDeviceModel) _then) = _$BluetoothDeviceModelCopyWithImpl; @useResult $Res call( {String id, String? name, String address, DeviceType type, Map? manufacturerData, @DeviceIdentJsonConverter() DeviceIdentifier deviceIdent}); } /// @nodoc class _$BluetoothDeviceModelCopyWithImpl<$Res> implements $BluetoothDeviceModelCopyWith<$Res> { _$BluetoothDeviceModelCopyWithImpl(this._self, this._then); final BluetoothDeviceModel _self; final $Res Function(BluetoothDeviceModel) _then; /// Create a copy of BluetoothDeviceModel /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override $Res call({ Object? id = null, Object? name = freezed, Object? address = null, Object? type = null, Object? manufacturerData = freezed, Object? deviceIdent = null, }) { return _then(_self.copyWith( id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable as String, name: freezed == name ? _self.name : name // ignore: cast_nullable_to_non_nullable as String?, address: null == address ? _self.address : address // ignore: cast_nullable_to_non_nullable as String, type: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable as DeviceType, manufacturerData: freezed == manufacturerData ? _self.manufacturerData : manufacturerData // ignore: cast_nullable_to_non_nullable as Map?, deviceIdent: null == deviceIdent ? _self.deviceIdent : deviceIdent // ignore: cast_nullable_to_non_nullable as DeviceIdentifier, )); } } /// @nodoc @JsonSerializable() class _BluetoothDeviceModel implements BluetoothDeviceModel { const _BluetoothDeviceModel( {required this.id, this.name, required this.address, this.type = DeviceType.other, final Map? manufacturerData, @DeviceIdentJsonConverter() required this.deviceIdent}) : _manufacturerData = manufacturerData; factory _BluetoothDeviceModel.fromJson(Map json) => _$BluetoothDeviceModelFromJson(json); /// Unique identifier for the device @override final String id; /// Name of the device as advertised @override final String? name; /// MAC address of the device @override final String address; /// Type of the device @override @JsonKey() final DeviceType type; /// Additional device information final Map? _manufacturerData; /// Additional device information @override Map? get manufacturerData { final value = _manufacturerData; if (value == null) return null; if (_manufacturerData is EqualUnmodifiableMapView) return _manufacturerData; // ignore: implicit_dynamic_type return EqualUnmodifiableMapView(value); } /// Identifier of the device @override @DeviceIdentJsonConverter() final DeviceIdentifier deviceIdent; /// Create a copy of BluetoothDeviceModel /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @pragma('vm:prefer-inline') _$BluetoothDeviceModelCopyWith<_BluetoothDeviceModel> get copyWith => __$BluetoothDeviceModelCopyWithImpl<_BluetoothDeviceModel>( this, _$identity); @override Map toJson() { return _$BluetoothDeviceModelToJson( this, ); } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && other is _BluetoothDeviceModel && (identical(other.id, id) || other.id == id) && (identical(other.name, name) || other.name == name) && (identical(other.address, address) || other.address == address) && (identical(other.type, type) || other.type == type) && const DeepCollectionEquality() .equals(other._manufacturerData, _manufacturerData) && (identical(other.deviceIdent, deviceIdent) || other.deviceIdent == deviceIdent)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash(runtimeType, id, name, address, type, const DeepCollectionEquality().hash(_manufacturerData), deviceIdent); @override String toString() { return 'BluetoothDeviceModel(id: $id, name: $name, address: $address, type: $type, manufacturerData: $manufacturerData, deviceIdent: $deviceIdent)'; } } /// @nodoc abstract mixin class _$BluetoothDeviceModelCopyWith<$Res> implements $BluetoothDeviceModelCopyWith<$Res> { factory _$BluetoothDeviceModelCopyWith(_BluetoothDeviceModel value, $Res Function(_BluetoothDeviceModel) _then) = __$BluetoothDeviceModelCopyWithImpl; @override @useResult $Res call( {String id, String? name, String address, DeviceType type, Map? manufacturerData, @DeviceIdentJsonConverter() DeviceIdentifier deviceIdent}); } /// @nodoc class __$BluetoothDeviceModelCopyWithImpl<$Res> implements _$BluetoothDeviceModelCopyWith<$Res> { __$BluetoothDeviceModelCopyWithImpl(this._self, this._then); final _BluetoothDeviceModel _self; final $Res Function(_BluetoothDeviceModel) _then; /// Create a copy of BluetoothDeviceModel /// with the given fields replaced by the non-null parameter values. @override @pragma('vm:prefer-inline') $Res call({ Object? id = null, Object? name = freezed, Object? address = null, Object? type = null, Object? manufacturerData = freezed, Object? deviceIdent = null, }) { return _then(_BluetoothDeviceModel( id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable as String, name: freezed == name ? _self.name : name // ignore: cast_nullable_to_non_nullable as String?, address: null == address ? _self.address : address // ignore: cast_nullable_to_non_nullable as String, type: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable as DeviceType, manufacturerData: freezed == manufacturerData ? _self._manufacturerData : manufacturerData // ignore: cast_nullable_to_non_nullable as Map?, deviceIdent: null == deviceIdent ? _self.deviceIdent : deviceIdent // ignore: cast_nullable_to_non_nullable as DeviceIdentifier, )); } } // dart format on