ModelInput class abstract
- Available extensions
- Annotations
-
- @unfreezed
Constructors
-
ModelInput({String? id, @Default.new('') String name, String? flespiId, String? protocolId, @Default.new(false) bool isGeneric, @Default.new([]) List<
CommandDefinitionInput> commandsStructure, @Default.new([]) List<ConfigGroupingInput> configStructure, @Default.new(false) bool confiotCapable, @JsonKey.new(unknownEnumValue: ConfIoTLayout.standard) @Default.new(ConfIoTLayout.standard) ConfIoTLayout confiotLayout, String? confiotName, String? peripheralIdentifier, Map<String, dynamic> ? peripheralParserSpec}) -
ModelInput is the model of a device. It contains the information about the model of the device.
Does not contain information of connectivity or related, only the model information like the name, the
protocol and if is generic or not.
factory
-
ModelInput.fromJson(Map<
String, dynamic> json) -
factory
Properties
-
commandsStructure
↔ List<
CommandDefinitionInput> -
commandsStructureis the structure of the commands for the protocol.getter/setter pairinherited -
configStructure
↔ List<
ConfigGroupingInput> -
configStructureis the structure of the configuration for the protocol.getter/setter pairinherited - confiotCapable ↔ bool
-
confiotCapableis the boolean that indicates if the protocol is capable of using the Confiot platform.getter/setter pairinherited - confiotLayout ↔ ConfIoTLayout
-
confiotLayoutdefines what kind of layout should be displayed in ConfIoT.getter/setter pairinherited - confiotName ↔ String?
-
confiotNameis the name of the model in the ConfIoT.getter/setter pairinherited -
copyWith
→ $ModelInputCopyWith<
ModelInput> -
Create a copy of ModelInput
with the given fields replaced by the non-null parameter values.
no setterinherited
- flespiId ↔ String?
-
flespiIdis the ID of the device in the flespi platform. Can be null if the model is not connected to a device or is a in-house protocol.getter/setter pairinherited - hashCode → int
-
The hash code for this object.
no setterinherited
- id ↔ String?
-
idis the unique identifier of the model.getter/setter pairinherited - isGeneric ↔ bool
-
isGenericis true if the model is generic. Only can be 1 generic model per protocol.getter/setter pairinherited - name ↔ String
-
nameis the name of the model.getter/setter pairinherited - peripheralIdentifier ↔ String?
-
peripheralIdentifieris the identifier of the peripheral device.getter/setter pairinherited -
peripheralParserSpec
↔ Map<
String, dynamic> ? -
peripheralParserSpecis the parser specification for the peripheral device.getter/setter pairinherited - protocolId ↔ String?
-
protocolIdis the ID of the protocolgetter/setter pairinherited - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
map<
TResult extends Object?> (TResult $default(_ModelInput value)) → TResult -
Available on ModelInput, provided by the ModelInputPatterns extension
Aswitch-like method, using callbacks. -
mapOrNull<
TResult extends Object?> (TResult? $default(_ModelInput value)?) → TResult? -
Available on ModelInput, provided by the ModelInputPatterns extension
A variant ofmapthat fallback to returningnull. -
maybeMap<
TResult extends Object?> (TResult $default(_ModelInput value)?, {required TResult orElse()}) → TResult -
Available on ModelInput, provided by the ModelInputPatterns extension
A variant ofmapthat fallback to returningorElse. -
maybeWhen<
TResult extends Object?> (TResult $default(String? id, String name, String? flespiId, String? protocolId, bool isGeneric, List< CommandDefinitionInput> commandsStructure, List<ConfigGroupingInput> configStructure, bool confiotCapable, ConfIoTLayout confiotLayout, String? confiotName, String? peripheralIdentifier, Map<String, dynamic> ? peripheralParserSpec)?, {required TResult orElse()}) → TResult -
Available on ModelInput, provided by the ModelInputPatterns extension
A variant ofwhenthat fallback to anorElsecallback. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Serializes this ModelInput to a JSON map.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
when<
TResult extends Object?> (TResult $default(String? id, String name, String? flespiId, String? protocolId, bool isGeneric, List< CommandDefinitionInput> commandsStructure, List<ConfigGroupingInput> configStructure, bool confiotCapable, ConfIoTLayout confiotLayout, String? confiotName, String? peripheralIdentifier, Map<String, dynamic> ? peripheralParserSpec)) → TResult -
Available on ModelInput, provided by the ModelInputPatterns extension
Aswitch-like method, using callbacks. -
whenOrNull<
TResult extends Object?> (TResult? $default(String? id, String name, String? flespiId, String? protocolId, bool isGeneric, List< CommandDefinitionInput> commandsStructure, List<ConfigGroupingInput> configStructure, bool confiotCapable, ConfIoTLayout confiotLayout, String? confiotName, String? peripheralIdentifier, Map<String, dynamic> ? peripheralParserSpec)?) → TResult? -
Available on ModelInput, provided by the ModelInputPatterns extension
A variant ofwhenthat fallback to returningnull
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited