BehaviorInstance class

API to manage instances of script.



BehaviorInstance({required ResourceType type, required String id, String idV1 = "", required String scriptId, required bool isEnabled, required Map<String, dynamic> state, required Map<String, dynamic> configuration, required List<BehaviorInstanceDependee> dependees, required String status, required String lastError, required String name, required String migratedFrom, Map<String, dynamic>? trigger})
Creates a BehaviorInstance object.
Creates an empty BehaviorInstance object.
BehaviorInstance.fromJson(Map<String, dynamic> dataMap)
Creates a BehaviorInstance object from the JSON response to a GET request.


bridge Bridge?
The bridge that this resource is associated with.
getter/setter pairinherited
configuration Map<String, dynamic>
Script configuration.
getter/setter pair
dependees List<BehaviorInstanceDependee>
Represents all resources which this instance depends on.
hashCode int
The hash code for this object.
no setteroverride
hueNetwork HueNetwork?
The HueNetwork that this resource is associated with.
getter/setter pairinherited
id String
Unique identifier representing a specific resource instance.
idV1 String
Clip v1 resource identifier.
isEnabled bool
Whether or not this script is enabled.
getter/setter pair
lastError String
The last error that happened while executing this script.
migratedFrom String
Clip v1 resource identifier.
getter/setter pair
name String
Human readable name of a resource.
getter/setter pair
originalType ResourceType
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scriptId String
Identifier to ScriptDefinition.
getter/setter pair
state Map<String, dynamic>
Script instance state.
status String
Script status.
targetsAsResources List<Resource>
Returns a list of the targets as Resource objects.
no setter
trigger Map<String, dynamic>?
Action that needs to be taken by this script instance.
getter/setter pair
type ResourceType
Type of the supported resource.
getter/setter pairinherited


copyWith({ResourceType? type, String? id, String? idV1, String? scriptId, bool? isEnabled, Map<String, dynamic>? state, Map<String, dynamic>? configuration, List<BehaviorInstanceDependee>? dependees, String? status, String? lastError, String? name, String? migratedFrom, Map<String, dynamic>? trigger = const {}, bool copyOriginalValues = true}) BehaviorInstance
Returns a copy of this object with its field values replaced by the ones provided to this method.
getRelativeAsResource(Relative relative) Resource
Returns a Resource object that represents the relative of this Resource.
getRelativesAsResources(List<Relative> relatives) List<Resource>
Returns a list of Resource objects that represent the relatives of this Resource.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
refreshOriginals() → void
Called after a successful PUT request, this method refreshed the "original" data in this object.
toJson({OptimizeFor optimizeFor = OptimizeFor.put}) Map<String, dynamic>
Converts this object into JSON format.
toString() String
A string representation of this object.


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