BehaviorScript class

API to manage instances of script.

Inheritance

Constructors

BehaviorScript({required ResourceType type, required String id, String idV1 = "", required String description, required Map<String, dynamic> configurationSchema, required Map<String, dynamic> triggerSchema, required Map<String, dynamic> stateSchema, required String version, required BehaviorScriptMetadata metadata, required List<String> supportedFeatures, required int maxNumberInstances})
Creates a BehaviorScript object.
BehaviorScript.empty()
Creates an empty BehaviorScript object.
BehaviorScript.fromJson(Map<String, dynamic> dataMap)
Creates a BehaviorScript object from the JSON response to a GET request.
factory

Properties

bridge Bridge?
The bridge that this resource is associated with.
getter/setter pairinherited
configurationSchema Map<String, dynamic>
JSON schema object used for validating ScriptInstance.configuration property.
final
description String
Short description of script.
final
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.
finalinherited
idV1 String
Clip v1 resource identifier.
final
maxNumberInstances int
Max number of script instances.
final
metadata BehaviorScriptMetadata
The configuration of this script.
final
originalType ResourceType
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stateSchema Map<String, dynamic>
JSON schema of ScriptInstance.state property.
final
supportedFeatures List<String>
Features that the script supports.
final
triggerSchema Map<String, dynamic>
JSON schema object used for validating ScriptInstance.trigger property.
final
type ResourceType
Type of the supported resource.
getter/setter pairinherited
version String
Version of script.
final

Methods

copyWith({ResourceType? type, String? id, String? idV1, String? description, Map<String, dynamic>? configurationSchema, Map<String, dynamic>? triggerSchema, Map<String, dynamic>? stateSchema, String? version, BehaviorScriptMetadata? metadata, List<String>? supportedFeatures, int? maxNumberInstances}) BehaviorScript
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.
inherited
getRelativesAsResources(List<Relative> relatives) List<Resource>
Returns a list of Resource objects that represent the relatives of this Resource.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
refreshOriginals() → void
Called after a successful PUT request, this method refreshed the "original" data in this object.
inherited
toJson({OptimizeFor optimizeFor = OptimizeFor.put}) Map<String, dynamic>
Converts this object into JSON format.
override
toString() String
A string representation of this object.
override

Operators

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