|
|
|
|
@@ -0,0 +1,603 @@
|
|
|
|
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
|
|
|
// coverage:ignore-file
|
|
|
|
|
// ignore_for_file: type=lint
|
|
|
|
|
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
|
|
|
|
|
|
|
|
|
part of 'get_devices_response_model.dart';
|
|
|
|
|
|
|
|
|
|
// **************************************************************************
|
|
|
|
|
// FreezedGenerator
|
|
|
|
|
// **************************************************************************
|
|
|
|
|
|
|
|
|
|
// dart format off
|
|
|
|
|
T _$identity<T>(T value) => value;
|
|
|
|
|
|
|
|
|
|
/// @nodoc
|
|
|
|
|
mixin _$GetDevicesResponseModel {
|
|
|
|
|
|
|
|
|
|
List<GetDevicesItemResponseModel> get items;
|
|
|
|
|
/// Create a copy of GetDevicesResponseModel
|
|
|
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
|
|
|
@pragma('vm:prefer-inline')
|
|
|
|
|
$GetDevicesResponseModelCopyWith<GetDevicesResponseModel> get copyWith => _$GetDevicesResponseModelCopyWithImpl<GetDevicesResponseModel>(this as GetDevicesResponseModel, _$identity);
|
|
|
|
|
|
|
|
|
|
/// Serializes this GetDevicesResponseModel to a JSON map.
|
|
|
|
|
Map<String, dynamic> toJson();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
bool operator ==(Object other) {
|
|
|
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is GetDevicesResponseModel&&const DeepCollectionEquality().equals(other.items, items));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
|
|
|
@override
|
|
|
|
|
int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(items));
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
String toString() {
|
|
|
|
|
return 'GetDevicesResponseModel(items: $items)';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// @nodoc
|
|
|
|
|
abstract mixin class $GetDevicesResponseModelCopyWith<$Res> {
|
|
|
|
|
factory $GetDevicesResponseModelCopyWith(GetDevicesResponseModel value, $Res Function(GetDevicesResponseModel) _then) = _$GetDevicesResponseModelCopyWithImpl;
|
|
|
|
|
@useResult
|
|
|
|
|
$Res call({
|
|
|
|
|
List<GetDevicesItemResponseModel> items
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
/// @nodoc
|
|
|
|
|
class _$GetDevicesResponseModelCopyWithImpl<$Res>
|
|
|
|
|
implements $GetDevicesResponseModelCopyWith<$Res> {
|
|
|
|
|
_$GetDevicesResponseModelCopyWithImpl(this._self, this._then);
|
|
|
|
|
|
|
|
|
|
final GetDevicesResponseModel _self;
|
|
|
|
|
final $Res Function(GetDevicesResponseModel) _then;
|
|
|
|
|
|
|
|
|
|
/// Create a copy of GetDevicesResponseModel
|
|
|
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
|
|
|
@pragma('vm:prefer-inline') @override $Res call({Object? items = null,}) {
|
|
|
|
|
return _then(_self.copyWith(
|
|
|
|
|
items: null == items ? _self.items : items // ignore: cast_nullable_to_non_nullable
|
|
|
|
|
as List<GetDevicesItemResponseModel>,
|
|
|
|
|
));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// Adds pattern-matching-related methods to [GetDevicesResponseModel].
|
|
|
|
|
extension GetDevicesResponseModelPatterns on GetDevicesResponseModel {
|
|
|
|
|
/// 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( _GetDevicesResponseModel value)? $default,{required TResult orElse(),}){
|
|
|
|
|
final _that = this;
|
|
|
|
|
switch (_that) {
|
|
|
|
|
case _GetDevicesResponseModel() 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( _GetDevicesResponseModel value) $default,){
|
|
|
|
|
final _that = this;
|
|
|
|
|
switch (_that) {
|
|
|
|
|
case _GetDevicesResponseModel():
|
|
|
|
|
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( _GetDevicesResponseModel value)? $default,){
|
|
|
|
|
final _that = this;
|
|
|
|
|
switch (_that) {
|
|
|
|
|
case _GetDevicesResponseModel() 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( List<GetDevicesItemResponseModel> items)? $default,{required TResult orElse(),}) {final _that = this;
|
|
|
|
|
switch (_that) {
|
|
|
|
|
case _GetDevicesResponseModel() when $default != null:
|
|
|
|
|
return $default(_that.items);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( List<GetDevicesItemResponseModel> items) $default,) {final _that = this;
|
|
|
|
|
switch (_that) {
|
|
|
|
|
case _GetDevicesResponseModel():
|
|
|
|
|
return $default(_that.items);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( List<GetDevicesItemResponseModel> items)? $default,) {final _that = this;
|
|
|
|
|
switch (_that) {
|
|
|
|
|
case _GetDevicesResponseModel() when $default != null:
|
|
|
|
|
return $default(_that.items);case _:
|
|
|
|
|
return null;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// @nodoc
|
|
|
|
|
@JsonSerializable()
|
|
|
|
|
|
|
|
|
|
class _GetDevicesResponseModel implements GetDevicesResponseModel {
|
|
|
|
|
const _GetDevicesResponseModel({required final List<GetDevicesItemResponseModel> items}): _items = items;
|
|
|
|
|
factory _GetDevicesResponseModel.fromJson(Map<String, dynamic> json) => _$GetDevicesResponseModelFromJson(json);
|
|
|
|
|
|
|
|
|
|
final List<GetDevicesItemResponseModel> _items;
|
|
|
|
|
@override List<GetDevicesItemResponseModel> get items {
|
|
|
|
|
if (_items is EqualUnmodifiableListView) return _items;
|
|
|
|
|
// ignore: implicit_dynamic_type
|
|
|
|
|
return EqualUnmodifiableListView(_items);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// Create a copy of GetDevicesResponseModel
|
|
|
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
|
|
|
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
|
|
|
|
@pragma('vm:prefer-inline')
|
|
|
|
|
_$GetDevicesResponseModelCopyWith<_GetDevicesResponseModel> get copyWith => __$GetDevicesResponseModelCopyWithImpl<_GetDevicesResponseModel>(this, _$identity);
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
|
|
return _$GetDevicesResponseModelToJson(this, );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
bool operator ==(Object other) {
|
|
|
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _GetDevicesResponseModel&&const DeepCollectionEquality().equals(other._items, _items));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
|
|
|
@override
|
|
|
|
|
int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(_items));
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
String toString() {
|
|
|
|
|
return 'GetDevicesResponseModel(items: $items)';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// @nodoc
|
|
|
|
|
abstract mixin class _$GetDevicesResponseModelCopyWith<$Res> implements $GetDevicesResponseModelCopyWith<$Res> {
|
|
|
|
|
factory _$GetDevicesResponseModelCopyWith(_GetDevicesResponseModel value, $Res Function(_GetDevicesResponseModel) _then) = __$GetDevicesResponseModelCopyWithImpl;
|
|
|
|
|
@override @useResult
|
|
|
|
|
$Res call({
|
|
|
|
|
List<GetDevicesItemResponseModel> items
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
/// @nodoc
|
|
|
|
|
class __$GetDevicesResponseModelCopyWithImpl<$Res>
|
|
|
|
|
implements _$GetDevicesResponseModelCopyWith<$Res> {
|
|
|
|
|
__$GetDevicesResponseModelCopyWithImpl(this._self, this._then);
|
|
|
|
|
|
|
|
|
|
final _GetDevicesResponseModel _self;
|
|
|
|
|
final $Res Function(_GetDevicesResponseModel) _then;
|
|
|
|
|
|
|
|
|
|
/// Create a copy of GetDevicesResponseModel
|
|
|
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
|
|
|
@override @pragma('vm:prefer-inline') $Res call({Object? items = null,}) {
|
|
|
|
|
return _then(_GetDevicesResponseModel(
|
|
|
|
|
items: null == items ? _self._items : items // ignore: cast_nullable_to_non_nullable
|
|
|
|
|
as List<GetDevicesItemResponseModel>,
|
|
|
|
|
));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// @nodoc
|
|
|
|
|
mixin _$GetDevicesItemResponseModel {
|
|
|
|
|
|
|
|
|
|
String get id; String get identificator; int? get battery; String? get userId; Map<String, dynamic> get flags; String? get carrierGenre; int? get carrierBirthday; int? get carrierWeight; int? get carrierStepLength; String get carrierName; String? get phone; Map<String, dynamic> get settings; String get connectionServer; String get protocol; String get type; int get createdAt;
|
|
|
|
|
/// Create a copy of GetDevicesItemResponseModel
|
|
|
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
|
|
|
@pragma('vm:prefer-inline')
|
|
|
|
|
$GetDevicesItemResponseModelCopyWith<GetDevicesItemResponseModel> get copyWith => _$GetDevicesItemResponseModelCopyWithImpl<GetDevicesItemResponseModel>(this as GetDevicesItemResponseModel, _$identity);
|
|
|
|
|
|
|
|
|
|
/// Serializes this GetDevicesItemResponseModel to a JSON map.
|
|
|
|
|
Map<String, dynamic> toJson();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
bool operator ==(Object other) {
|
|
|
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is GetDevicesItemResponseModel&&(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)&&const DeepCollectionEquality().equals(other.flags, flags)&&(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.phone, phone) || other.phone == phone)&&const DeepCollectionEquality().equals(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.createdAt, createdAt) || other.createdAt == createdAt));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
|
|
|
@override
|
|
|
|
|
int get hashCode => Object.hash(runtimeType,id,identificator,battery,userId,const DeepCollectionEquality().hash(flags),carrierGenre,carrierBirthday,carrierWeight,carrierStepLength,carrierName,phone,const DeepCollectionEquality().hash(settings),connectionServer,protocol,type,createdAt);
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
String toString() {
|
|
|
|
|
return 'GetDevicesItemResponseModel(id: $id, identificator: $identificator, battery: $battery, userId: $userId, flags: $flags, carrierGenre: $carrierGenre, carrierBirthday: $carrierBirthday, carrierWeight: $carrierWeight, carrierStepLength: $carrierStepLength, carrierName: $carrierName, phone: $phone, settings: $settings, connectionServer: $connectionServer, protocol: $protocol, type: $type, createdAt: $createdAt)';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// @nodoc
|
|
|
|
|
abstract mixin class $GetDevicesItemResponseModelCopyWith<$Res> {
|
|
|
|
|
factory $GetDevicesItemResponseModelCopyWith(GetDevicesItemResponseModel value, $Res Function(GetDevicesItemResponseModel) _then) = _$GetDevicesItemResponseModelCopyWithImpl;
|
|
|
|
|
@useResult
|
|
|
|
|
$Res call({
|
|
|
|
|
String id, String identificator, int? battery, String? userId, Map<String, dynamic> flags, String? carrierGenre, int? carrierBirthday, int? carrierWeight, int? carrierStepLength, String carrierName, String? phone, Map<String, dynamic> settings, String connectionServer, String protocol, String type, int createdAt
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
/// @nodoc
|
|
|
|
|
class _$GetDevicesItemResponseModelCopyWithImpl<$Res>
|
|
|
|
|
implements $GetDevicesItemResponseModelCopyWith<$Res> {
|
|
|
|
|
_$GetDevicesItemResponseModelCopyWithImpl(this._self, this._then);
|
|
|
|
|
|
|
|
|
|
final GetDevicesItemResponseModel _self;
|
|
|
|
|
final $Res Function(GetDevicesItemResponseModel) _then;
|
|
|
|
|
|
|
|
|
|
/// Create a copy of GetDevicesItemResponseModel
|
|
|
|
|
/// 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? flags = null,Object? carrierGenre = freezed,Object? carrierBirthday = freezed,Object? carrierWeight = freezed,Object? carrierStepLength = freezed,Object? carrierName = null,Object? phone = freezed,Object? settings = null,Object? connectionServer = null,Object? protocol = null,Object? type = null,Object? createdAt = null,}) {
|
|
|
|
|
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
|
|
|
|
|
as String,battery: freezed == battery ? _self.battery : battery // ignore: cast_nullable_to_non_nullable
|
|
|
|
|
as int?,userId: freezed == userId ? _self.userId : userId // ignore: cast_nullable_to_non_nullable
|
|
|
|
|
as String?,flags: null == flags ? _self.flags : flags // ignore: cast_nullable_to_non_nullable
|
|
|
|
|
as Map<String, dynamic>,carrierGenre: freezed == carrierGenre ? _self.carrierGenre : carrierGenre // ignore: cast_nullable_to_non_nullable
|
|
|
|
|
as String?,carrierBirthday: freezed == carrierBirthday ? _self.carrierBirthday : carrierBirthday // ignore: cast_nullable_to_non_nullable
|
|
|
|
|
as int?,carrierWeight: freezed == carrierWeight ? _self.carrierWeight : carrierWeight // ignore: cast_nullable_to_non_nullable
|
|
|
|
|
as int?,carrierStepLength: freezed == carrierStepLength ? _self.carrierStepLength : carrierStepLength // ignore: cast_nullable_to_non_nullable
|
|
|
|
|
as int?,carrierName: null == carrierName ? _self.carrierName : carrierName // ignore: cast_nullable_to_non_nullable
|
|
|
|
|
as String,phone: freezed == phone ? _self.phone : phone // ignore: cast_nullable_to_non_nullable
|
|
|
|
|
as String?,settings: null == settings ? _self.settings : settings // ignore: cast_nullable_to_non_nullable
|
|
|
|
|
as Map<String, dynamic>,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,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
|
|
|
|
|
as int,
|
|
|
|
|
));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// Adds pattern-matching-related methods to [GetDevicesItemResponseModel].
|
|
|
|
|
extension GetDevicesItemResponseModelPatterns on GetDevicesItemResponseModel {
|
|
|
|
|
/// 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( _GetDevicesItemResponseModel value)? $default,{required TResult orElse(),}){
|
|
|
|
|
final _that = this;
|
|
|
|
|
switch (_that) {
|
|
|
|
|
case _GetDevicesItemResponseModel() 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( _GetDevicesItemResponseModel value) $default,){
|
|
|
|
|
final _that = this;
|
|
|
|
|
switch (_that) {
|
|
|
|
|
case _GetDevicesItemResponseModel():
|
|
|
|
|
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( _GetDevicesItemResponseModel value)? $default,){
|
|
|
|
|
final _that = this;
|
|
|
|
|
switch (_that) {
|
|
|
|
|
case _GetDevicesItemResponseModel() 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( String id, String identificator, int? battery, String? userId, Map<String, dynamic> flags, String? carrierGenre, int? carrierBirthday, int? carrierWeight, int? carrierStepLength, String carrierName, String? phone, Map<String, dynamic> settings, String connectionServer, String protocol, String type, int createdAt)? $default,{required TResult orElse(),}) {final _that = this;
|
|
|
|
|
switch (_that) {
|
|
|
|
|
case _GetDevicesItemResponseModel() when $default != null:
|
|
|
|
|
return $default(_that.id,_that.identificator,_that.battery,_that.userId,_that.flags,_that.carrierGenre,_that.carrierBirthday,_that.carrierWeight,_that.carrierStepLength,_that.carrierName,_that.phone,_that.settings,_that.connectionServer,_that.protocol,_that.type,_that.createdAt);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( String id, String identificator, int? battery, String? userId, Map<String, dynamic> flags, String? carrierGenre, int? carrierBirthday, int? carrierWeight, int? carrierStepLength, String carrierName, String? phone, Map<String, dynamic> settings, String connectionServer, String protocol, String type, int createdAt) $default,) {final _that = this;
|
|
|
|
|
switch (_that) {
|
|
|
|
|
case _GetDevicesItemResponseModel():
|
|
|
|
|
return $default(_that.id,_that.identificator,_that.battery,_that.userId,_that.flags,_that.carrierGenre,_that.carrierBirthday,_that.carrierWeight,_that.carrierStepLength,_that.carrierName,_that.phone,_that.settings,_that.connectionServer,_that.protocol,_that.type,_that.createdAt);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( String id, String identificator, int? battery, String? userId, Map<String, dynamic> flags, String? carrierGenre, int? carrierBirthday, int? carrierWeight, int? carrierStepLength, String carrierName, String? phone, Map<String, dynamic> settings, String connectionServer, String protocol, String type, int createdAt)? $default,) {final _that = this;
|
|
|
|
|
switch (_that) {
|
|
|
|
|
case _GetDevicesItemResponseModel() when $default != null:
|
|
|
|
|
return $default(_that.id,_that.identificator,_that.battery,_that.userId,_that.flags,_that.carrierGenre,_that.carrierBirthday,_that.carrierWeight,_that.carrierStepLength,_that.carrierName,_that.phone,_that.settings,_that.connectionServer,_that.protocol,_that.type,_that.createdAt);case _:
|
|
|
|
|
return null;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// @nodoc
|
|
|
|
|
@JsonSerializable()
|
|
|
|
|
|
|
|
|
|
class _GetDevicesItemResponseModel implements GetDevicesItemResponseModel {
|
|
|
|
|
const _GetDevicesItemResponseModel({required this.id, required this.identificator, this.battery, this.userId, required final Map<String, dynamic> flags, this.carrierGenre, this.carrierBirthday, this.carrierWeight, this.carrierStepLength, required this.carrierName, this.phone, required final Map<String, dynamic> settings, required this.connectionServer, required this.protocol, required this.type, required this.createdAt}): _flags = flags,_settings = settings;
|
|
|
|
|
factory _GetDevicesItemResponseModel.fromJson(Map<String, dynamic> json) => _$GetDevicesItemResponseModelFromJson(json);
|
|
|
|
|
|
|
|
|
|
@override final String id;
|
|
|
|
|
@override final String identificator;
|
|
|
|
|
@override final int? battery;
|
|
|
|
|
@override final String? userId;
|
|
|
|
|
final Map<String, dynamic> _flags;
|
|
|
|
|
@override Map<String, dynamic> get flags {
|
|
|
|
|
if (_flags is EqualUnmodifiableMapView) return _flags;
|
|
|
|
|
// ignore: implicit_dynamic_type
|
|
|
|
|
return EqualUnmodifiableMapView(_flags);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override final String? carrierGenre;
|
|
|
|
|
@override final int? carrierBirthday;
|
|
|
|
|
@override final int? carrierWeight;
|
|
|
|
|
@override final int? carrierStepLength;
|
|
|
|
|
@override final String carrierName;
|
|
|
|
|
@override final String? phone;
|
|
|
|
|
final Map<String, dynamic> _settings;
|
|
|
|
|
@override Map<String, dynamic> get settings {
|
|
|
|
|
if (_settings is EqualUnmodifiableMapView) return _settings;
|
|
|
|
|
// ignore: implicit_dynamic_type
|
|
|
|
|
return EqualUnmodifiableMapView(_settings);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override final String connectionServer;
|
|
|
|
|
@override final String protocol;
|
|
|
|
|
@override final String type;
|
|
|
|
|
@override final int createdAt;
|
|
|
|
|
|
|
|
|
|
/// Create a copy of GetDevicesItemResponseModel
|
|
|
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
|
|
|
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
|
|
|
|
@pragma('vm:prefer-inline')
|
|
|
|
|
_$GetDevicesItemResponseModelCopyWith<_GetDevicesItemResponseModel> get copyWith => __$GetDevicesItemResponseModelCopyWithImpl<_GetDevicesItemResponseModel>(this, _$identity);
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
|
|
return _$GetDevicesItemResponseModelToJson(this, );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
bool operator ==(Object other) {
|
|
|
|
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _GetDevicesItemResponseModel&&(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)&&const DeepCollectionEquality().equals(other._flags, _flags)&&(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.phone, phone) || other.phone == phone)&&const DeepCollectionEquality().equals(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.createdAt, createdAt) || other.createdAt == createdAt));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
|
|
|
@override
|
|
|
|
|
int get hashCode => Object.hash(runtimeType,id,identificator,battery,userId,const DeepCollectionEquality().hash(_flags),carrierGenre,carrierBirthday,carrierWeight,carrierStepLength,carrierName,phone,const DeepCollectionEquality().hash(_settings),connectionServer,protocol,type,createdAt);
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
String toString() {
|
|
|
|
|
return 'GetDevicesItemResponseModel(id: $id, identificator: $identificator, battery: $battery, userId: $userId, flags: $flags, carrierGenre: $carrierGenre, carrierBirthday: $carrierBirthday, carrierWeight: $carrierWeight, carrierStepLength: $carrierStepLength, carrierName: $carrierName, phone: $phone, settings: $settings, connectionServer: $connectionServer, protocol: $protocol, type: $type, createdAt: $createdAt)';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// @nodoc
|
|
|
|
|
abstract mixin class _$GetDevicesItemResponseModelCopyWith<$Res> implements $GetDevicesItemResponseModelCopyWith<$Res> {
|
|
|
|
|
factory _$GetDevicesItemResponseModelCopyWith(_GetDevicesItemResponseModel value, $Res Function(_GetDevicesItemResponseModel) _then) = __$GetDevicesItemResponseModelCopyWithImpl;
|
|
|
|
|
@override @useResult
|
|
|
|
|
$Res call({
|
|
|
|
|
String id, String identificator, int? battery, String? userId, Map<String, dynamic> flags, String? carrierGenre, int? carrierBirthday, int? carrierWeight, int? carrierStepLength, String carrierName, String? phone, Map<String, dynamic> settings, String connectionServer, String protocol, String type, int createdAt
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
/// @nodoc
|
|
|
|
|
class __$GetDevicesItemResponseModelCopyWithImpl<$Res>
|
|
|
|
|
implements _$GetDevicesItemResponseModelCopyWith<$Res> {
|
|
|
|
|
__$GetDevicesItemResponseModelCopyWithImpl(this._self, this._then);
|
|
|
|
|
|
|
|
|
|
final _GetDevicesItemResponseModel _self;
|
|
|
|
|
final $Res Function(_GetDevicesItemResponseModel) _then;
|
|
|
|
|
|
|
|
|
|
/// Create a copy of GetDevicesItemResponseModel
|
|
|
|
|
/// 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? flags = null,Object? carrierGenre = freezed,Object? carrierBirthday = freezed,Object? carrierWeight = freezed,Object? carrierStepLength = freezed,Object? carrierName = null,Object? phone = freezed,Object? settings = null,Object? connectionServer = null,Object? protocol = null,Object? type = null,Object? createdAt = null,}) {
|
|
|
|
|
return _then(_GetDevicesItemResponseModel(
|
|
|
|
|
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
|
|
|
|
|
as String,battery: freezed == battery ? _self.battery : battery // ignore: cast_nullable_to_non_nullable
|
|
|
|
|
as int?,userId: freezed == userId ? _self.userId : userId // ignore: cast_nullable_to_non_nullable
|
|
|
|
|
as String?,flags: null == flags ? _self._flags : flags // ignore: cast_nullable_to_non_nullable
|
|
|
|
|
as Map<String, dynamic>,carrierGenre: freezed == carrierGenre ? _self.carrierGenre : carrierGenre // ignore: cast_nullable_to_non_nullable
|
|
|
|
|
as String?,carrierBirthday: freezed == carrierBirthday ? _self.carrierBirthday : carrierBirthday // ignore: cast_nullable_to_non_nullable
|
|
|
|
|
as int?,carrierWeight: freezed == carrierWeight ? _self.carrierWeight : carrierWeight // ignore: cast_nullable_to_non_nullable
|
|
|
|
|
as int?,carrierStepLength: freezed == carrierStepLength ? _self.carrierStepLength : carrierStepLength // ignore: cast_nullable_to_non_nullable
|
|
|
|
|
as int?,carrierName: null == carrierName ? _self.carrierName : carrierName // ignore: cast_nullable_to_non_nullable
|
|
|
|
|
as String,phone: freezed == phone ? _self.phone : phone // ignore: cast_nullable_to_non_nullable
|
|
|
|
|
as String?,settings: null == settings ? _self._settings : settings // ignore: cast_nullable_to_non_nullable
|
|
|
|
|
as Map<String, dynamic>,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,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
|
|
|
|
|
as int,
|
|
|
|
|
));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// dart format on
|