Complex Builder

ComplexBuilder

ComplexBuilder Objects

class ComplexBuilder()

This class extends SimpleBuilder to allow set complex values. What is a complex value? It is simple, It is a value that need a communications module identifier to allow set into the box.

constructor
function constructor()

Constructor

Arguments:

  • ogapi InternalOpenGateAPI - this is ogapi instance
  • resource string - this is the resource url where can be create/delete/update/read the entity
  • allowedDatastreams array (optional) - Allowed datastreams to add into the new entity
  • definedSchemas array (optional) - Jsonschema about all OpenGate specific types
  • jsonSchemaValidator Validator (optional) - Json schema validator tool

initFromFlattened
function initFromFlattened()

Arguments:

  • _flattenedEntityData *

initFromJson
function initFromJson()

Arguments:

  • _jsonEntityData *

withComplex
function withComplex(_id: string,idCommunicationModules: string,val: object) -> '*'

Set a complex value to entity

Arguments:

  • _id string - Datastream identifier
  • idCommunicationModules string - Communications module identifier
  • val object - Value to set.

Returns:

  • *