TwinParser.updateTwin 方法

定义

重载

updateTwin(Map<String, Object> desiredPropertyMap, Map<String, Object> reportedPropertyMap, Map<String, Object> tagsMap)

Update properties and tags information in the collection, and return a string with a json that contains a sub-collection of added properties, properties with new value, added tags, and tags with new values.

updateTwin(String json)

Update the properties information in the collection, using the information parsed from the provided json. It will fire a callback if any property was added, excluded, or had its value updated.

updateTwin(Map<String, Object> desiredPropertyMap, Map<String, Object> reportedPropertyMap, Map<String, Object> tagsMap)

Update properties and tags information in the collection, and return a string with a json that contains a sub-collection of added properties, properties with new value, added tags, and tags with new values.

public String updateTwin(Map<String, Object> desiredPropertyMap, Map<String, Object> reportedPropertyMap, Map<String, Object> tagsMap)

参数

desiredPropertyMap
Map<String, Object>

- Map of `desired` property to change the collection.

reportedPropertyMap
Map<String, Object>

- Map of `reported` property to change the collection.

tagsMap
Map<String, Object>

- Map of `tags` to change the collection.

返回

String

Json with added or changed properties and tags

例外

IllegalArgumentException

This exception is thrown if the properties or tags in the maps do not fits the requirements.

IOException

This exception is thrown if tags the is not enabled.

updateTwin(String json)

Update the properties information in the collection, using the information parsed from the provided json. It will fire a callback if any property was added, excluded, or had its value updated.

public void updateTwin(String json)

参数

json
String

- Json with property to change the collection.

例外

IllegalArgumentException

This exception is thrown if the Json is not well formed.

适用于