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>
commandsStructure is the structure of the commands for the protocol.
getter/setter pairinherited
configStructure List<ConfigGroupingInput>
configStructure is the structure of the configuration for the protocol.
getter/setter pairinherited
confiotCapable bool
confiotCapable is the boolean that indicates if the protocol is capable of using the Confiot platform.
getter/setter pairinherited
confiotLayout ConfIoTLayout
confiotLayout defines what kind of layout should be displayed in ConfIoT.
getter/setter pairinherited
confiotName String?
confiotName is 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?
flespiId is 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?
id is the unique identifier of the model.
getter/setter pairinherited
isGeneric bool
isGeneric is true if the model is generic. Only can be 1 generic model per protocol.
getter/setter pairinherited
name String
name is the name of the model.
getter/setter pairinherited
peripheralIdentifier String?
peripheralIdentifier is the identifier of the peripheral device.
getter/setter pairinherited
peripheralParserSpec Map<String, dynamic>?
peripheralParserSpec is the parser specification for the peripheral device.
getter/setter pairinherited
protocolId String?
protocolId is the ID of the protocol
getter/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

A switch-like method, using callbacks.
mapOrNull<TResult extends Object?>(TResult? $default(_ModelInput value)?) → TResult?

Available on ModelInput, provided by the ModelInputPatterns extension

A variant of map that fallback to returning null.
maybeMap<TResult extends Object?>(TResult $default(_ModelInput value)?, {required TResult orElse()}) → TResult

Available on ModelInput, provided by the ModelInputPatterns extension

A variant of map that fallback to returning orElse.
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 of when that fallback to an orElse callback.
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

A switch-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 of when that fallback to returning null

Operators

operator ==(Object other) bool
The equality operator.
inherited