feat(device): add queueCommands to DeviceEntity and command guard

This commit is contained in:
2026-04-26 05:27:23 +02:00
parent c034d781af
commit 35948998f6
3 changed files with 25 additions and 20 deletions

View File

@@ -80,6 +80,7 @@ extension GetDevicesResponseModelMapper on GetDevicesResponseModel {
connectionServer: item.connectionServer,
protocol: item.protocol,
type: item.type,
queueCommands: item.queueCommands,
capabilities: item.capabilities != null
? DeviceCapabilitiesModel.fromJson(
item.capabilities!,

View File

@@ -31,6 +31,7 @@ abstract class DeviceEntity with _$DeviceEntity {
@Default('') String connectionServer,
@Default('') String protocol,
@Default('') String type,
@Default(false) bool queueCommands,
DeviceCapabilitiesEntity? capabilities,
String? backgroundImageId,
@Default('') String createdAt,

View File

@@ -14,7 +14,7 @@ T _$identity<T>(T value) => value;
/// @nodoc
mixin _$DeviceEntity {
String get id; String get identificator; int? get battery; String? get userId; String? get companyId; String? get delegationId; String? get groupId; Map<String, dynamic> get flags; List<String>? get tags; String? get lastConnection; String? get carrierGenre; String? get carrierBirthday; int? get carrierWeight; int? get carrierStepLength; String? get carrierName; String? get comment; String? get phone; String? get simId; Map<String, dynamic>? get paymentOptions; DeviceSettingsEntity get settings; String get connectionServer; String get protocol; String get type; DeviceCapabilitiesEntity? get capabilities; String? get backgroundImageId; String get createdAt; String? get updatedAt;
String get id; String get identificator; int? get battery; String? get userId; String? get companyId; String? get delegationId; String? get groupId; Map<String, dynamic> get flags; List<String>? get tags; String? get lastConnection; String? get carrierGenre; String? get carrierBirthday; int? get carrierWeight; int? get carrierStepLength; String? get carrierName; String? get comment; String? get phone; String? get simId; Map<String, dynamic>? get paymentOptions; DeviceSettingsEntity get settings; String get connectionServer; String get protocol; String get type; bool get queueCommands; DeviceCapabilitiesEntity? get capabilities; String? get backgroundImageId; String get createdAt; String? get updatedAt;
/// Create a copy of DeviceEntity
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@@ -25,16 +25,16 @@ $DeviceEntityCopyWith<DeviceEntity> get copyWith => _$DeviceEntityCopyWithImpl<D
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is DeviceEntity&&(identical(other.id, id) || other.id == id)&&(identical(other.identificator, identificator) || other.identificator == identificator)&&(identical(other.battery, battery) || other.battery == battery)&&(identical(other.userId, userId) || other.userId == userId)&&(identical(other.companyId, companyId) || other.companyId == companyId)&&(identical(other.delegationId, delegationId) || other.delegationId == delegationId)&&(identical(other.groupId, groupId) || other.groupId == groupId)&&const DeepCollectionEquality().equals(other.flags, flags)&&const DeepCollectionEquality().equals(other.tags, tags)&&(identical(other.lastConnection, lastConnection) || other.lastConnection == lastConnection)&&(identical(other.carrierGenre, carrierGenre) || other.carrierGenre == carrierGenre)&&(identical(other.carrierBirthday, carrierBirthday) || other.carrierBirthday == carrierBirthday)&&(identical(other.carrierWeight, carrierWeight) || other.carrierWeight == carrierWeight)&&(identical(other.carrierStepLength, carrierStepLength) || other.carrierStepLength == carrierStepLength)&&(identical(other.carrierName, carrierName) || other.carrierName == carrierName)&&(identical(other.comment, comment) || other.comment == comment)&&(identical(other.phone, phone) || other.phone == phone)&&(identical(other.simId, simId) || other.simId == simId)&&const DeepCollectionEquality().equals(other.paymentOptions, paymentOptions)&&(identical(other.settings, settings) || other.settings == settings)&&(identical(other.connectionServer, connectionServer) || other.connectionServer == connectionServer)&&(identical(other.protocol, protocol) || other.protocol == protocol)&&(identical(other.type, type) || other.type == type)&&(identical(other.capabilities, capabilities) || other.capabilities == capabilities)&&(identical(other.backgroundImageId, backgroundImageId) || other.backgroundImageId == backgroundImageId)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt));
return identical(this, other) || (other.runtimeType == runtimeType&&other is DeviceEntity&&(identical(other.id, id) || other.id == id)&&(identical(other.identificator, identificator) || other.identificator == identificator)&&(identical(other.battery, battery) || other.battery == battery)&&(identical(other.userId, userId) || other.userId == userId)&&(identical(other.companyId, companyId) || other.companyId == companyId)&&(identical(other.delegationId, delegationId) || other.delegationId == delegationId)&&(identical(other.groupId, groupId) || other.groupId == groupId)&&const DeepCollectionEquality().equals(other.flags, flags)&&const DeepCollectionEquality().equals(other.tags, tags)&&(identical(other.lastConnection, lastConnection) || other.lastConnection == lastConnection)&&(identical(other.carrierGenre, carrierGenre) || other.carrierGenre == carrierGenre)&&(identical(other.carrierBirthday, carrierBirthday) || other.carrierBirthday == carrierBirthday)&&(identical(other.carrierWeight, carrierWeight) || other.carrierWeight == carrierWeight)&&(identical(other.carrierStepLength, carrierStepLength) || other.carrierStepLength == carrierStepLength)&&(identical(other.carrierName, carrierName) || other.carrierName == carrierName)&&(identical(other.comment, comment) || other.comment == comment)&&(identical(other.phone, phone) || other.phone == phone)&&(identical(other.simId, simId) || other.simId == simId)&&const DeepCollectionEquality().equals(other.paymentOptions, paymentOptions)&&(identical(other.settings, settings) || other.settings == settings)&&(identical(other.connectionServer, connectionServer) || other.connectionServer == connectionServer)&&(identical(other.protocol, protocol) || other.protocol == protocol)&&(identical(other.type, type) || other.type == type)&&(identical(other.queueCommands, queueCommands) || other.queueCommands == queueCommands)&&(identical(other.capabilities, capabilities) || other.capabilities == capabilities)&&(identical(other.backgroundImageId, backgroundImageId) || other.backgroundImageId == backgroundImageId)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt));
}
@override
int get hashCode => Object.hashAll([runtimeType,id,identificator,battery,userId,companyId,delegationId,groupId,const DeepCollectionEquality().hash(flags),const DeepCollectionEquality().hash(tags),lastConnection,carrierGenre,carrierBirthday,carrierWeight,carrierStepLength,carrierName,comment,phone,simId,const DeepCollectionEquality().hash(paymentOptions),settings,connectionServer,protocol,type,capabilities,backgroundImageId,createdAt,updatedAt]);
int get hashCode => Object.hashAll([runtimeType,id,identificator,battery,userId,companyId,delegationId,groupId,const DeepCollectionEquality().hash(flags),const DeepCollectionEquality().hash(tags),lastConnection,carrierGenre,carrierBirthday,carrierWeight,carrierStepLength,carrierName,comment,phone,simId,const DeepCollectionEquality().hash(paymentOptions),settings,connectionServer,protocol,type,queueCommands,capabilities,backgroundImageId,createdAt,updatedAt]);
@override
String toString() {
return 'DeviceEntity(id: $id, identificator: $identificator, battery: $battery, userId: $userId, companyId: $companyId, delegationId: $delegationId, groupId: $groupId, flags: $flags, tags: $tags, lastConnection: $lastConnection, carrierGenre: $carrierGenre, carrierBirthday: $carrierBirthday, carrierWeight: $carrierWeight, carrierStepLength: $carrierStepLength, carrierName: $carrierName, comment: $comment, phone: $phone, simId: $simId, paymentOptions: $paymentOptions, settings: $settings, connectionServer: $connectionServer, protocol: $protocol, type: $type, capabilities: $capabilities, backgroundImageId: $backgroundImageId, createdAt: $createdAt, updatedAt: $updatedAt)';
return 'DeviceEntity(id: $id, identificator: $identificator, battery: $battery, userId: $userId, companyId: $companyId, delegationId: $delegationId, groupId: $groupId, flags: $flags, tags: $tags, lastConnection: $lastConnection, carrierGenre: $carrierGenre, carrierBirthday: $carrierBirthday, carrierWeight: $carrierWeight, carrierStepLength: $carrierStepLength, carrierName: $carrierName, comment: $comment, phone: $phone, simId: $simId, paymentOptions: $paymentOptions, settings: $settings, connectionServer: $connectionServer, protocol: $protocol, type: $type, queueCommands: $queueCommands, capabilities: $capabilities, backgroundImageId: $backgroundImageId, createdAt: $createdAt, updatedAt: $updatedAt)';
}
@@ -45,7 +45,7 @@ abstract mixin class $DeviceEntityCopyWith<$Res> {
factory $DeviceEntityCopyWith(DeviceEntity value, $Res Function(DeviceEntity) _then) = _$DeviceEntityCopyWithImpl;
@useResult
$Res call({
String id, String identificator, int? battery, String? userId, String? companyId, String? delegationId, String? groupId, Map<String, dynamic> flags, List<String>? tags, String? lastConnection, String? carrierGenre, String? carrierBirthday, int? carrierWeight, int? carrierStepLength, String? carrierName, String? comment, String? phone, String? simId, Map<String, dynamic>? paymentOptions, DeviceSettingsEntity settings, String connectionServer, String protocol, String type, DeviceCapabilitiesEntity? capabilities, String? backgroundImageId, String createdAt, String? updatedAt
String id, String identificator, int? battery, String? userId, String? companyId, String? delegationId, String? groupId, Map<String, dynamic> flags, List<String>? tags, String? lastConnection, String? carrierGenre, String? carrierBirthday, int? carrierWeight, int? carrierStepLength, String? carrierName, String? comment, String? phone, String? simId, Map<String, dynamic>? paymentOptions, DeviceSettingsEntity settings, String connectionServer, String protocol, String type, bool queueCommands, DeviceCapabilitiesEntity? capabilities, String? backgroundImageId, String createdAt, String? updatedAt
});
@@ -62,7 +62,7 @@ class _$DeviceEntityCopyWithImpl<$Res>
/// Create a copy of DeviceEntity
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? identificator = null,Object? battery = freezed,Object? userId = freezed,Object? companyId = freezed,Object? delegationId = freezed,Object? groupId = freezed,Object? flags = null,Object? tags = freezed,Object? lastConnection = freezed,Object? carrierGenre = freezed,Object? carrierBirthday = freezed,Object? carrierWeight = freezed,Object? carrierStepLength = freezed,Object? carrierName = freezed,Object? comment = freezed,Object? phone = freezed,Object? simId = freezed,Object? paymentOptions = freezed,Object? settings = null,Object? connectionServer = null,Object? protocol = null,Object? type = null,Object? capabilities = freezed,Object? backgroundImageId = freezed,Object? createdAt = null,Object? updatedAt = freezed,}) {
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? identificator = null,Object? battery = freezed,Object? userId = freezed,Object? companyId = freezed,Object? delegationId = freezed,Object? groupId = freezed,Object? flags = null,Object? tags = freezed,Object? lastConnection = freezed,Object? carrierGenre = freezed,Object? carrierBirthday = freezed,Object? carrierWeight = freezed,Object? carrierStepLength = freezed,Object? carrierName = freezed,Object? comment = freezed,Object? phone = freezed,Object? simId = freezed,Object? paymentOptions = freezed,Object? settings = null,Object? connectionServer = null,Object? protocol = null,Object? type = null,Object? queueCommands = null,Object? capabilities = freezed,Object? backgroundImageId = freezed,Object? createdAt = null,Object? updatedAt = freezed,}) {
return _then(_self.copyWith(
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
as String,identificator: null == identificator ? _self.identificator : identificator // ignore: cast_nullable_to_non_nullable
@@ -87,7 +87,8 @@ as Map<String, dynamic>?,settings: null == settings ? _self.settings : settings
as DeviceSettingsEntity,connectionServer: null == connectionServer ? _self.connectionServer : connectionServer // ignore: cast_nullable_to_non_nullable
as String,protocol: null == protocol ? _self.protocol : protocol // ignore: cast_nullable_to_non_nullable
as String,type: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable
as String,capabilities: freezed == capabilities ? _self.capabilities : capabilities // ignore: cast_nullable_to_non_nullable
as String,queueCommands: null == queueCommands ? _self.queueCommands : queueCommands // ignore: cast_nullable_to_non_nullable
as bool,capabilities: freezed == capabilities ? _self.capabilities : capabilities // ignore: cast_nullable_to_non_nullable
as DeviceCapabilitiesEntity?,backgroundImageId: freezed == backgroundImageId ? _self.backgroundImageId : backgroundImageId // ignore: cast_nullable_to_non_nullable
as String?,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
as String,updatedAt: freezed == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable
@@ -197,10 +198,10 @@ return $default(_that);case _:
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String id, String identificator, int? battery, String? userId, String? companyId, String? delegationId, String? groupId, Map<String, dynamic> flags, List<String>? tags, String? lastConnection, String? carrierGenre, String? carrierBirthday, int? carrierWeight, int? carrierStepLength, String? carrierName, String? comment, String? phone, String? simId, Map<String, dynamic>? paymentOptions, DeviceSettingsEntity settings, String connectionServer, String protocol, String type, DeviceCapabilitiesEntity? capabilities, String? backgroundImageId, String createdAt, String? updatedAt)? $default,{required TResult orElse(),}) {final _that = this;
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String id, String identificator, int? battery, String? userId, String? companyId, String? delegationId, String? groupId, Map<String, dynamic> flags, List<String>? tags, String? lastConnection, String? carrierGenre, String? carrierBirthday, int? carrierWeight, int? carrierStepLength, String? carrierName, String? comment, String? phone, String? simId, Map<String, dynamic>? paymentOptions, DeviceSettingsEntity settings, String connectionServer, String protocol, String type, bool queueCommands, DeviceCapabilitiesEntity? capabilities, String? backgroundImageId, String createdAt, String? updatedAt)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _DeviceEntity() when $default != null:
return $default(_that.id,_that.identificator,_that.battery,_that.userId,_that.companyId,_that.delegationId,_that.groupId,_that.flags,_that.tags,_that.lastConnection,_that.carrierGenre,_that.carrierBirthday,_that.carrierWeight,_that.carrierStepLength,_that.carrierName,_that.comment,_that.phone,_that.simId,_that.paymentOptions,_that.settings,_that.connectionServer,_that.protocol,_that.type,_that.capabilities,_that.backgroundImageId,_that.createdAt,_that.updatedAt);case _:
return $default(_that.id,_that.identificator,_that.battery,_that.userId,_that.companyId,_that.delegationId,_that.groupId,_that.flags,_that.tags,_that.lastConnection,_that.carrierGenre,_that.carrierBirthday,_that.carrierWeight,_that.carrierStepLength,_that.carrierName,_that.comment,_that.phone,_that.simId,_that.paymentOptions,_that.settings,_that.connectionServer,_that.protocol,_that.type,_that.queueCommands,_that.capabilities,_that.backgroundImageId,_that.createdAt,_that.updatedAt);case _:
return orElse();
}
@@ -218,10 +219,10 @@ return $default(_that.id,_that.identificator,_that.battery,_that.userId,_that.co
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String id, String identificator, int? battery, String? userId, String? companyId, String? delegationId, String? groupId, Map<String, dynamic> flags, List<String>? tags, String? lastConnection, String? carrierGenre, String? carrierBirthday, int? carrierWeight, int? carrierStepLength, String? carrierName, String? comment, String? phone, String? simId, Map<String, dynamic>? paymentOptions, DeviceSettingsEntity settings, String connectionServer, String protocol, String type, DeviceCapabilitiesEntity? capabilities, String? backgroundImageId, String createdAt, String? updatedAt) $default,) {final _that = this;
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String id, String identificator, int? battery, String? userId, String? companyId, String? delegationId, String? groupId, Map<String, dynamic> flags, List<String>? tags, String? lastConnection, String? carrierGenre, String? carrierBirthday, int? carrierWeight, int? carrierStepLength, String? carrierName, String? comment, String? phone, String? simId, Map<String, dynamic>? paymentOptions, DeviceSettingsEntity settings, String connectionServer, String protocol, String type, bool queueCommands, DeviceCapabilitiesEntity? capabilities, String? backgroundImageId, String createdAt, String? updatedAt) $default,) {final _that = this;
switch (_that) {
case _DeviceEntity():
return $default(_that.id,_that.identificator,_that.battery,_that.userId,_that.companyId,_that.delegationId,_that.groupId,_that.flags,_that.tags,_that.lastConnection,_that.carrierGenre,_that.carrierBirthday,_that.carrierWeight,_that.carrierStepLength,_that.carrierName,_that.comment,_that.phone,_that.simId,_that.paymentOptions,_that.settings,_that.connectionServer,_that.protocol,_that.type,_that.capabilities,_that.backgroundImageId,_that.createdAt,_that.updatedAt);case _:
return $default(_that.id,_that.identificator,_that.battery,_that.userId,_that.companyId,_that.delegationId,_that.groupId,_that.flags,_that.tags,_that.lastConnection,_that.carrierGenre,_that.carrierBirthday,_that.carrierWeight,_that.carrierStepLength,_that.carrierName,_that.comment,_that.phone,_that.simId,_that.paymentOptions,_that.settings,_that.connectionServer,_that.protocol,_that.type,_that.queueCommands,_that.capabilities,_that.backgroundImageId,_that.createdAt,_that.updatedAt);case _:
throw StateError('Unexpected subclass');
}
@@ -238,10 +239,10 @@ return $default(_that.id,_that.identificator,_that.battery,_that.userId,_that.co
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String id, String identificator, int? battery, String? userId, String? companyId, String? delegationId, String? groupId, Map<String, dynamic> flags, List<String>? tags, String? lastConnection, String? carrierGenre, String? carrierBirthday, int? carrierWeight, int? carrierStepLength, String? carrierName, String? comment, String? phone, String? simId, Map<String, dynamic>? paymentOptions, DeviceSettingsEntity settings, String connectionServer, String protocol, String type, DeviceCapabilitiesEntity? capabilities, String? backgroundImageId, String createdAt, String? updatedAt)? $default,) {final _that = this;
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String id, String identificator, int? battery, String? userId, String? companyId, String? delegationId, String? groupId, Map<String, dynamic> flags, List<String>? tags, String? lastConnection, String? carrierGenre, String? carrierBirthday, int? carrierWeight, int? carrierStepLength, String? carrierName, String? comment, String? phone, String? simId, Map<String, dynamic>? paymentOptions, DeviceSettingsEntity settings, String connectionServer, String protocol, String type, bool queueCommands, DeviceCapabilitiesEntity? capabilities, String? backgroundImageId, String createdAt, String? updatedAt)? $default,) {final _that = this;
switch (_that) {
case _DeviceEntity() when $default != null:
return $default(_that.id,_that.identificator,_that.battery,_that.userId,_that.companyId,_that.delegationId,_that.groupId,_that.flags,_that.tags,_that.lastConnection,_that.carrierGenre,_that.carrierBirthday,_that.carrierWeight,_that.carrierStepLength,_that.carrierName,_that.comment,_that.phone,_that.simId,_that.paymentOptions,_that.settings,_that.connectionServer,_that.protocol,_that.type,_that.capabilities,_that.backgroundImageId,_that.createdAt,_that.updatedAt);case _:
return $default(_that.id,_that.identificator,_that.battery,_that.userId,_that.companyId,_that.delegationId,_that.groupId,_that.flags,_that.tags,_that.lastConnection,_that.carrierGenre,_that.carrierBirthday,_that.carrierWeight,_that.carrierStepLength,_that.carrierName,_that.comment,_that.phone,_that.simId,_that.paymentOptions,_that.settings,_that.connectionServer,_that.protocol,_that.type,_that.queueCommands,_that.capabilities,_that.backgroundImageId,_that.createdAt,_that.updatedAt);case _:
return null;
}
@@ -253,7 +254,7 @@ return $default(_that.id,_that.identificator,_that.battery,_that.userId,_that.co
class _DeviceEntity implements DeviceEntity {
const _DeviceEntity({required this.id, required this.identificator, this.battery, this.userId, this.companyId, this.delegationId, this.groupId, final Map<String, dynamic> flags = const {}, final List<String>? tags, this.lastConnection, this.carrierGenre, this.carrierBirthday, this.carrierWeight, this.carrierStepLength, this.carrierName, this.comment, this.phone, this.simId, final Map<String, dynamic>? paymentOptions, this.settings = const DeviceSettingsEntity(), this.connectionServer = '', this.protocol = '', this.type = '', this.capabilities, this.backgroundImageId, this.createdAt = '', this.updatedAt}): _flags = flags,_tags = tags,_paymentOptions = paymentOptions;
const _DeviceEntity({required this.id, required this.identificator, this.battery, this.userId, this.companyId, this.delegationId, this.groupId, final Map<String, dynamic> flags = const {}, final List<String>? tags, this.lastConnection, this.carrierGenre, this.carrierBirthday, this.carrierWeight, this.carrierStepLength, this.carrierName, this.comment, this.phone, this.simId, final Map<String, dynamic>? paymentOptions, this.settings = const DeviceSettingsEntity(), this.connectionServer = '', this.protocol = '', this.type = '', this.queueCommands = false, this.capabilities, this.backgroundImageId, this.createdAt = '', this.updatedAt}): _flags = flags,_tags = tags,_paymentOptions = paymentOptions;
@override final String id;
@@ -301,6 +302,7 @@ class _DeviceEntity implements DeviceEntity {
@override@JsonKey() final String connectionServer;
@override@JsonKey() final String protocol;
@override@JsonKey() final String type;
@override@JsonKey() final bool queueCommands;
@override final DeviceCapabilitiesEntity? capabilities;
@override final String? backgroundImageId;
@override@JsonKey() final String createdAt;
@@ -316,16 +318,16 @@ _$DeviceEntityCopyWith<_DeviceEntity> get copyWith => __$DeviceEntityCopyWithImp
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _DeviceEntity&&(identical(other.id, id) || other.id == id)&&(identical(other.identificator, identificator) || other.identificator == identificator)&&(identical(other.battery, battery) || other.battery == battery)&&(identical(other.userId, userId) || other.userId == userId)&&(identical(other.companyId, companyId) || other.companyId == companyId)&&(identical(other.delegationId, delegationId) || other.delegationId == delegationId)&&(identical(other.groupId, groupId) || other.groupId == groupId)&&const DeepCollectionEquality().equals(other._flags, _flags)&&const DeepCollectionEquality().equals(other._tags, _tags)&&(identical(other.lastConnection, lastConnection) || other.lastConnection == lastConnection)&&(identical(other.carrierGenre, carrierGenre) || other.carrierGenre == carrierGenre)&&(identical(other.carrierBirthday, carrierBirthday) || other.carrierBirthday == carrierBirthday)&&(identical(other.carrierWeight, carrierWeight) || other.carrierWeight == carrierWeight)&&(identical(other.carrierStepLength, carrierStepLength) || other.carrierStepLength == carrierStepLength)&&(identical(other.carrierName, carrierName) || other.carrierName == carrierName)&&(identical(other.comment, comment) || other.comment == comment)&&(identical(other.phone, phone) || other.phone == phone)&&(identical(other.simId, simId) || other.simId == simId)&&const DeepCollectionEquality().equals(other._paymentOptions, _paymentOptions)&&(identical(other.settings, settings) || other.settings == settings)&&(identical(other.connectionServer, connectionServer) || other.connectionServer == connectionServer)&&(identical(other.protocol, protocol) || other.protocol == protocol)&&(identical(other.type, type) || other.type == type)&&(identical(other.capabilities, capabilities) || other.capabilities == capabilities)&&(identical(other.backgroundImageId, backgroundImageId) || other.backgroundImageId == backgroundImageId)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt));
return identical(this, other) || (other.runtimeType == runtimeType&&other is _DeviceEntity&&(identical(other.id, id) || other.id == id)&&(identical(other.identificator, identificator) || other.identificator == identificator)&&(identical(other.battery, battery) || other.battery == battery)&&(identical(other.userId, userId) || other.userId == userId)&&(identical(other.companyId, companyId) || other.companyId == companyId)&&(identical(other.delegationId, delegationId) || other.delegationId == delegationId)&&(identical(other.groupId, groupId) || other.groupId == groupId)&&const DeepCollectionEquality().equals(other._flags, _flags)&&const DeepCollectionEquality().equals(other._tags, _tags)&&(identical(other.lastConnection, lastConnection) || other.lastConnection == lastConnection)&&(identical(other.carrierGenre, carrierGenre) || other.carrierGenre == carrierGenre)&&(identical(other.carrierBirthday, carrierBirthday) || other.carrierBirthday == carrierBirthday)&&(identical(other.carrierWeight, carrierWeight) || other.carrierWeight == carrierWeight)&&(identical(other.carrierStepLength, carrierStepLength) || other.carrierStepLength == carrierStepLength)&&(identical(other.carrierName, carrierName) || other.carrierName == carrierName)&&(identical(other.comment, comment) || other.comment == comment)&&(identical(other.phone, phone) || other.phone == phone)&&(identical(other.simId, simId) || other.simId == simId)&&const DeepCollectionEquality().equals(other._paymentOptions, _paymentOptions)&&(identical(other.settings, settings) || other.settings == settings)&&(identical(other.connectionServer, connectionServer) || other.connectionServer == connectionServer)&&(identical(other.protocol, protocol) || other.protocol == protocol)&&(identical(other.type, type) || other.type == type)&&(identical(other.queueCommands, queueCommands) || other.queueCommands == queueCommands)&&(identical(other.capabilities, capabilities) || other.capabilities == capabilities)&&(identical(other.backgroundImageId, backgroundImageId) || other.backgroundImageId == backgroundImageId)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt));
}
@override
int get hashCode => Object.hashAll([runtimeType,id,identificator,battery,userId,companyId,delegationId,groupId,const DeepCollectionEquality().hash(_flags),const DeepCollectionEquality().hash(_tags),lastConnection,carrierGenre,carrierBirthday,carrierWeight,carrierStepLength,carrierName,comment,phone,simId,const DeepCollectionEquality().hash(_paymentOptions),settings,connectionServer,protocol,type,capabilities,backgroundImageId,createdAt,updatedAt]);
int get hashCode => Object.hashAll([runtimeType,id,identificator,battery,userId,companyId,delegationId,groupId,const DeepCollectionEquality().hash(_flags),const DeepCollectionEquality().hash(_tags),lastConnection,carrierGenre,carrierBirthday,carrierWeight,carrierStepLength,carrierName,comment,phone,simId,const DeepCollectionEquality().hash(_paymentOptions),settings,connectionServer,protocol,type,queueCommands,capabilities,backgroundImageId,createdAt,updatedAt]);
@override
String toString() {
return 'DeviceEntity(id: $id, identificator: $identificator, battery: $battery, userId: $userId, companyId: $companyId, delegationId: $delegationId, groupId: $groupId, flags: $flags, tags: $tags, lastConnection: $lastConnection, carrierGenre: $carrierGenre, carrierBirthday: $carrierBirthday, carrierWeight: $carrierWeight, carrierStepLength: $carrierStepLength, carrierName: $carrierName, comment: $comment, phone: $phone, simId: $simId, paymentOptions: $paymentOptions, settings: $settings, connectionServer: $connectionServer, protocol: $protocol, type: $type, capabilities: $capabilities, backgroundImageId: $backgroundImageId, createdAt: $createdAt, updatedAt: $updatedAt)';
return 'DeviceEntity(id: $id, identificator: $identificator, battery: $battery, userId: $userId, companyId: $companyId, delegationId: $delegationId, groupId: $groupId, flags: $flags, tags: $tags, lastConnection: $lastConnection, carrierGenre: $carrierGenre, carrierBirthday: $carrierBirthday, carrierWeight: $carrierWeight, carrierStepLength: $carrierStepLength, carrierName: $carrierName, comment: $comment, phone: $phone, simId: $simId, paymentOptions: $paymentOptions, settings: $settings, connectionServer: $connectionServer, protocol: $protocol, type: $type, queueCommands: $queueCommands, capabilities: $capabilities, backgroundImageId: $backgroundImageId, createdAt: $createdAt, updatedAt: $updatedAt)';
}
@@ -336,7 +338,7 @@ abstract mixin class _$DeviceEntityCopyWith<$Res> implements $DeviceEntityCopyWi
factory _$DeviceEntityCopyWith(_DeviceEntity value, $Res Function(_DeviceEntity) _then) = __$DeviceEntityCopyWithImpl;
@override @useResult
$Res call({
String id, String identificator, int? battery, String? userId, String? companyId, String? delegationId, String? groupId, Map<String, dynamic> flags, List<String>? tags, String? lastConnection, String? carrierGenre, String? carrierBirthday, int? carrierWeight, int? carrierStepLength, String? carrierName, String? comment, String? phone, String? simId, Map<String, dynamic>? paymentOptions, DeviceSettingsEntity settings, String connectionServer, String protocol, String type, DeviceCapabilitiesEntity? capabilities, String? backgroundImageId, String createdAt, String? updatedAt
String id, String identificator, int? battery, String? userId, String? companyId, String? delegationId, String? groupId, Map<String, dynamic> flags, List<String>? tags, String? lastConnection, String? carrierGenre, String? carrierBirthday, int? carrierWeight, int? carrierStepLength, String? carrierName, String? comment, String? phone, String? simId, Map<String, dynamic>? paymentOptions, DeviceSettingsEntity settings, String connectionServer, String protocol, String type, bool queueCommands, DeviceCapabilitiesEntity? capabilities, String? backgroundImageId, String createdAt, String? updatedAt
});
@@ -353,7 +355,7 @@ class __$DeviceEntityCopyWithImpl<$Res>
/// Create a copy of DeviceEntity
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? identificator = null,Object? battery = freezed,Object? userId = freezed,Object? companyId = freezed,Object? delegationId = freezed,Object? groupId = freezed,Object? flags = null,Object? tags = freezed,Object? lastConnection = freezed,Object? carrierGenre = freezed,Object? carrierBirthday = freezed,Object? carrierWeight = freezed,Object? carrierStepLength = freezed,Object? carrierName = freezed,Object? comment = freezed,Object? phone = freezed,Object? simId = freezed,Object? paymentOptions = freezed,Object? settings = null,Object? connectionServer = null,Object? protocol = null,Object? type = null,Object? capabilities = freezed,Object? backgroundImageId = freezed,Object? createdAt = null,Object? updatedAt = freezed,}) {
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? identificator = null,Object? battery = freezed,Object? userId = freezed,Object? companyId = freezed,Object? delegationId = freezed,Object? groupId = freezed,Object? flags = null,Object? tags = freezed,Object? lastConnection = freezed,Object? carrierGenre = freezed,Object? carrierBirthday = freezed,Object? carrierWeight = freezed,Object? carrierStepLength = freezed,Object? carrierName = freezed,Object? comment = freezed,Object? phone = freezed,Object? simId = freezed,Object? paymentOptions = freezed,Object? settings = null,Object? connectionServer = null,Object? protocol = null,Object? type = null,Object? queueCommands = null,Object? capabilities = freezed,Object? backgroundImageId = freezed,Object? createdAt = null,Object? updatedAt = freezed,}) {
return _then(_DeviceEntity(
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
as String,identificator: null == identificator ? _self.identificator : identificator // ignore: cast_nullable_to_non_nullable
@@ -378,7 +380,8 @@ as Map<String, dynamic>?,settings: null == settings ? _self.settings : settings
as DeviceSettingsEntity,connectionServer: null == connectionServer ? _self.connectionServer : connectionServer // ignore: cast_nullable_to_non_nullable
as String,protocol: null == protocol ? _self.protocol : protocol // ignore: cast_nullable_to_non_nullable
as String,type: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable
as String,capabilities: freezed == capabilities ? _self.capabilities : capabilities // ignore: cast_nullable_to_non_nullable
as String,queueCommands: null == queueCommands ? _self.queueCommands : queueCommands // ignore: cast_nullable_to_non_nullable
as bool,capabilities: freezed == capabilities ? _self.capabilities : capabilities // ignore: cast_nullable_to_non_nullable
as DeviceCapabilitiesEntity?,backgroundImageId: freezed == backgroundImageId ? _self.backgroundImageId : backgroundImageId // ignore: cast_nullable_to_non_nullable
as String?,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
as String,updatedAt: freezed == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable