feat(capabilities): add volume limits (media, ringtone, alarm)

This commit is contained in:
2026-04-21 17:58:12 +02:00
parent cf86570e4c
commit ac986ac360
5 changed files with 683 additions and 44 deletions

View File

@@ -25,6 +25,7 @@ abstract class DeviceCapabilitiesModel with _$DeviceCapabilitiesModel {
DeviceCapabilityEnabledModel? nightMode,
DeviceCapabilityEnabledModel? wifi,
DeviceCapabilityEnabledModel? deviceBackground,
DeviceCapabilityVolumeModel? volume,
}) = _DeviceCapabilitiesModel;
factory DeviceCapabilitiesModel.fromJson(Map<String, dynamic> json) =>
@@ -171,6 +172,18 @@ abstract class DeviceCapabilityAppUsageModel
_$DeviceCapabilityAppUsageModelFromJson(json);
}
@freezed
abstract class DeviceCapabilityVolumeModel with _$DeviceCapabilityVolumeModel {
const factory DeviceCapabilityVolumeModel({
@Default(10) int media,
@Default(10) int ringtone,
@Default(10) int alarm,
}) = _DeviceCapabilityVolumeModel;
factory DeviceCapabilityVolumeModel.fromJson(Map<String, dynamic> json) =>
_$DeviceCapabilityVolumeModelFromJson(json);
}
extension DeviceCapabilitiesModelMapper on DeviceCapabilitiesModel {
DeviceCapabilitiesEntity toEntity() => DeviceCapabilitiesEntity(
heartbeats: heartbeats != null
@@ -264,5 +277,12 @@ extension DeviceCapabilitiesModelMapper on DeviceCapabilitiesModel {
deviceBackground: deviceBackground != null
? DeviceCapabilityEnabledEntity(enabled: deviceBackground!.enabled)
: null,
volume: volume != null
? DeviceCapabilityVolumeEntity(
media: volume!.media,
ringtone: volume!.ringtone,
alarm: volume!.alarm,
)
: null,
);
}

View File

@@ -15,7 +15,7 @@ T _$identity<T>(T value) => value;
/// @nodoc
mixin _$DeviceCapabilitiesModel {
DeviceCapabilityOptionModel? get heartbeats; DeviceCapabilityEnabledModel? get bloodPressure; DeviceCapabilityAlertsModel? get alerts; DeviceCapabilityEnabledModel? get podometer; DeviceCapabilityContactsModel? get contacts; DeviceCapabilitySettingsModel? get settings; DeviceCapabilityCommandsModel? get commands; DeviceCapabilityTakepillsModel? get takepills; DeviceCapabilityOptionModel? get location; DeviceCapabilityCameraModel? get camera; DeviceCapabilityDoNotDisturbModel? get doNotDisturbs; DeviceCapabilityAlarmsModel? get alarms; DeviceCapabilityAppUsageModel? get appUsageSchedules; DeviceCapabilityEnabledModel? get keyboard; DeviceCapabilityEnabledModel? get nightMode; DeviceCapabilityEnabledModel? get wifi; DeviceCapabilityEnabledModel? get deviceBackground;
DeviceCapabilityOptionModel? get heartbeats; DeviceCapabilityEnabledModel? get bloodPressure; DeviceCapabilityAlertsModel? get alerts; DeviceCapabilityEnabledModel? get podometer; DeviceCapabilityContactsModel? get contacts; DeviceCapabilitySettingsModel? get settings; DeviceCapabilityCommandsModel? get commands; DeviceCapabilityTakepillsModel? get takepills; DeviceCapabilityOptionModel? get location; DeviceCapabilityCameraModel? get camera; DeviceCapabilityDoNotDisturbModel? get doNotDisturbs; DeviceCapabilityAlarmsModel? get alarms; DeviceCapabilityAppUsageModel? get appUsageSchedules; DeviceCapabilityEnabledModel? get keyboard; DeviceCapabilityEnabledModel? get nightMode; DeviceCapabilityEnabledModel? get wifi; DeviceCapabilityEnabledModel? get deviceBackground; DeviceCapabilityVolumeModel? get volume;
/// Create a copy of DeviceCapabilitiesModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@@ -28,16 +28,16 @@ $DeviceCapabilitiesModelCopyWith<DeviceCapabilitiesModel> get copyWith => _$Devi
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is DeviceCapabilitiesModel&&(identical(other.heartbeats, heartbeats) || other.heartbeats == heartbeats)&&(identical(other.bloodPressure, bloodPressure) || other.bloodPressure == bloodPressure)&&(identical(other.alerts, alerts) || other.alerts == alerts)&&(identical(other.podometer, podometer) || other.podometer == podometer)&&(identical(other.contacts, contacts) || other.contacts == contacts)&&(identical(other.settings, settings) || other.settings == settings)&&(identical(other.commands, commands) || other.commands == commands)&&(identical(other.takepills, takepills) || other.takepills == takepills)&&(identical(other.location, location) || other.location == location)&&(identical(other.camera, camera) || other.camera == camera)&&(identical(other.doNotDisturbs, doNotDisturbs) || other.doNotDisturbs == doNotDisturbs)&&(identical(other.alarms, alarms) || other.alarms == alarms)&&(identical(other.appUsageSchedules, appUsageSchedules) || other.appUsageSchedules == appUsageSchedules)&&(identical(other.keyboard, keyboard) || other.keyboard == keyboard)&&(identical(other.nightMode, nightMode) || other.nightMode == nightMode)&&(identical(other.wifi, wifi) || other.wifi == wifi)&&(identical(other.deviceBackground, deviceBackground) || other.deviceBackground == deviceBackground));
return identical(this, other) || (other.runtimeType == runtimeType&&other is DeviceCapabilitiesModel&&(identical(other.heartbeats, heartbeats) || other.heartbeats == heartbeats)&&(identical(other.bloodPressure, bloodPressure) || other.bloodPressure == bloodPressure)&&(identical(other.alerts, alerts) || other.alerts == alerts)&&(identical(other.podometer, podometer) || other.podometer == podometer)&&(identical(other.contacts, contacts) || other.contacts == contacts)&&(identical(other.settings, settings) || other.settings == settings)&&(identical(other.commands, commands) || other.commands == commands)&&(identical(other.takepills, takepills) || other.takepills == takepills)&&(identical(other.location, location) || other.location == location)&&(identical(other.camera, camera) || other.camera == camera)&&(identical(other.doNotDisturbs, doNotDisturbs) || other.doNotDisturbs == doNotDisturbs)&&(identical(other.alarms, alarms) || other.alarms == alarms)&&(identical(other.appUsageSchedules, appUsageSchedules) || other.appUsageSchedules == appUsageSchedules)&&(identical(other.keyboard, keyboard) || other.keyboard == keyboard)&&(identical(other.nightMode, nightMode) || other.nightMode == nightMode)&&(identical(other.wifi, wifi) || other.wifi == wifi)&&(identical(other.deviceBackground, deviceBackground) || other.deviceBackground == deviceBackground)&&(identical(other.volume, volume) || other.volume == volume));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,heartbeats,bloodPressure,alerts,podometer,contacts,settings,commands,takepills,location,camera,doNotDisturbs,alarms,appUsageSchedules,keyboard,nightMode,wifi,deviceBackground);
int get hashCode => Object.hash(runtimeType,heartbeats,bloodPressure,alerts,podometer,contacts,settings,commands,takepills,location,camera,doNotDisturbs,alarms,appUsageSchedules,keyboard,nightMode,wifi,deviceBackground,volume);
@override
String toString() {
return 'DeviceCapabilitiesModel(heartbeats: $heartbeats, bloodPressure: $bloodPressure, alerts: $alerts, podometer: $podometer, contacts: $contacts, settings: $settings, commands: $commands, takepills: $takepills, location: $location, camera: $camera, doNotDisturbs: $doNotDisturbs, alarms: $alarms, appUsageSchedules: $appUsageSchedules, keyboard: $keyboard, nightMode: $nightMode, wifi: $wifi, deviceBackground: $deviceBackground)';
return 'DeviceCapabilitiesModel(heartbeats: $heartbeats, bloodPressure: $bloodPressure, alerts: $alerts, podometer: $podometer, contacts: $contacts, settings: $settings, commands: $commands, takepills: $takepills, location: $location, camera: $camera, doNotDisturbs: $doNotDisturbs, alarms: $alarms, appUsageSchedules: $appUsageSchedules, keyboard: $keyboard, nightMode: $nightMode, wifi: $wifi, deviceBackground: $deviceBackground, volume: $volume)';
}
@@ -48,11 +48,11 @@ abstract mixin class $DeviceCapabilitiesModelCopyWith<$Res> {
factory $DeviceCapabilitiesModelCopyWith(DeviceCapabilitiesModel value, $Res Function(DeviceCapabilitiesModel) _then) = _$DeviceCapabilitiesModelCopyWithImpl;
@useResult
$Res call({
DeviceCapabilityOptionModel? heartbeats, DeviceCapabilityEnabledModel? bloodPressure, DeviceCapabilityAlertsModel? alerts, DeviceCapabilityEnabledModel? podometer, DeviceCapabilityContactsModel? contacts, DeviceCapabilitySettingsModel? settings, DeviceCapabilityCommandsModel? commands, DeviceCapabilityTakepillsModel? takepills, DeviceCapabilityOptionModel? location, DeviceCapabilityCameraModel? camera, DeviceCapabilityDoNotDisturbModel? doNotDisturbs, DeviceCapabilityAlarmsModel? alarms, DeviceCapabilityAppUsageModel? appUsageSchedules, DeviceCapabilityEnabledModel? keyboard, DeviceCapabilityEnabledModel? nightMode, DeviceCapabilityEnabledModel? wifi, DeviceCapabilityEnabledModel? deviceBackground
DeviceCapabilityOptionModel? heartbeats, DeviceCapabilityEnabledModel? bloodPressure, DeviceCapabilityAlertsModel? alerts, DeviceCapabilityEnabledModel? podometer, DeviceCapabilityContactsModel? contacts, DeviceCapabilitySettingsModel? settings, DeviceCapabilityCommandsModel? commands, DeviceCapabilityTakepillsModel? takepills, DeviceCapabilityOptionModel? location, DeviceCapabilityCameraModel? camera, DeviceCapabilityDoNotDisturbModel? doNotDisturbs, DeviceCapabilityAlarmsModel? alarms, DeviceCapabilityAppUsageModel? appUsageSchedules, DeviceCapabilityEnabledModel? keyboard, DeviceCapabilityEnabledModel? nightMode, DeviceCapabilityEnabledModel? wifi, DeviceCapabilityEnabledModel? deviceBackground, DeviceCapabilityVolumeModel? volume
});
$DeviceCapabilityOptionModelCopyWith<$Res>? get heartbeats;$DeviceCapabilityEnabledModelCopyWith<$Res>? get bloodPressure;$DeviceCapabilityAlertsModelCopyWith<$Res>? get alerts;$DeviceCapabilityEnabledModelCopyWith<$Res>? get podometer;$DeviceCapabilityContactsModelCopyWith<$Res>? get contacts;$DeviceCapabilitySettingsModelCopyWith<$Res>? get settings;$DeviceCapabilityCommandsModelCopyWith<$Res>? get commands;$DeviceCapabilityTakepillsModelCopyWith<$Res>? get takepills;$DeviceCapabilityOptionModelCopyWith<$Res>? get location;$DeviceCapabilityCameraModelCopyWith<$Res>? get camera;$DeviceCapabilityDoNotDisturbModelCopyWith<$Res>? get doNotDisturbs;$DeviceCapabilityAlarmsModelCopyWith<$Res>? get alarms;$DeviceCapabilityAppUsageModelCopyWith<$Res>? get appUsageSchedules;$DeviceCapabilityEnabledModelCopyWith<$Res>? get keyboard;$DeviceCapabilityEnabledModelCopyWith<$Res>? get nightMode;$DeviceCapabilityEnabledModelCopyWith<$Res>? get wifi;$DeviceCapabilityEnabledModelCopyWith<$Res>? get deviceBackground;
$DeviceCapabilityOptionModelCopyWith<$Res>? get heartbeats;$DeviceCapabilityEnabledModelCopyWith<$Res>? get bloodPressure;$DeviceCapabilityAlertsModelCopyWith<$Res>? get alerts;$DeviceCapabilityEnabledModelCopyWith<$Res>? get podometer;$DeviceCapabilityContactsModelCopyWith<$Res>? get contacts;$DeviceCapabilitySettingsModelCopyWith<$Res>? get settings;$DeviceCapabilityCommandsModelCopyWith<$Res>? get commands;$DeviceCapabilityTakepillsModelCopyWith<$Res>? get takepills;$DeviceCapabilityOptionModelCopyWith<$Res>? get location;$DeviceCapabilityCameraModelCopyWith<$Res>? get camera;$DeviceCapabilityDoNotDisturbModelCopyWith<$Res>? get doNotDisturbs;$DeviceCapabilityAlarmsModelCopyWith<$Res>? get alarms;$DeviceCapabilityAppUsageModelCopyWith<$Res>? get appUsageSchedules;$DeviceCapabilityEnabledModelCopyWith<$Res>? get keyboard;$DeviceCapabilityEnabledModelCopyWith<$Res>? get nightMode;$DeviceCapabilityEnabledModelCopyWith<$Res>? get wifi;$DeviceCapabilityEnabledModelCopyWith<$Res>? get deviceBackground;$DeviceCapabilityVolumeModelCopyWith<$Res>? get volume;
}
/// @nodoc
@@ -65,7 +65,7 @@ class _$DeviceCapabilitiesModelCopyWithImpl<$Res>
/// Create a copy of DeviceCapabilitiesModel
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? heartbeats = freezed,Object? bloodPressure = freezed,Object? alerts = freezed,Object? podometer = freezed,Object? contacts = freezed,Object? settings = freezed,Object? commands = freezed,Object? takepills = freezed,Object? location = freezed,Object? camera = freezed,Object? doNotDisturbs = freezed,Object? alarms = freezed,Object? appUsageSchedules = freezed,Object? keyboard = freezed,Object? nightMode = freezed,Object? wifi = freezed,Object? deviceBackground = freezed,}) {
@pragma('vm:prefer-inline') @override $Res call({Object? heartbeats = freezed,Object? bloodPressure = freezed,Object? alerts = freezed,Object? podometer = freezed,Object? contacts = freezed,Object? settings = freezed,Object? commands = freezed,Object? takepills = freezed,Object? location = freezed,Object? camera = freezed,Object? doNotDisturbs = freezed,Object? alarms = freezed,Object? appUsageSchedules = freezed,Object? keyboard = freezed,Object? nightMode = freezed,Object? wifi = freezed,Object? deviceBackground = freezed,Object? volume = freezed,}) {
return _then(_self.copyWith(
heartbeats: freezed == heartbeats ? _self.heartbeats : heartbeats // ignore: cast_nullable_to_non_nullable
as DeviceCapabilityOptionModel?,bloodPressure: freezed == bloodPressure ? _self.bloodPressure : bloodPressure // ignore: cast_nullable_to_non_nullable
@@ -84,7 +84,8 @@ as DeviceCapabilityAppUsageModel?,keyboard: freezed == keyboard ? _self.keyboard
as DeviceCapabilityEnabledModel?,nightMode: freezed == nightMode ? _self.nightMode : nightMode // ignore: cast_nullable_to_non_nullable
as DeviceCapabilityEnabledModel?,wifi: freezed == wifi ? _self.wifi : wifi // ignore: cast_nullable_to_non_nullable
as DeviceCapabilityEnabledModel?,deviceBackground: freezed == deviceBackground ? _self.deviceBackground : deviceBackground // ignore: cast_nullable_to_non_nullable
as DeviceCapabilityEnabledModel?,
as DeviceCapabilityEnabledModel?,volume: freezed == volume ? _self.volume : volume // ignore: cast_nullable_to_non_nullable
as DeviceCapabilityVolumeModel?,
));
}
/// Create a copy of DeviceCapabilitiesModel
@@ -291,6 +292,18 @@ $DeviceCapabilityEnabledModelCopyWith<$Res>? get deviceBackground {
return $DeviceCapabilityEnabledModelCopyWith<$Res>(_self.deviceBackground!, (value) {
return _then(_self.copyWith(deviceBackground: value));
});
}/// Create a copy of DeviceCapabilitiesModel
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$DeviceCapabilityVolumeModelCopyWith<$Res>? get volume {
if (_self.volume == null) {
return null;
}
return $DeviceCapabilityVolumeModelCopyWith<$Res>(_self.volume!, (value) {
return _then(_self.copyWith(volume: value));
});
}
}
@@ -373,10 +386,10 @@ return $default(_that);case _:
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( DeviceCapabilityOptionModel? heartbeats, DeviceCapabilityEnabledModel? bloodPressure, DeviceCapabilityAlertsModel? alerts, DeviceCapabilityEnabledModel? podometer, DeviceCapabilityContactsModel? contacts, DeviceCapabilitySettingsModel? settings, DeviceCapabilityCommandsModel? commands, DeviceCapabilityTakepillsModel? takepills, DeviceCapabilityOptionModel? location, DeviceCapabilityCameraModel? camera, DeviceCapabilityDoNotDisturbModel? doNotDisturbs, DeviceCapabilityAlarmsModel? alarms, DeviceCapabilityAppUsageModel? appUsageSchedules, DeviceCapabilityEnabledModel? keyboard, DeviceCapabilityEnabledModel? nightMode, DeviceCapabilityEnabledModel? wifi, DeviceCapabilityEnabledModel? deviceBackground)? $default,{required TResult orElse(),}) {final _that = this;
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( DeviceCapabilityOptionModel? heartbeats, DeviceCapabilityEnabledModel? bloodPressure, DeviceCapabilityAlertsModel? alerts, DeviceCapabilityEnabledModel? podometer, DeviceCapabilityContactsModel? contacts, DeviceCapabilitySettingsModel? settings, DeviceCapabilityCommandsModel? commands, DeviceCapabilityTakepillsModel? takepills, DeviceCapabilityOptionModel? location, DeviceCapabilityCameraModel? camera, DeviceCapabilityDoNotDisturbModel? doNotDisturbs, DeviceCapabilityAlarmsModel? alarms, DeviceCapabilityAppUsageModel? appUsageSchedules, DeviceCapabilityEnabledModel? keyboard, DeviceCapabilityEnabledModel? nightMode, DeviceCapabilityEnabledModel? wifi, DeviceCapabilityEnabledModel? deviceBackground, DeviceCapabilityVolumeModel? volume)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _DeviceCapabilitiesModel() when $default != null:
return $default(_that.heartbeats,_that.bloodPressure,_that.alerts,_that.podometer,_that.contacts,_that.settings,_that.commands,_that.takepills,_that.location,_that.camera,_that.doNotDisturbs,_that.alarms,_that.appUsageSchedules,_that.keyboard,_that.nightMode,_that.wifi,_that.deviceBackground);case _:
return $default(_that.heartbeats,_that.bloodPressure,_that.alerts,_that.podometer,_that.contacts,_that.settings,_that.commands,_that.takepills,_that.location,_that.camera,_that.doNotDisturbs,_that.alarms,_that.appUsageSchedules,_that.keyboard,_that.nightMode,_that.wifi,_that.deviceBackground,_that.volume);case _:
return orElse();
}
@@ -394,10 +407,10 @@ return $default(_that.heartbeats,_that.bloodPressure,_that.alerts,_that.podomete
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( DeviceCapabilityOptionModel? heartbeats, DeviceCapabilityEnabledModel? bloodPressure, DeviceCapabilityAlertsModel? alerts, DeviceCapabilityEnabledModel? podometer, DeviceCapabilityContactsModel? contacts, DeviceCapabilitySettingsModel? settings, DeviceCapabilityCommandsModel? commands, DeviceCapabilityTakepillsModel? takepills, DeviceCapabilityOptionModel? location, DeviceCapabilityCameraModel? camera, DeviceCapabilityDoNotDisturbModel? doNotDisturbs, DeviceCapabilityAlarmsModel? alarms, DeviceCapabilityAppUsageModel? appUsageSchedules, DeviceCapabilityEnabledModel? keyboard, DeviceCapabilityEnabledModel? nightMode, DeviceCapabilityEnabledModel? wifi, DeviceCapabilityEnabledModel? deviceBackground) $default,) {final _that = this;
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( DeviceCapabilityOptionModel? heartbeats, DeviceCapabilityEnabledModel? bloodPressure, DeviceCapabilityAlertsModel? alerts, DeviceCapabilityEnabledModel? podometer, DeviceCapabilityContactsModel? contacts, DeviceCapabilitySettingsModel? settings, DeviceCapabilityCommandsModel? commands, DeviceCapabilityTakepillsModel? takepills, DeviceCapabilityOptionModel? location, DeviceCapabilityCameraModel? camera, DeviceCapabilityDoNotDisturbModel? doNotDisturbs, DeviceCapabilityAlarmsModel? alarms, DeviceCapabilityAppUsageModel? appUsageSchedules, DeviceCapabilityEnabledModel? keyboard, DeviceCapabilityEnabledModel? nightMode, DeviceCapabilityEnabledModel? wifi, DeviceCapabilityEnabledModel? deviceBackground, DeviceCapabilityVolumeModel? volume) $default,) {final _that = this;
switch (_that) {
case _DeviceCapabilitiesModel():
return $default(_that.heartbeats,_that.bloodPressure,_that.alerts,_that.podometer,_that.contacts,_that.settings,_that.commands,_that.takepills,_that.location,_that.camera,_that.doNotDisturbs,_that.alarms,_that.appUsageSchedules,_that.keyboard,_that.nightMode,_that.wifi,_that.deviceBackground);case _:
return $default(_that.heartbeats,_that.bloodPressure,_that.alerts,_that.podometer,_that.contacts,_that.settings,_that.commands,_that.takepills,_that.location,_that.camera,_that.doNotDisturbs,_that.alarms,_that.appUsageSchedules,_that.keyboard,_that.nightMode,_that.wifi,_that.deviceBackground,_that.volume);case _:
throw StateError('Unexpected subclass');
}
@@ -414,10 +427,10 @@ return $default(_that.heartbeats,_that.bloodPressure,_that.alerts,_that.podomete
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( DeviceCapabilityOptionModel? heartbeats, DeviceCapabilityEnabledModel? bloodPressure, DeviceCapabilityAlertsModel? alerts, DeviceCapabilityEnabledModel? podometer, DeviceCapabilityContactsModel? contacts, DeviceCapabilitySettingsModel? settings, DeviceCapabilityCommandsModel? commands, DeviceCapabilityTakepillsModel? takepills, DeviceCapabilityOptionModel? location, DeviceCapabilityCameraModel? camera, DeviceCapabilityDoNotDisturbModel? doNotDisturbs, DeviceCapabilityAlarmsModel? alarms, DeviceCapabilityAppUsageModel? appUsageSchedules, DeviceCapabilityEnabledModel? keyboard, DeviceCapabilityEnabledModel? nightMode, DeviceCapabilityEnabledModel? wifi, DeviceCapabilityEnabledModel? deviceBackground)? $default,) {final _that = this;
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( DeviceCapabilityOptionModel? heartbeats, DeviceCapabilityEnabledModel? bloodPressure, DeviceCapabilityAlertsModel? alerts, DeviceCapabilityEnabledModel? podometer, DeviceCapabilityContactsModel? contacts, DeviceCapabilitySettingsModel? settings, DeviceCapabilityCommandsModel? commands, DeviceCapabilityTakepillsModel? takepills, DeviceCapabilityOptionModel? location, DeviceCapabilityCameraModel? camera, DeviceCapabilityDoNotDisturbModel? doNotDisturbs, DeviceCapabilityAlarmsModel? alarms, DeviceCapabilityAppUsageModel? appUsageSchedules, DeviceCapabilityEnabledModel? keyboard, DeviceCapabilityEnabledModel? nightMode, DeviceCapabilityEnabledModel? wifi, DeviceCapabilityEnabledModel? deviceBackground, DeviceCapabilityVolumeModel? volume)? $default,) {final _that = this;
switch (_that) {
case _DeviceCapabilitiesModel() when $default != null:
return $default(_that.heartbeats,_that.bloodPressure,_that.alerts,_that.podometer,_that.contacts,_that.settings,_that.commands,_that.takepills,_that.location,_that.camera,_that.doNotDisturbs,_that.alarms,_that.appUsageSchedules,_that.keyboard,_that.nightMode,_that.wifi,_that.deviceBackground);case _:
return $default(_that.heartbeats,_that.bloodPressure,_that.alerts,_that.podometer,_that.contacts,_that.settings,_that.commands,_that.takepills,_that.location,_that.camera,_that.doNotDisturbs,_that.alarms,_that.appUsageSchedules,_that.keyboard,_that.nightMode,_that.wifi,_that.deviceBackground,_that.volume);case _:
return null;
}
@@ -429,7 +442,7 @@ return $default(_that.heartbeats,_that.bloodPressure,_that.alerts,_that.podomete
@JsonSerializable()
class _DeviceCapabilitiesModel implements DeviceCapabilitiesModel {
const _DeviceCapabilitiesModel({this.heartbeats, this.bloodPressure, this.alerts, this.podometer, this.contacts, this.settings, this.commands, this.takepills, this.location, this.camera, this.doNotDisturbs, this.alarms, this.appUsageSchedules, this.keyboard, this.nightMode, this.wifi, this.deviceBackground});
const _DeviceCapabilitiesModel({this.heartbeats, this.bloodPressure, this.alerts, this.podometer, this.contacts, this.settings, this.commands, this.takepills, this.location, this.camera, this.doNotDisturbs, this.alarms, this.appUsageSchedules, this.keyboard, this.nightMode, this.wifi, this.deviceBackground, this.volume});
factory _DeviceCapabilitiesModel.fromJson(Map<String, dynamic> json) => _$DeviceCapabilitiesModelFromJson(json);
@override final DeviceCapabilityOptionModel? heartbeats;
@@ -449,6 +462,7 @@ class _DeviceCapabilitiesModel implements DeviceCapabilitiesModel {
@override final DeviceCapabilityEnabledModel? nightMode;
@override final DeviceCapabilityEnabledModel? wifi;
@override final DeviceCapabilityEnabledModel? deviceBackground;
@override final DeviceCapabilityVolumeModel? volume;
/// Create a copy of DeviceCapabilitiesModel
/// with the given fields replaced by the non-null parameter values.
@@ -463,16 +477,16 @@ Map<String, dynamic> toJson() {
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _DeviceCapabilitiesModel&&(identical(other.heartbeats, heartbeats) || other.heartbeats == heartbeats)&&(identical(other.bloodPressure, bloodPressure) || other.bloodPressure == bloodPressure)&&(identical(other.alerts, alerts) || other.alerts == alerts)&&(identical(other.podometer, podometer) || other.podometer == podometer)&&(identical(other.contacts, contacts) || other.contacts == contacts)&&(identical(other.settings, settings) || other.settings == settings)&&(identical(other.commands, commands) || other.commands == commands)&&(identical(other.takepills, takepills) || other.takepills == takepills)&&(identical(other.location, location) || other.location == location)&&(identical(other.camera, camera) || other.camera == camera)&&(identical(other.doNotDisturbs, doNotDisturbs) || other.doNotDisturbs == doNotDisturbs)&&(identical(other.alarms, alarms) || other.alarms == alarms)&&(identical(other.appUsageSchedules, appUsageSchedules) || other.appUsageSchedules == appUsageSchedules)&&(identical(other.keyboard, keyboard) || other.keyboard == keyboard)&&(identical(other.nightMode, nightMode) || other.nightMode == nightMode)&&(identical(other.wifi, wifi) || other.wifi == wifi)&&(identical(other.deviceBackground, deviceBackground) || other.deviceBackground == deviceBackground));
return identical(this, other) || (other.runtimeType == runtimeType&&other is _DeviceCapabilitiesModel&&(identical(other.heartbeats, heartbeats) || other.heartbeats == heartbeats)&&(identical(other.bloodPressure, bloodPressure) || other.bloodPressure == bloodPressure)&&(identical(other.alerts, alerts) || other.alerts == alerts)&&(identical(other.podometer, podometer) || other.podometer == podometer)&&(identical(other.contacts, contacts) || other.contacts == contacts)&&(identical(other.settings, settings) || other.settings == settings)&&(identical(other.commands, commands) || other.commands == commands)&&(identical(other.takepills, takepills) || other.takepills == takepills)&&(identical(other.location, location) || other.location == location)&&(identical(other.camera, camera) || other.camera == camera)&&(identical(other.doNotDisturbs, doNotDisturbs) || other.doNotDisturbs == doNotDisturbs)&&(identical(other.alarms, alarms) || other.alarms == alarms)&&(identical(other.appUsageSchedules, appUsageSchedules) || other.appUsageSchedules == appUsageSchedules)&&(identical(other.keyboard, keyboard) || other.keyboard == keyboard)&&(identical(other.nightMode, nightMode) || other.nightMode == nightMode)&&(identical(other.wifi, wifi) || other.wifi == wifi)&&(identical(other.deviceBackground, deviceBackground) || other.deviceBackground == deviceBackground)&&(identical(other.volume, volume) || other.volume == volume));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,heartbeats,bloodPressure,alerts,podometer,contacts,settings,commands,takepills,location,camera,doNotDisturbs,alarms,appUsageSchedules,keyboard,nightMode,wifi,deviceBackground);
int get hashCode => Object.hash(runtimeType,heartbeats,bloodPressure,alerts,podometer,contacts,settings,commands,takepills,location,camera,doNotDisturbs,alarms,appUsageSchedules,keyboard,nightMode,wifi,deviceBackground,volume);
@override
String toString() {
return 'DeviceCapabilitiesModel(heartbeats: $heartbeats, bloodPressure: $bloodPressure, alerts: $alerts, podometer: $podometer, contacts: $contacts, settings: $settings, commands: $commands, takepills: $takepills, location: $location, camera: $camera, doNotDisturbs: $doNotDisturbs, alarms: $alarms, appUsageSchedules: $appUsageSchedules, keyboard: $keyboard, nightMode: $nightMode, wifi: $wifi, deviceBackground: $deviceBackground)';
return 'DeviceCapabilitiesModel(heartbeats: $heartbeats, bloodPressure: $bloodPressure, alerts: $alerts, podometer: $podometer, contacts: $contacts, settings: $settings, commands: $commands, takepills: $takepills, location: $location, camera: $camera, doNotDisturbs: $doNotDisturbs, alarms: $alarms, appUsageSchedules: $appUsageSchedules, keyboard: $keyboard, nightMode: $nightMode, wifi: $wifi, deviceBackground: $deviceBackground, volume: $volume)';
}
@@ -483,11 +497,11 @@ abstract mixin class _$DeviceCapabilitiesModelCopyWith<$Res> implements $DeviceC
factory _$DeviceCapabilitiesModelCopyWith(_DeviceCapabilitiesModel value, $Res Function(_DeviceCapabilitiesModel) _then) = __$DeviceCapabilitiesModelCopyWithImpl;
@override @useResult
$Res call({
DeviceCapabilityOptionModel? heartbeats, DeviceCapabilityEnabledModel? bloodPressure, DeviceCapabilityAlertsModel? alerts, DeviceCapabilityEnabledModel? podometer, DeviceCapabilityContactsModel? contacts, DeviceCapabilitySettingsModel? settings, DeviceCapabilityCommandsModel? commands, DeviceCapabilityTakepillsModel? takepills, DeviceCapabilityOptionModel? location, DeviceCapabilityCameraModel? camera, DeviceCapabilityDoNotDisturbModel? doNotDisturbs, DeviceCapabilityAlarmsModel? alarms, DeviceCapabilityAppUsageModel? appUsageSchedules, DeviceCapabilityEnabledModel? keyboard, DeviceCapabilityEnabledModel? nightMode, DeviceCapabilityEnabledModel? wifi, DeviceCapabilityEnabledModel? deviceBackground
DeviceCapabilityOptionModel? heartbeats, DeviceCapabilityEnabledModel? bloodPressure, DeviceCapabilityAlertsModel? alerts, DeviceCapabilityEnabledModel? podometer, DeviceCapabilityContactsModel? contacts, DeviceCapabilitySettingsModel? settings, DeviceCapabilityCommandsModel? commands, DeviceCapabilityTakepillsModel? takepills, DeviceCapabilityOptionModel? location, DeviceCapabilityCameraModel? camera, DeviceCapabilityDoNotDisturbModel? doNotDisturbs, DeviceCapabilityAlarmsModel? alarms, DeviceCapabilityAppUsageModel? appUsageSchedules, DeviceCapabilityEnabledModel? keyboard, DeviceCapabilityEnabledModel? nightMode, DeviceCapabilityEnabledModel? wifi, DeviceCapabilityEnabledModel? deviceBackground, DeviceCapabilityVolumeModel? volume
});
@override $DeviceCapabilityOptionModelCopyWith<$Res>? get heartbeats;@override $DeviceCapabilityEnabledModelCopyWith<$Res>? get bloodPressure;@override $DeviceCapabilityAlertsModelCopyWith<$Res>? get alerts;@override $DeviceCapabilityEnabledModelCopyWith<$Res>? get podometer;@override $DeviceCapabilityContactsModelCopyWith<$Res>? get contacts;@override $DeviceCapabilitySettingsModelCopyWith<$Res>? get settings;@override $DeviceCapabilityCommandsModelCopyWith<$Res>? get commands;@override $DeviceCapabilityTakepillsModelCopyWith<$Res>? get takepills;@override $DeviceCapabilityOptionModelCopyWith<$Res>? get location;@override $DeviceCapabilityCameraModelCopyWith<$Res>? get camera;@override $DeviceCapabilityDoNotDisturbModelCopyWith<$Res>? get doNotDisturbs;@override $DeviceCapabilityAlarmsModelCopyWith<$Res>? get alarms;@override $DeviceCapabilityAppUsageModelCopyWith<$Res>? get appUsageSchedules;@override $DeviceCapabilityEnabledModelCopyWith<$Res>? get keyboard;@override $DeviceCapabilityEnabledModelCopyWith<$Res>? get nightMode;@override $DeviceCapabilityEnabledModelCopyWith<$Res>? get wifi;@override $DeviceCapabilityEnabledModelCopyWith<$Res>? get deviceBackground;
@override $DeviceCapabilityOptionModelCopyWith<$Res>? get heartbeats;@override $DeviceCapabilityEnabledModelCopyWith<$Res>? get bloodPressure;@override $DeviceCapabilityAlertsModelCopyWith<$Res>? get alerts;@override $DeviceCapabilityEnabledModelCopyWith<$Res>? get podometer;@override $DeviceCapabilityContactsModelCopyWith<$Res>? get contacts;@override $DeviceCapabilitySettingsModelCopyWith<$Res>? get settings;@override $DeviceCapabilityCommandsModelCopyWith<$Res>? get commands;@override $DeviceCapabilityTakepillsModelCopyWith<$Res>? get takepills;@override $DeviceCapabilityOptionModelCopyWith<$Res>? get location;@override $DeviceCapabilityCameraModelCopyWith<$Res>? get camera;@override $DeviceCapabilityDoNotDisturbModelCopyWith<$Res>? get doNotDisturbs;@override $DeviceCapabilityAlarmsModelCopyWith<$Res>? get alarms;@override $DeviceCapabilityAppUsageModelCopyWith<$Res>? get appUsageSchedules;@override $DeviceCapabilityEnabledModelCopyWith<$Res>? get keyboard;@override $DeviceCapabilityEnabledModelCopyWith<$Res>? get nightMode;@override $DeviceCapabilityEnabledModelCopyWith<$Res>? get wifi;@override $DeviceCapabilityEnabledModelCopyWith<$Res>? get deviceBackground;@override $DeviceCapabilityVolumeModelCopyWith<$Res>? get volume;
}
/// @nodoc
@@ -500,7 +514,7 @@ class __$DeviceCapabilitiesModelCopyWithImpl<$Res>
/// Create a copy of DeviceCapabilitiesModel
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? heartbeats = freezed,Object? bloodPressure = freezed,Object? alerts = freezed,Object? podometer = freezed,Object? contacts = freezed,Object? settings = freezed,Object? commands = freezed,Object? takepills = freezed,Object? location = freezed,Object? camera = freezed,Object? doNotDisturbs = freezed,Object? alarms = freezed,Object? appUsageSchedules = freezed,Object? keyboard = freezed,Object? nightMode = freezed,Object? wifi = freezed,Object? deviceBackground = freezed,}) {
@override @pragma('vm:prefer-inline') $Res call({Object? heartbeats = freezed,Object? bloodPressure = freezed,Object? alerts = freezed,Object? podometer = freezed,Object? contacts = freezed,Object? settings = freezed,Object? commands = freezed,Object? takepills = freezed,Object? location = freezed,Object? camera = freezed,Object? doNotDisturbs = freezed,Object? alarms = freezed,Object? appUsageSchedules = freezed,Object? keyboard = freezed,Object? nightMode = freezed,Object? wifi = freezed,Object? deviceBackground = freezed,Object? volume = freezed,}) {
return _then(_DeviceCapabilitiesModel(
heartbeats: freezed == heartbeats ? _self.heartbeats : heartbeats // ignore: cast_nullable_to_non_nullable
as DeviceCapabilityOptionModel?,bloodPressure: freezed == bloodPressure ? _self.bloodPressure : bloodPressure // ignore: cast_nullable_to_non_nullable
@@ -519,7 +533,8 @@ as DeviceCapabilityAppUsageModel?,keyboard: freezed == keyboard ? _self.keyboard
as DeviceCapabilityEnabledModel?,nightMode: freezed == nightMode ? _self.nightMode : nightMode // ignore: cast_nullable_to_non_nullable
as DeviceCapabilityEnabledModel?,wifi: freezed == wifi ? _self.wifi : wifi // ignore: cast_nullable_to_non_nullable
as DeviceCapabilityEnabledModel?,deviceBackground: freezed == deviceBackground ? _self.deviceBackground : deviceBackground // ignore: cast_nullable_to_non_nullable
as DeviceCapabilityEnabledModel?,
as DeviceCapabilityEnabledModel?,volume: freezed == volume ? _self.volume : volume // ignore: cast_nullable_to_non_nullable
as DeviceCapabilityVolumeModel?,
));
}
@@ -727,6 +742,18 @@ $DeviceCapabilityEnabledModelCopyWith<$Res>? get deviceBackground {
return $DeviceCapabilityEnabledModelCopyWith<$Res>(_self.deviceBackground!, (value) {
return _then(_self.copyWith(deviceBackground: value));
});
}/// Create a copy of DeviceCapabilitiesModel
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$DeviceCapabilityVolumeModelCopyWith<$Res>? get volume {
if (_self.volume == null) {
return null;
}
return $DeviceCapabilityVolumeModelCopyWith<$Res>(_self.volume!, (value) {
return _then(_self.copyWith(volume: value));
});
}
}
@@ -3950,6 +3977,275 @@ as int,
}
}
/// @nodoc
mixin _$DeviceCapabilityVolumeModel {
int get media; int get ringtone; int get alarm;
/// Create a copy of DeviceCapabilityVolumeModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$DeviceCapabilityVolumeModelCopyWith<DeviceCapabilityVolumeModel> get copyWith => _$DeviceCapabilityVolumeModelCopyWithImpl<DeviceCapabilityVolumeModel>(this as DeviceCapabilityVolumeModel, _$identity);
/// Serializes this DeviceCapabilityVolumeModel to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is DeviceCapabilityVolumeModel&&(identical(other.media, media) || other.media == media)&&(identical(other.ringtone, ringtone) || other.ringtone == ringtone)&&(identical(other.alarm, alarm) || other.alarm == alarm));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,media,ringtone,alarm);
@override
String toString() {
return 'DeviceCapabilityVolumeModel(media: $media, ringtone: $ringtone, alarm: $alarm)';
}
}
/// @nodoc
abstract mixin class $DeviceCapabilityVolumeModelCopyWith<$Res> {
factory $DeviceCapabilityVolumeModelCopyWith(DeviceCapabilityVolumeModel value, $Res Function(DeviceCapabilityVolumeModel) _then) = _$DeviceCapabilityVolumeModelCopyWithImpl;
@useResult
$Res call({
int media, int ringtone, int alarm
});
}
/// @nodoc
class _$DeviceCapabilityVolumeModelCopyWithImpl<$Res>
implements $DeviceCapabilityVolumeModelCopyWith<$Res> {
_$DeviceCapabilityVolumeModelCopyWithImpl(this._self, this._then);
final DeviceCapabilityVolumeModel _self;
final $Res Function(DeviceCapabilityVolumeModel) _then;
/// Create a copy of DeviceCapabilityVolumeModel
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? media = null,Object? ringtone = null,Object? alarm = null,}) {
return _then(_self.copyWith(
media: null == media ? _self.media : media // ignore: cast_nullable_to_non_nullable
as int,ringtone: null == ringtone ? _self.ringtone : ringtone // ignore: cast_nullable_to_non_nullable
as int,alarm: null == alarm ? _self.alarm : alarm // ignore: cast_nullable_to_non_nullable
as int,
));
}
}
/// Adds pattern-matching-related methods to [DeviceCapabilityVolumeModel].
extension DeviceCapabilityVolumeModelPatterns on DeviceCapabilityVolumeModel {
/// 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 extends Object?>(TResult Function( _DeviceCapabilityVolumeModel value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _DeviceCapabilityVolumeModel() 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 extends Object?>(TResult Function( _DeviceCapabilityVolumeModel value) $default,){
final _that = this;
switch (_that) {
case _DeviceCapabilityVolumeModel():
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 extends Object?>(TResult? Function( _DeviceCapabilityVolumeModel value)? $default,){
final _that = this;
switch (_that) {
case _DeviceCapabilityVolumeModel() 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 extends Object?>(TResult Function( int media, int ringtone, int alarm)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _DeviceCapabilityVolumeModel() when $default != null:
return $default(_that.media,_that.ringtone,_that.alarm);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 extends Object?>(TResult Function( int media, int ringtone, int alarm) $default,) {final _that = this;
switch (_that) {
case _DeviceCapabilityVolumeModel():
return $default(_that.media,_that.ringtone,_that.alarm);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 extends Object?>(TResult? Function( int media, int ringtone, int alarm)? $default,) {final _that = this;
switch (_that) {
case _DeviceCapabilityVolumeModel() when $default != null:
return $default(_that.media,_that.ringtone,_that.alarm);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _DeviceCapabilityVolumeModel implements DeviceCapabilityVolumeModel {
const _DeviceCapabilityVolumeModel({this.media = 10, this.ringtone = 10, this.alarm = 10});
factory _DeviceCapabilityVolumeModel.fromJson(Map<String, dynamic> json) => _$DeviceCapabilityVolumeModelFromJson(json);
@override@JsonKey() final int media;
@override@JsonKey() final int ringtone;
@override@JsonKey() final int alarm;
/// Create a copy of DeviceCapabilityVolumeModel
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$DeviceCapabilityVolumeModelCopyWith<_DeviceCapabilityVolumeModel> get copyWith => __$DeviceCapabilityVolumeModelCopyWithImpl<_DeviceCapabilityVolumeModel>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$DeviceCapabilityVolumeModelToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _DeviceCapabilityVolumeModel&&(identical(other.media, media) || other.media == media)&&(identical(other.ringtone, ringtone) || other.ringtone == ringtone)&&(identical(other.alarm, alarm) || other.alarm == alarm));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,media,ringtone,alarm);
@override
String toString() {
return 'DeviceCapabilityVolumeModel(media: $media, ringtone: $ringtone, alarm: $alarm)';
}
}
/// @nodoc
abstract mixin class _$DeviceCapabilityVolumeModelCopyWith<$Res> implements $DeviceCapabilityVolumeModelCopyWith<$Res> {
factory _$DeviceCapabilityVolumeModelCopyWith(_DeviceCapabilityVolumeModel value, $Res Function(_DeviceCapabilityVolumeModel) _then) = __$DeviceCapabilityVolumeModelCopyWithImpl;
@override @useResult
$Res call({
int media, int ringtone, int alarm
});
}
/// @nodoc
class __$DeviceCapabilityVolumeModelCopyWithImpl<$Res>
implements _$DeviceCapabilityVolumeModelCopyWith<$Res> {
__$DeviceCapabilityVolumeModelCopyWithImpl(this._self, this._then);
final _DeviceCapabilityVolumeModel _self;
final $Res Function(_DeviceCapabilityVolumeModel) _then;
/// Create a copy of DeviceCapabilityVolumeModel
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? media = null,Object? ringtone = null,Object? alarm = null,}) {
return _then(_DeviceCapabilityVolumeModel(
media: null == media ? _self.media : media // ignore: cast_nullable_to_non_nullable
as int,ringtone: null == ringtone ? _self.ringtone : ringtone // ignore: cast_nullable_to_non_nullable
as int,alarm: null == alarm ? _self.alarm : alarm // ignore: cast_nullable_to_non_nullable
as int,
));
}
}
// dart format on

View File

@@ -94,6 +94,11 @@ _DeviceCapabilitiesModel _$DeviceCapabilitiesModelFromJson(
: DeviceCapabilityEnabledModel.fromJson(
json['deviceBackground'] as Map<String, dynamic>,
),
volume: json['volume'] == null
? null
: DeviceCapabilityVolumeModel.fromJson(
json['volume'] as Map<String, dynamic>,
),
);
Map<String, dynamic> _$DeviceCapabilitiesModelToJson(
@@ -116,6 +121,7 @@ Map<String, dynamic> _$DeviceCapabilitiesModelToJson(
'nightMode': instance.nightMode,
'wifi': instance.wifi,
'deviceBackground': instance.deviceBackground,
'volume': instance.volume,
};
_DeviceCapabilityEnabledModel _$DeviceCapabilityEnabledModelFromJson(
@@ -285,3 +291,19 @@ _DeviceCapabilityAppUsageModel _$DeviceCapabilityAppUsageModelFromJson(
Map<String, dynamic> _$DeviceCapabilityAppUsageModelToJson(
_DeviceCapabilityAppUsageModel instance,
) => <String, dynamic>{'maxPeriods': instance.maxPeriods};
_DeviceCapabilityVolumeModel _$DeviceCapabilityVolumeModelFromJson(
Map<String, dynamic> json,
) => _DeviceCapabilityVolumeModel(
media: (json['media'] as num?)?.toInt() ?? 10,
ringtone: (json['ringtone'] as num?)?.toInt() ?? 10,
alarm: (json['alarm'] as num?)?.toInt() ?? 10,
);
Map<String, dynamic> _$DeviceCapabilityVolumeModelToJson(
_DeviceCapabilityVolumeModel instance,
) => <String, dynamic>{
'media': instance.media,
'ringtone': instance.ringtone,
'alarm': instance.alarm,
};

View File

@@ -22,6 +22,7 @@ abstract class DeviceCapabilitiesEntity with _$DeviceCapabilitiesEntity {
DeviceCapabilityEnabledEntity? nightMode,
DeviceCapabilityEnabledEntity? wifi,
DeviceCapabilityEnabledEntity? deviceBackground,
DeviceCapabilityVolumeEntity? volume,
}) = _DeviceCapabilitiesEntity;
}
@@ -135,3 +136,13 @@ abstract class DeviceCapabilityAppUsageEntity
@Default(3) int maxPeriods,
}) = _DeviceCapabilityAppUsageEntity;
}
@freezed
abstract class DeviceCapabilityVolumeEntity
with _$DeviceCapabilityVolumeEntity {
const factory DeviceCapabilityVolumeEntity({
@Default(10) int media,
@Default(10) int ringtone,
@Default(10) int alarm,
}) = _DeviceCapabilityVolumeEntity;
}

View File

@@ -14,7 +14,7 @@ T _$identity<T>(T value) => value;
/// @nodoc
mixin _$DeviceCapabilitiesEntity {
DeviceCapabilityOptionEntity? get heartbeats; DeviceCapabilityEnabledEntity? get bloodPressure; DeviceCapabilityAlertsEntity? get alerts; DeviceCapabilityEnabledEntity? get podometer; DeviceCapabilityContactsEntity? get contacts; DeviceCapabilitySettingsEntity? get settings; DeviceCapabilityCommandsEntity? get commands; DeviceCapabilityTakepillsEntity? get takepills; DeviceCapabilityOptionEntity? get location; DeviceCapabilityCameraEntity? get camera; DeviceCapabilityDoNotDisturbEntity? get doNotDisturbs; DeviceCapabilityAlarmsEntity? get alarms; DeviceCapabilityAppUsageEntity? get appUsageSchedules; DeviceCapabilityEnabledEntity? get keyboard; DeviceCapabilityEnabledEntity? get nightMode; DeviceCapabilityEnabledEntity? get wifi; DeviceCapabilityEnabledEntity? get deviceBackground;
DeviceCapabilityOptionEntity? get heartbeats; DeviceCapabilityEnabledEntity? get bloodPressure; DeviceCapabilityAlertsEntity? get alerts; DeviceCapabilityEnabledEntity? get podometer; DeviceCapabilityContactsEntity? get contacts; DeviceCapabilitySettingsEntity? get settings; DeviceCapabilityCommandsEntity? get commands; DeviceCapabilityTakepillsEntity? get takepills; DeviceCapabilityOptionEntity? get location; DeviceCapabilityCameraEntity? get camera; DeviceCapabilityDoNotDisturbEntity? get doNotDisturbs; DeviceCapabilityAlarmsEntity? get alarms; DeviceCapabilityAppUsageEntity? get appUsageSchedules; DeviceCapabilityEnabledEntity? get keyboard; DeviceCapabilityEnabledEntity? get nightMode; DeviceCapabilityEnabledEntity? get wifi; DeviceCapabilityEnabledEntity? get deviceBackground; DeviceCapabilityVolumeEntity? get volume;
/// Create a copy of DeviceCapabilitiesEntity
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@@ -25,16 +25,16 @@ $DeviceCapabilitiesEntityCopyWith<DeviceCapabilitiesEntity> get copyWith => _$De
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is DeviceCapabilitiesEntity&&(identical(other.heartbeats, heartbeats) || other.heartbeats == heartbeats)&&(identical(other.bloodPressure, bloodPressure) || other.bloodPressure == bloodPressure)&&(identical(other.alerts, alerts) || other.alerts == alerts)&&(identical(other.podometer, podometer) || other.podometer == podometer)&&(identical(other.contacts, contacts) || other.contacts == contacts)&&(identical(other.settings, settings) || other.settings == settings)&&(identical(other.commands, commands) || other.commands == commands)&&(identical(other.takepills, takepills) || other.takepills == takepills)&&(identical(other.location, location) || other.location == location)&&(identical(other.camera, camera) || other.camera == camera)&&(identical(other.doNotDisturbs, doNotDisturbs) || other.doNotDisturbs == doNotDisturbs)&&(identical(other.alarms, alarms) || other.alarms == alarms)&&(identical(other.appUsageSchedules, appUsageSchedules) || other.appUsageSchedules == appUsageSchedules)&&(identical(other.keyboard, keyboard) || other.keyboard == keyboard)&&(identical(other.nightMode, nightMode) || other.nightMode == nightMode)&&(identical(other.wifi, wifi) || other.wifi == wifi)&&(identical(other.deviceBackground, deviceBackground) || other.deviceBackground == deviceBackground));
return identical(this, other) || (other.runtimeType == runtimeType&&other is DeviceCapabilitiesEntity&&(identical(other.heartbeats, heartbeats) || other.heartbeats == heartbeats)&&(identical(other.bloodPressure, bloodPressure) || other.bloodPressure == bloodPressure)&&(identical(other.alerts, alerts) || other.alerts == alerts)&&(identical(other.podometer, podometer) || other.podometer == podometer)&&(identical(other.contacts, contacts) || other.contacts == contacts)&&(identical(other.settings, settings) || other.settings == settings)&&(identical(other.commands, commands) || other.commands == commands)&&(identical(other.takepills, takepills) || other.takepills == takepills)&&(identical(other.location, location) || other.location == location)&&(identical(other.camera, camera) || other.camera == camera)&&(identical(other.doNotDisturbs, doNotDisturbs) || other.doNotDisturbs == doNotDisturbs)&&(identical(other.alarms, alarms) || other.alarms == alarms)&&(identical(other.appUsageSchedules, appUsageSchedules) || other.appUsageSchedules == appUsageSchedules)&&(identical(other.keyboard, keyboard) || other.keyboard == keyboard)&&(identical(other.nightMode, nightMode) || other.nightMode == nightMode)&&(identical(other.wifi, wifi) || other.wifi == wifi)&&(identical(other.deviceBackground, deviceBackground) || other.deviceBackground == deviceBackground)&&(identical(other.volume, volume) || other.volume == volume));
}
@override
int get hashCode => Object.hash(runtimeType,heartbeats,bloodPressure,alerts,podometer,contacts,settings,commands,takepills,location,camera,doNotDisturbs,alarms,appUsageSchedules,keyboard,nightMode,wifi,deviceBackground);
int get hashCode => Object.hash(runtimeType,heartbeats,bloodPressure,alerts,podometer,contacts,settings,commands,takepills,location,camera,doNotDisturbs,alarms,appUsageSchedules,keyboard,nightMode,wifi,deviceBackground,volume);
@override
String toString() {
return 'DeviceCapabilitiesEntity(heartbeats: $heartbeats, bloodPressure: $bloodPressure, alerts: $alerts, podometer: $podometer, contacts: $contacts, settings: $settings, commands: $commands, takepills: $takepills, location: $location, camera: $camera, doNotDisturbs: $doNotDisturbs, alarms: $alarms, appUsageSchedules: $appUsageSchedules, keyboard: $keyboard, nightMode: $nightMode, wifi: $wifi, deviceBackground: $deviceBackground)';
return 'DeviceCapabilitiesEntity(heartbeats: $heartbeats, bloodPressure: $bloodPressure, alerts: $alerts, podometer: $podometer, contacts: $contacts, settings: $settings, commands: $commands, takepills: $takepills, location: $location, camera: $camera, doNotDisturbs: $doNotDisturbs, alarms: $alarms, appUsageSchedules: $appUsageSchedules, keyboard: $keyboard, nightMode: $nightMode, wifi: $wifi, deviceBackground: $deviceBackground, volume: $volume)';
}
@@ -45,11 +45,11 @@ abstract mixin class $DeviceCapabilitiesEntityCopyWith<$Res> {
factory $DeviceCapabilitiesEntityCopyWith(DeviceCapabilitiesEntity value, $Res Function(DeviceCapabilitiesEntity) _then) = _$DeviceCapabilitiesEntityCopyWithImpl;
@useResult
$Res call({
DeviceCapabilityOptionEntity? heartbeats, DeviceCapabilityEnabledEntity? bloodPressure, DeviceCapabilityAlertsEntity? alerts, DeviceCapabilityEnabledEntity? podometer, DeviceCapabilityContactsEntity? contacts, DeviceCapabilitySettingsEntity? settings, DeviceCapabilityCommandsEntity? commands, DeviceCapabilityTakepillsEntity? takepills, DeviceCapabilityOptionEntity? location, DeviceCapabilityCameraEntity? camera, DeviceCapabilityDoNotDisturbEntity? doNotDisturbs, DeviceCapabilityAlarmsEntity? alarms, DeviceCapabilityAppUsageEntity? appUsageSchedules, DeviceCapabilityEnabledEntity? keyboard, DeviceCapabilityEnabledEntity? nightMode, DeviceCapabilityEnabledEntity? wifi, DeviceCapabilityEnabledEntity? deviceBackground
DeviceCapabilityOptionEntity? heartbeats, DeviceCapabilityEnabledEntity? bloodPressure, DeviceCapabilityAlertsEntity? alerts, DeviceCapabilityEnabledEntity? podometer, DeviceCapabilityContactsEntity? contacts, DeviceCapabilitySettingsEntity? settings, DeviceCapabilityCommandsEntity? commands, DeviceCapabilityTakepillsEntity? takepills, DeviceCapabilityOptionEntity? location, DeviceCapabilityCameraEntity? camera, DeviceCapabilityDoNotDisturbEntity? doNotDisturbs, DeviceCapabilityAlarmsEntity? alarms, DeviceCapabilityAppUsageEntity? appUsageSchedules, DeviceCapabilityEnabledEntity? keyboard, DeviceCapabilityEnabledEntity? nightMode, DeviceCapabilityEnabledEntity? wifi, DeviceCapabilityEnabledEntity? deviceBackground, DeviceCapabilityVolumeEntity? volume
});
$DeviceCapabilityOptionEntityCopyWith<$Res>? get heartbeats;$DeviceCapabilityEnabledEntityCopyWith<$Res>? get bloodPressure;$DeviceCapabilityAlertsEntityCopyWith<$Res>? get alerts;$DeviceCapabilityEnabledEntityCopyWith<$Res>? get podometer;$DeviceCapabilityContactsEntityCopyWith<$Res>? get contacts;$DeviceCapabilitySettingsEntityCopyWith<$Res>? get settings;$DeviceCapabilityCommandsEntityCopyWith<$Res>? get commands;$DeviceCapabilityTakepillsEntityCopyWith<$Res>? get takepills;$DeviceCapabilityOptionEntityCopyWith<$Res>? get location;$DeviceCapabilityCameraEntityCopyWith<$Res>? get camera;$DeviceCapabilityDoNotDisturbEntityCopyWith<$Res>? get doNotDisturbs;$DeviceCapabilityAlarmsEntityCopyWith<$Res>? get alarms;$DeviceCapabilityAppUsageEntityCopyWith<$Res>? get appUsageSchedules;$DeviceCapabilityEnabledEntityCopyWith<$Res>? get keyboard;$DeviceCapabilityEnabledEntityCopyWith<$Res>? get nightMode;$DeviceCapabilityEnabledEntityCopyWith<$Res>? get wifi;$DeviceCapabilityEnabledEntityCopyWith<$Res>? get deviceBackground;
$DeviceCapabilityOptionEntityCopyWith<$Res>? get heartbeats;$DeviceCapabilityEnabledEntityCopyWith<$Res>? get bloodPressure;$DeviceCapabilityAlertsEntityCopyWith<$Res>? get alerts;$DeviceCapabilityEnabledEntityCopyWith<$Res>? get podometer;$DeviceCapabilityContactsEntityCopyWith<$Res>? get contacts;$DeviceCapabilitySettingsEntityCopyWith<$Res>? get settings;$DeviceCapabilityCommandsEntityCopyWith<$Res>? get commands;$DeviceCapabilityTakepillsEntityCopyWith<$Res>? get takepills;$DeviceCapabilityOptionEntityCopyWith<$Res>? get location;$DeviceCapabilityCameraEntityCopyWith<$Res>? get camera;$DeviceCapabilityDoNotDisturbEntityCopyWith<$Res>? get doNotDisturbs;$DeviceCapabilityAlarmsEntityCopyWith<$Res>? get alarms;$DeviceCapabilityAppUsageEntityCopyWith<$Res>? get appUsageSchedules;$DeviceCapabilityEnabledEntityCopyWith<$Res>? get keyboard;$DeviceCapabilityEnabledEntityCopyWith<$Res>? get nightMode;$DeviceCapabilityEnabledEntityCopyWith<$Res>? get wifi;$DeviceCapabilityEnabledEntityCopyWith<$Res>? get deviceBackground;$DeviceCapabilityVolumeEntityCopyWith<$Res>? get volume;
}
/// @nodoc
@@ -62,7 +62,7 @@ class _$DeviceCapabilitiesEntityCopyWithImpl<$Res>
/// Create a copy of DeviceCapabilitiesEntity
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? heartbeats = freezed,Object? bloodPressure = freezed,Object? alerts = freezed,Object? podometer = freezed,Object? contacts = freezed,Object? settings = freezed,Object? commands = freezed,Object? takepills = freezed,Object? location = freezed,Object? camera = freezed,Object? doNotDisturbs = freezed,Object? alarms = freezed,Object? appUsageSchedules = freezed,Object? keyboard = freezed,Object? nightMode = freezed,Object? wifi = freezed,Object? deviceBackground = freezed,}) {
@pragma('vm:prefer-inline') @override $Res call({Object? heartbeats = freezed,Object? bloodPressure = freezed,Object? alerts = freezed,Object? podometer = freezed,Object? contacts = freezed,Object? settings = freezed,Object? commands = freezed,Object? takepills = freezed,Object? location = freezed,Object? camera = freezed,Object? doNotDisturbs = freezed,Object? alarms = freezed,Object? appUsageSchedules = freezed,Object? keyboard = freezed,Object? nightMode = freezed,Object? wifi = freezed,Object? deviceBackground = freezed,Object? volume = freezed,}) {
return _then(_self.copyWith(
heartbeats: freezed == heartbeats ? _self.heartbeats : heartbeats // ignore: cast_nullable_to_non_nullable
as DeviceCapabilityOptionEntity?,bloodPressure: freezed == bloodPressure ? _self.bloodPressure : bloodPressure // ignore: cast_nullable_to_non_nullable
@@ -81,7 +81,8 @@ as DeviceCapabilityAppUsageEntity?,keyboard: freezed == keyboard ? _self.keyboar
as DeviceCapabilityEnabledEntity?,nightMode: freezed == nightMode ? _self.nightMode : nightMode // ignore: cast_nullable_to_non_nullable
as DeviceCapabilityEnabledEntity?,wifi: freezed == wifi ? _self.wifi : wifi // ignore: cast_nullable_to_non_nullable
as DeviceCapabilityEnabledEntity?,deviceBackground: freezed == deviceBackground ? _self.deviceBackground : deviceBackground // ignore: cast_nullable_to_non_nullable
as DeviceCapabilityEnabledEntity?,
as DeviceCapabilityEnabledEntity?,volume: freezed == volume ? _self.volume : volume // ignore: cast_nullable_to_non_nullable
as DeviceCapabilityVolumeEntity?,
));
}
/// Create a copy of DeviceCapabilitiesEntity
@@ -288,6 +289,18 @@ $DeviceCapabilityEnabledEntityCopyWith<$Res>? get deviceBackground {
return $DeviceCapabilityEnabledEntityCopyWith<$Res>(_self.deviceBackground!, (value) {
return _then(_self.copyWith(deviceBackground: value));
});
}/// Create a copy of DeviceCapabilitiesEntity
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$DeviceCapabilityVolumeEntityCopyWith<$Res>? get volume {
if (_self.volume == null) {
return null;
}
return $DeviceCapabilityVolumeEntityCopyWith<$Res>(_self.volume!, (value) {
return _then(_self.copyWith(volume: value));
});
}
}
@@ -370,10 +383,10 @@ return $default(_that);case _:
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( DeviceCapabilityOptionEntity? heartbeats, DeviceCapabilityEnabledEntity? bloodPressure, DeviceCapabilityAlertsEntity? alerts, DeviceCapabilityEnabledEntity? podometer, DeviceCapabilityContactsEntity? contacts, DeviceCapabilitySettingsEntity? settings, DeviceCapabilityCommandsEntity? commands, DeviceCapabilityTakepillsEntity? takepills, DeviceCapabilityOptionEntity? location, DeviceCapabilityCameraEntity? camera, DeviceCapabilityDoNotDisturbEntity? doNotDisturbs, DeviceCapabilityAlarmsEntity? alarms, DeviceCapabilityAppUsageEntity? appUsageSchedules, DeviceCapabilityEnabledEntity? keyboard, DeviceCapabilityEnabledEntity? nightMode, DeviceCapabilityEnabledEntity? wifi, DeviceCapabilityEnabledEntity? deviceBackground)? $default,{required TResult orElse(),}) {final _that = this;
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( DeviceCapabilityOptionEntity? heartbeats, DeviceCapabilityEnabledEntity? bloodPressure, DeviceCapabilityAlertsEntity? alerts, DeviceCapabilityEnabledEntity? podometer, DeviceCapabilityContactsEntity? contacts, DeviceCapabilitySettingsEntity? settings, DeviceCapabilityCommandsEntity? commands, DeviceCapabilityTakepillsEntity? takepills, DeviceCapabilityOptionEntity? location, DeviceCapabilityCameraEntity? camera, DeviceCapabilityDoNotDisturbEntity? doNotDisturbs, DeviceCapabilityAlarmsEntity? alarms, DeviceCapabilityAppUsageEntity? appUsageSchedules, DeviceCapabilityEnabledEntity? keyboard, DeviceCapabilityEnabledEntity? nightMode, DeviceCapabilityEnabledEntity? wifi, DeviceCapabilityEnabledEntity? deviceBackground, DeviceCapabilityVolumeEntity? volume)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _DeviceCapabilitiesEntity() when $default != null:
return $default(_that.heartbeats,_that.bloodPressure,_that.alerts,_that.podometer,_that.contacts,_that.settings,_that.commands,_that.takepills,_that.location,_that.camera,_that.doNotDisturbs,_that.alarms,_that.appUsageSchedules,_that.keyboard,_that.nightMode,_that.wifi,_that.deviceBackground);case _:
return $default(_that.heartbeats,_that.bloodPressure,_that.alerts,_that.podometer,_that.contacts,_that.settings,_that.commands,_that.takepills,_that.location,_that.camera,_that.doNotDisturbs,_that.alarms,_that.appUsageSchedules,_that.keyboard,_that.nightMode,_that.wifi,_that.deviceBackground,_that.volume);case _:
return orElse();
}
@@ -391,10 +404,10 @@ return $default(_that.heartbeats,_that.bloodPressure,_that.alerts,_that.podomete
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( DeviceCapabilityOptionEntity? heartbeats, DeviceCapabilityEnabledEntity? bloodPressure, DeviceCapabilityAlertsEntity? alerts, DeviceCapabilityEnabledEntity? podometer, DeviceCapabilityContactsEntity? contacts, DeviceCapabilitySettingsEntity? settings, DeviceCapabilityCommandsEntity? commands, DeviceCapabilityTakepillsEntity? takepills, DeviceCapabilityOptionEntity? location, DeviceCapabilityCameraEntity? camera, DeviceCapabilityDoNotDisturbEntity? doNotDisturbs, DeviceCapabilityAlarmsEntity? alarms, DeviceCapabilityAppUsageEntity? appUsageSchedules, DeviceCapabilityEnabledEntity? keyboard, DeviceCapabilityEnabledEntity? nightMode, DeviceCapabilityEnabledEntity? wifi, DeviceCapabilityEnabledEntity? deviceBackground) $default,) {final _that = this;
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( DeviceCapabilityOptionEntity? heartbeats, DeviceCapabilityEnabledEntity? bloodPressure, DeviceCapabilityAlertsEntity? alerts, DeviceCapabilityEnabledEntity? podometer, DeviceCapabilityContactsEntity? contacts, DeviceCapabilitySettingsEntity? settings, DeviceCapabilityCommandsEntity? commands, DeviceCapabilityTakepillsEntity? takepills, DeviceCapabilityOptionEntity? location, DeviceCapabilityCameraEntity? camera, DeviceCapabilityDoNotDisturbEntity? doNotDisturbs, DeviceCapabilityAlarmsEntity? alarms, DeviceCapabilityAppUsageEntity? appUsageSchedules, DeviceCapabilityEnabledEntity? keyboard, DeviceCapabilityEnabledEntity? nightMode, DeviceCapabilityEnabledEntity? wifi, DeviceCapabilityEnabledEntity? deviceBackground, DeviceCapabilityVolumeEntity? volume) $default,) {final _that = this;
switch (_that) {
case _DeviceCapabilitiesEntity():
return $default(_that.heartbeats,_that.bloodPressure,_that.alerts,_that.podometer,_that.contacts,_that.settings,_that.commands,_that.takepills,_that.location,_that.camera,_that.doNotDisturbs,_that.alarms,_that.appUsageSchedules,_that.keyboard,_that.nightMode,_that.wifi,_that.deviceBackground);case _:
return $default(_that.heartbeats,_that.bloodPressure,_that.alerts,_that.podometer,_that.contacts,_that.settings,_that.commands,_that.takepills,_that.location,_that.camera,_that.doNotDisturbs,_that.alarms,_that.appUsageSchedules,_that.keyboard,_that.nightMode,_that.wifi,_that.deviceBackground,_that.volume);case _:
throw StateError('Unexpected subclass');
}
@@ -411,10 +424,10 @@ return $default(_that.heartbeats,_that.bloodPressure,_that.alerts,_that.podomete
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( DeviceCapabilityOptionEntity? heartbeats, DeviceCapabilityEnabledEntity? bloodPressure, DeviceCapabilityAlertsEntity? alerts, DeviceCapabilityEnabledEntity? podometer, DeviceCapabilityContactsEntity? contacts, DeviceCapabilitySettingsEntity? settings, DeviceCapabilityCommandsEntity? commands, DeviceCapabilityTakepillsEntity? takepills, DeviceCapabilityOptionEntity? location, DeviceCapabilityCameraEntity? camera, DeviceCapabilityDoNotDisturbEntity? doNotDisturbs, DeviceCapabilityAlarmsEntity? alarms, DeviceCapabilityAppUsageEntity? appUsageSchedules, DeviceCapabilityEnabledEntity? keyboard, DeviceCapabilityEnabledEntity? nightMode, DeviceCapabilityEnabledEntity? wifi, DeviceCapabilityEnabledEntity? deviceBackground)? $default,) {final _that = this;
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( DeviceCapabilityOptionEntity? heartbeats, DeviceCapabilityEnabledEntity? bloodPressure, DeviceCapabilityAlertsEntity? alerts, DeviceCapabilityEnabledEntity? podometer, DeviceCapabilityContactsEntity? contacts, DeviceCapabilitySettingsEntity? settings, DeviceCapabilityCommandsEntity? commands, DeviceCapabilityTakepillsEntity? takepills, DeviceCapabilityOptionEntity? location, DeviceCapabilityCameraEntity? camera, DeviceCapabilityDoNotDisturbEntity? doNotDisturbs, DeviceCapabilityAlarmsEntity? alarms, DeviceCapabilityAppUsageEntity? appUsageSchedules, DeviceCapabilityEnabledEntity? keyboard, DeviceCapabilityEnabledEntity? nightMode, DeviceCapabilityEnabledEntity? wifi, DeviceCapabilityEnabledEntity? deviceBackground, DeviceCapabilityVolumeEntity? volume)? $default,) {final _that = this;
switch (_that) {
case _DeviceCapabilitiesEntity() when $default != null:
return $default(_that.heartbeats,_that.bloodPressure,_that.alerts,_that.podometer,_that.contacts,_that.settings,_that.commands,_that.takepills,_that.location,_that.camera,_that.doNotDisturbs,_that.alarms,_that.appUsageSchedules,_that.keyboard,_that.nightMode,_that.wifi,_that.deviceBackground);case _:
return $default(_that.heartbeats,_that.bloodPressure,_that.alerts,_that.podometer,_that.contacts,_that.settings,_that.commands,_that.takepills,_that.location,_that.camera,_that.doNotDisturbs,_that.alarms,_that.appUsageSchedules,_that.keyboard,_that.nightMode,_that.wifi,_that.deviceBackground,_that.volume);case _:
return null;
}
@@ -426,7 +439,7 @@ return $default(_that.heartbeats,_that.bloodPressure,_that.alerts,_that.podomete
class _DeviceCapabilitiesEntity implements DeviceCapabilitiesEntity {
const _DeviceCapabilitiesEntity({this.heartbeats, this.bloodPressure, this.alerts, this.podometer, this.contacts, this.settings, this.commands, this.takepills, this.location, this.camera, this.doNotDisturbs, this.alarms, this.appUsageSchedules, this.keyboard, this.nightMode, this.wifi, this.deviceBackground});
const _DeviceCapabilitiesEntity({this.heartbeats, this.bloodPressure, this.alerts, this.podometer, this.contacts, this.settings, this.commands, this.takepills, this.location, this.camera, this.doNotDisturbs, this.alarms, this.appUsageSchedules, this.keyboard, this.nightMode, this.wifi, this.deviceBackground, this.volume});
@override final DeviceCapabilityOptionEntity? heartbeats;
@@ -446,6 +459,7 @@ class _DeviceCapabilitiesEntity implements DeviceCapabilitiesEntity {
@override final DeviceCapabilityEnabledEntity? nightMode;
@override final DeviceCapabilityEnabledEntity? wifi;
@override final DeviceCapabilityEnabledEntity? deviceBackground;
@override final DeviceCapabilityVolumeEntity? volume;
/// Create a copy of DeviceCapabilitiesEntity
/// with the given fields replaced by the non-null parameter values.
@@ -457,16 +471,16 @@ _$DeviceCapabilitiesEntityCopyWith<_DeviceCapabilitiesEntity> get copyWith => __
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _DeviceCapabilitiesEntity&&(identical(other.heartbeats, heartbeats) || other.heartbeats == heartbeats)&&(identical(other.bloodPressure, bloodPressure) || other.bloodPressure == bloodPressure)&&(identical(other.alerts, alerts) || other.alerts == alerts)&&(identical(other.podometer, podometer) || other.podometer == podometer)&&(identical(other.contacts, contacts) || other.contacts == contacts)&&(identical(other.settings, settings) || other.settings == settings)&&(identical(other.commands, commands) || other.commands == commands)&&(identical(other.takepills, takepills) || other.takepills == takepills)&&(identical(other.location, location) || other.location == location)&&(identical(other.camera, camera) || other.camera == camera)&&(identical(other.doNotDisturbs, doNotDisturbs) || other.doNotDisturbs == doNotDisturbs)&&(identical(other.alarms, alarms) || other.alarms == alarms)&&(identical(other.appUsageSchedules, appUsageSchedules) || other.appUsageSchedules == appUsageSchedules)&&(identical(other.keyboard, keyboard) || other.keyboard == keyboard)&&(identical(other.nightMode, nightMode) || other.nightMode == nightMode)&&(identical(other.wifi, wifi) || other.wifi == wifi)&&(identical(other.deviceBackground, deviceBackground) || other.deviceBackground == deviceBackground));
return identical(this, other) || (other.runtimeType == runtimeType&&other is _DeviceCapabilitiesEntity&&(identical(other.heartbeats, heartbeats) || other.heartbeats == heartbeats)&&(identical(other.bloodPressure, bloodPressure) || other.bloodPressure == bloodPressure)&&(identical(other.alerts, alerts) || other.alerts == alerts)&&(identical(other.podometer, podometer) || other.podometer == podometer)&&(identical(other.contacts, contacts) || other.contacts == contacts)&&(identical(other.settings, settings) || other.settings == settings)&&(identical(other.commands, commands) || other.commands == commands)&&(identical(other.takepills, takepills) || other.takepills == takepills)&&(identical(other.location, location) || other.location == location)&&(identical(other.camera, camera) || other.camera == camera)&&(identical(other.doNotDisturbs, doNotDisturbs) || other.doNotDisturbs == doNotDisturbs)&&(identical(other.alarms, alarms) || other.alarms == alarms)&&(identical(other.appUsageSchedules, appUsageSchedules) || other.appUsageSchedules == appUsageSchedules)&&(identical(other.keyboard, keyboard) || other.keyboard == keyboard)&&(identical(other.nightMode, nightMode) || other.nightMode == nightMode)&&(identical(other.wifi, wifi) || other.wifi == wifi)&&(identical(other.deviceBackground, deviceBackground) || other.deviceBackground == deviceBackground)&&(identical(other.volume, volume) || other.volume == volume));
}
@override
int get hashCode => Object.hash(runtimeType,heartbeats,bloodPressure,alerts,podometer,contacts,settings,commands,takepills,location,camera,doNotDisturbs,alarms,appUsageSchedules,keyboard,nightMode,wifi,deviceBackground);
int get hashCode => Object.hash(runtimeType,heartbeats,bloodPressure,alerts,podometer,contacts,settings,commands,takepills,location,camera,doNotDisturbs,alarms,appUsageSchedules,keyboard,nightMode,wifi,deviceBackground,volume);
@override
String toString() {
return 'DeviceCapabilitiesEntity(heartbeats: $heartbeats, bloodPressure: $bloodPressure, alerts: $alerts, podometer: $podometer, contacts: $contacts, settings: $settings, commands: $commands, takepills: $takepills, location: $location, camera: $camera, doNotDisturbs: $doNotDisturbs, alarms: $alarms, appUsageSchedules: $appUsageSchedules, keyboard: $keyboard, nightMode: $nightMode, wifi: $wifi, deviceBackground: $deviceBackground)';
return 'DeviceCapabilitiesEntity(heartbeats: $heartbeats, bloodPressure: $bloodPressure, alerts: $alerts, podometer: $podometer, contacts: $contacts, settings: $settings, commands: $commands, takepills: $takepills, location: $location, camera: $camera, doNotDisturbs: $doNotDisturbs, alarms: $alarms, appUsageSchedules: $appUsageSchedules, keyboard: $keyboard, nightMode: $nightMode, wifi: $wifi, deviceBackground: $deviceBackground, volume: $volume)';
}
@@ -477,11 +491,11 @@ abstract mixin class _$DeviceCapabilitiesEntityCopyWith<$Res> implements $Device
factory _$DeviceCapabilitiesEntityCopyWith(_DeviceCapabilitiesEntity value, $Res Function(_DeviceCapabilitiesEntity) _then) = __$DeviceCapabilitiesEntityCopyWithImpl;
@override @useResult
$Res call({
DeviceCapabilityOptionEntity? heartbeats, DeviceCapabilityEnabledEntity? bloodPressure, DeviceCapabilityAlertsEntity? alerts, DeviceCapabilityEnabledEntity? podometer, DeviceCapabilityContactsEntity? contacts, DeviceCapabilitySettingsEntity? settings, DeviceCapabilityCommandsEntity? commands, DeviceCapabilityTakepillsEntity? takepills, DeviceCapabilityOptionEntity? location, DeviceCapabilityCameraEntity? camera, DeviceCapabilityDoNotDisturbEntity? doNotDisturbs, DeviceCapabilityAlarmsEntity? alarms, DeviceCapabilityAppUsageEntity? appUsageSchedules, DeviceCapabilityEnabledEntity? keyboard, DeviceCapabilityEnabledEntity? nightMode, DeviceCapabilityEnabledEntity? wifi, DeviceCapabilityEnabledEntity? deviceBackground
DeviceCapabilityOptionEntity? heartbeats, DeviceCapabilityEnabledEntity? bloodPressure, DeviceCapabilityAlertsEntity? alerts, DeviceCapabilityEnabledEntity? podometer, DeviceCapabilityContactsEntity? contacts, DeviceCapabilitySettingsEntity? settings, DeviceCapabilityCommandsEntity? commands, DeviceCapabilityTakepillsEntity? takepills, DeviceCapabilityOptionEntity? location, DeviceCapabilityCameraEntity? camera, DeviceCapabilityDoNotDisturbEntity? doNotDisturbs, DeviceCapabilityAlarmsEntity? alarms, DeviceCapabilityAppUsageEntity? appUsageSchedules, DeviceCapabilityEnabledEntity? keyboard, DeviceCapabilityEnabledEntity? nightMode, DeviceCapabilityEnabledEntity? wifi, DeviceCapabilityEnabledEntity? deviceBackground, DeviceCapabilityVolumeEntity? volume
});
@override $DeviceCapabilityOptionEntityCopyWith<$Res>? get heartbeats;@override $DeviceCapabilityEnabledEntityCopyWith<$Res>? get bloodPressure;@override $DeviceCapabilityAlertsEntityCopyWith<$Res>? get alerts;@override $DeviceCapabilityEnabledEntityCopyWith<$Res>? get podometer;@override $DeviceCapabilityContactsEntityCopyWith<$Res>? get contacts;@override $DeviceCapabilitySettingsEntityCopyWith<$Res>? get settings;@override $DeviceCapabilityCommandsEntityCopyWith<$Res>? get commands;@override $DeviceCapabilityTakepillsEntityCopyWith<$Res>? get takepills;@override $DeviceCapabilityOptionEntityCopyWith<$Res>? get location;@override $DeviceCapabilityCameraEntityCopyWith<$Res>? get camera;@override $DeviceCapabilityDoNotDisturbEntityCopyWith<$Res>? get doNotDisturbs;@override $DeviceCapabilityAlarmsEntityCopyWith<$Res>? get alarms;@override $DeviceCapabilityAppUsageEntityCopyWith<$Res>? get appUsageSchedules;@override $DeviceCapabilityEnabledEntityCopyWith<$Res>? get keyboard;@override $DeviceCapabilityEnabledEntityCopyWith<$Res>? get nightMode;@override $DeviceCapabilityEnabledEntityCopyWith<$Res>? get wifi;@override $DeviceCapabilityEnabledEntityCopyWith<$Res>? get deviceBackground;
@override $DeviceCapabilityOptionEntityCopyWith<$Res>? get heartbeats;@override $DeviceCapabilityEnabledEntityCopyWith<$Res>? get bloodPressure;@override $DeviceCapabilityAlertsEntityCopyWith<$Res>? get alerts;@override $DeviceCapabilityEnabledEntityCopyWith<$Res>? get podometer;@override $DeviceCapabilityContactsEntityCopyWith<$Res>? get contacts;@override $DeviceCapabilitySettingsEntityCopyWith<$Res>? get settings;@override $DeviceCapabilityCommandsEntityCopyWith<$Res>? get commands;@override $DeviceCapabilityTakepillsEntityCopyWith<$Res>? get takepills;@override $DeviceCapabilityOptionEntityCopyWith<$Res>? get location;@override $DeviceCapabilityCameraEntityCopyWith<$Res>? get camera;@override $DeviceCapabilityDoNotDisturbEntityCopyWith<$Res>? get doNotDisturbs;@override $DeviceCapabilityAlarmsEntityCopyWith<$Res>? get alarms;@override $DeviceCapabilityAppUsageEntityCopyWith<$Res>? get appUsageSchedules;@override $DeviceCapabilityEnabledEntityCopyWith<$Res>? get keyboard;@override $DeviceCapabilityEnabledEntityCopyWith<$Res>? get nightMode;@override $DeviceCapabilityEnabledEntityCopyWith<$Res>? get wifi;@override $DeviceCapabilityEnabledEntityCopyWith<$Res>? get deviceBackground;@override $DeviceCapabilityVolumeEntityCopyWith<$Res>? get volume;
}
/// @nodoc
@@ -494,7 +508,7 @@ class __$DeviceCapabilitiesEntityCopyWithImpl<$Res>
/// Create a copy of DeviceCapabilitiesEntity
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? heartbeats = freezed,Object? bloodPressure = freezed,Object? alerts = freezed,Object? podometer = freezed,Object? contacts = freezed,Object? settings = freezed,Object? commands = freezed,Object? takepills = freezed,Object? location = freezed,Object? camera = freezed,Object? doNotDisturbs = freezed,Object? alarms = freezed,Object? appUsageSchedules = freezed,Object? keyboard = freezed,Object? nightMode = freezed,Object? wifi = freezed,Object? deviceBackground = freezed,}) {
@override @pragma('vm:prefer-inline') $Res call({Object? heartbeats = freezed,Object? bloodPressure = freezed,Object? alerts = freezed,Object? podometer = freezed,Object? contacts = freezed,Object? settings = freezed,Object? commands = freezed,Object? takepills = freezed,Object? location = freezed,Object? camera = freezed,Object? doNotDisturbs = freezed,Object? alarms = freezed,Object? appUsageSchedules = freezed,Object? keyboard = freezed,Object? nightMode = freezed,Object? wifi = freezed,Object? deviceBackground = freezed,Object? volume = freezed,}) {
return _then(_DeviceCapabilitiesEntity(
heartbeats: freezed == heartbeats ? _self.heartbeats : heartbeats // ignore: cast_nullable_to_non_nullable
as DeviceCapabilityOptionEntity?,bloodPressure: freezed == bloodPressure ? _self.bloodPressure : bloodPressure // ignore: cast_nullable_to_non_nullable
@@ -513,7 +527,8 @@ as DeviceCapabilityAppUsageEntity?,keyboard: freezed == keyboard ? _self.keyboar
as DeviceCapabilityEnabledEntity?,nightMode: freezed == nightMode ? _self.nightMode : nightMode // ignore: cast_nullable_to_non_nullable
as DeviceCapabilityEnabledEntity?,wifi: freezed == wifi ? _self.wifi : wifi // ignore: cast_nullable_to_non_nullable
as DeviceCapabilityEnabledEntity?,deviceBackground: freezed == deviceBackground ? _self.deviceBackground : deviceBackground // ignore: cast_nullable_to_non_nullable
as DeviceCapabilityEnabledEntity?,
as DeviceCapabilityEnabledEntity?,volume: freezed == volume ? _self.volume : volume // ignore: cast_nullable_to_non_nullable
as DeviceCapabilityVolumeEntity?,
));
}
@@ -721,6 +736,18 @@ $DeviceCapabilityEnabledEntityCopyWith<$Res>? get deviceBackground {
return $DeviceCapabilityEnabledEntityCopyWith<$Res>(_self.deviceBackground!, (value) {
return _then(_self.copyWith(deviceBackground: value));
});
}/// Create a copy of DeviceCapabilitiesEntity
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$DeviceCapabilityVolumeEntityCopyWith<$Res>? get volume {
if (_self.volume == null) {
return null;
}
return $DeviceCapabilityVolumeEntityCopyWith<$Res>(_self.volume!, (value) {
return _then(_self.copyWith(volume: value));
});
}
}
@@ -3872,6 +3899,269 @@ as int,
}
}
/// @nodoc
mixin _$DeviceCapabilityVolumeEntity {
int get media; int get ringtone; int get alarm;
/// Create a copy of DeviceCapabilityVolumeEntity
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$DeviceCapabilityVolumeEntityCopyWith<DeviceCapabilityVolumeEntity> get copyWith => _$DeviceCapabilityVolumeEntityCopyWithImpl<DeviceCapabilityVolumeEntity>(this as DeviceCapabilityVolumeEntity, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is DeviceCapabilityVolumeEntity&&(identical(other.media, media) || other.media == media)&&(identical(other.ringtone, ringtone) || other.ringtone == ringtone)&&(identical(other.alarm, alarm) || other.alarm == alarm));
}
@override
int get hashCode => Object.hash(runtimeType,media,ringtone,alarm);
@override
String toString() {
return 'DeviceCapabilityVolumeEntity(media: $media, ringtone: $ringtone, alarm: $alarm)';
}
}
/// @nodoc
abstract mixin class $DeviceCapabilityVolumeEntityCopyWith<$Res> {
factory $DeviceCapabilityVolumeEntityCopyWith(DeviceCapabilityVolumeEntity value, $Res Function(DeviceCapabilityVolumeEntity) _then) = _$DeviceCapabilityVolumeEntityCopyWithImpl;
@useResult
$Res call({
int media, int ringtone, int alarm
});
}
/// @nodoc
class _$DeviceCapabilityVolumeEntityCopyWithImpl<$Res>
implements $DeviceCapabilityVolumeEntityCopyWith<$Res> {
_$DeviceCapabilityVolumeEntityCopyWithImpl(this._self, this._then);
final DeviceCapabilityVolumeEntity _self;
final $Res Function(DeviceCapabilityVolumeEntity) _then;
/// Create a copy of DeviceCapabilityVolumeEntity
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? media = null,Object? ringtone = null,Object? alarm = null,}) {
return _then(_self.copyWith(
media: null == media ? _self.media : media // ignore: cast_nullable_to_non_nullable
as int,ringtone: null == ringtone ? _self.ringtone : ringtone // ignore: cast_nullable_to_non_nullable
as int,alarm: null == alarm ? _self.alarm : alarm // ignore: cast_nullable_to_non_nullable
as int,
));
}
}
/// Adds pattern-matching-related methods to [DeviceCapabilityVolumeEntity].
extension DeviceCapabilityVolumeEntityPatterns on DeviceCapabilityVolumeEntity {
/// 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 extends Object?>(TResult Function( _DeviceCapabilityVolumeEntity value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _DeviceCapabilityVolumeEntity() 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 extends Object?>(TResult Function( _DeviceCapabilityVolumeEntity value) $default,){
final _that = this;
switch (_that) {
case _DeviceCapabilityVolumeEntity():
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 extends Object?>(TResult? Function( _DeviceCapabilityVolumeEntity value)? $default,){
final _that = this;
switch (_that) {
case _DeviceCapabilityVolumeEntity() 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 extends Object?>(TResult Function( int media, int ringtone, int alarm)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _DeviceCapabilityVolumeEntity() when $default != null:
return $default(_that.media,_that.ringtone,_that.alarm);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 extends Object?>(TResult Function( int media, int ringtone, int alarm) $default,) {final _that = this;
switch (_that) {
case _DeviceCapabilityVolumeEntity():
return $default(_that.media,_that.ringtone,_that.alarm);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 extends Object?>(TResult? Function( int media, int ringtone, int alarm)? $default,) {final _that = this;
switch (_that) {
case _DeviceCapabilityVolumeEntity() when $default != null:
return $default(_that.media,_that.ringtone,_that.alarm);case _:
return null;
}
}
}
/// @nodoc
class _DeviceCapabilityVolumeEntity implements DeviceCapabilityVolumeEntity {
const _DeviceCapabilityVolumeEntity({this.media = 10, this.ringtone = 10, this.alarm = 10});
@override@JsonKey() final int media;
@override@JsonKey() final int ringtone;
@override@JsonKey() final int alarm;
/// Create a copy of DeviceCapabilityVolumeEntity
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$DeviceCapabilityVolumeEntityCopyWith<_DeviceCapabilityVolumeEntity> get copyWith => __$DeviceCapabilityVolumeEntityCopyWithImpl<_DeviceCapabilityVolumeEntity>(this, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _DeviceCapabilityVolumeEntity&&(identical(other.media, media) || other.media == media)&&(identical(other.ringtone, ringtone) || other.ringtone == ringtone)&&(identical(other.alarm, alarm) || other.alarm == alarm));
}
@override
int get hashCode => Object.hash(runtimeType,media,ringtone,alarm);
@override
String toString() {
return 'DeviceCapabilityVolumeEntity(media: $media, ringtone: $ringtone, alarm: $alarm)';
}
}
/// @nodoc
abstract mixin class _$DeviceCapabilityVolumeEntityCopyWith<$Res> implements $DeviceCapabilityVolumeEntityCopyWith<$Res> {
factory _$DeviceCapabilityVolumeEntityCopyWith(_DeviceCapabilityVolumeEntity value, $Res Function(_DeviceCapabilityVolumeEntity) _then) = __$DeviceCapabilityVolumeEntityCopyWithImpl;
@override @useResult
$Res call({
int media, int ringtone, int alarm
});
}
/// @nodoc
class __$DeviceCapabilityVolumeEntityCopyWithImpl<$Res>
implements _$DeviceCapabilityVolumeEntityCopyWith<$Res> {
__$DeviceCapabilityVolumeEntityCopyWithImpl(this._self, this._then);
final _DeviceCapabilityVolumeEntity _self;
final $Res Function(_DeviceCapabilityVolumeEntity) _then;
/// Create a copy of DeviceCapabilityVolumeEntity
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? media = null,Object? ringtone = null,Object? alarm = null,}) {
return _then(_DeviceCapabilityVolumeEntity(
media: null == media ? _self.media : media // ignore: cast_nullable_to_non_nullable
as int,ringtone: null == ringtone ? _self.ringtone : ringtone // ignore: cast_nullable_to_non_nullable
as int,alarm: null == alarm ? _self.alarm : alarm // ignore: cast_nullable_to_non_nullable
as int,
));
}
}
// dart format on