Home Manual Reference Source Test Repository
public class | source

Datamodels

Extends:

BaseProvision → Datamodels

This is a base object for create a IoT Datamodel

Constructor Summary

Public Constructor
public

constructor(ogapi: InternalOpenGateAPI, organization: string)

Constructor

Method Summary

Public Methods
public

Set the addAllowedResourceType attribute

public

addCategory(category: Object, datastreams: Array): Datamodels

Add a flavor.

public

addDatastream(category: string, datastream: object): Datamodels

Add a datastream to the indicated category

public

delete()

Delete not supported on this builder.

public

update()

Update not supported on this builder.

public

Set the description attribute

public

Set the identifier attribute

public

Set the name attribute

public

Set the version attribute

Inherited Summary

From class BaseProvision
public

This invoke a request to OpenGate North API and the callback is managed by promises This function create a entity of provision

public

delete(body: *): Promise

This invoke a request to OpenGate North API and the callback is managed by promises This function deletes a entity of provision

public

This invoke a request to OpenGate North API and the callback is managed by promises This function updates a entity of provision

Public Constructors

public constructor(ogapi: InternalOpenGateAPI, organization: string) source

Constructor

Override:

BaseProvision#constructor

Params:

NameTypeAttributeDescription
ogapi InternalOpenGateAPI
  • nullable: false

this is ogapi instance

organization string
  • nullable: false

Organization where the IoT datamodel will be created

Public Methods

public addAllowedResourceType(resourceType: string): Datamodels source

Set the addAllowedResourceType attribute

Params:

NameTypeAttributeDescription
resourceType string

required field

Return:

Datamodels

public addCategory(category: Object, datastreams: Array): Datamodels source

Add a flavor. If the field datastreams have value, they will add to this flavor

Params:

NameTypeAttributeDescription
category Object
  • nullable: false
datastreams Array
  • nullable: false

Return:

Datamodels

public addDatastream(category: string, datastream: object): Datamodels source

Add a datastream to the indicated category

Params:

NameTypeAttributeDescription
category string
  • nullable: false
datastream object
  • nullable: false

Return:

Datamodels

public delete() source

Delete not supported on this builder. Use IoTDatamodelHelper instead.

Override:

BaseProvision#delete

public update() source

Update not supported on this builder. Use IoTDatamodelHelper instead.

Override:

BaseProvision#update

public withDescription(description: string): Datamodels source

Set the description attribute

Params:

NameTypeAttributeDescription
description string

Return:

Datamodels

public withIdentifier(identifier: string): Datamodels source

Set the identifier attribute

Params:

NameTypeAttributeDescription
identifier string
  • nullable: false

required field

Return:

Datamodels

public withName(name: string): Datamodels source

Set the name attribute

Params:

NameTypeAttributeDescription
name string
  • nullable: false

required field

Return:

Datamodels

public withVersion(version: string): Datamodels source

Set the version attribute

Params:

NameTypeAttributeDescription
version string
  • nullable: false

required field

Return:

Datamodels