Device
Extends
AbstractEntity
class Device extends AbstractEntity
Specialized Entities
Static
create
static create(json = null): Device
Parameters:
Name | Type | Required | Default | Description |
---|---|---|---|---|
json | null | object | No | null | Used to constructor from a JSON representation. See fromJSON |
Returns:
Type: Device
getName
static getName(): string
Returns:
Type: constant ("Device" :string)
Constructor
constructor
constructor(json = null): Device
Device is abstract and cannot be instantiated
Parameters:
Name | Type | Required | Default | Description |
---|---|---|---|---|
json | null | object | No | null | Used to constructor from a JSON representation. See fromJSON |
Properties
core_version
Type | Default | Description |
---|---|---|
string | null | null |
height
Type | Default | Description |
---|---|---|
number | null | null |
id
Type | Default | Description |
---|---|---|
null | int | symbol | null | The entity identifier |
metadata
Type | Default | Description |
---|---|---|
Map | new Map() |
name
Type | Default | Description |
---|---|---|
string | null | null |
site
Type | Default | Description |
---|---|---|
Reference<Site> | new Reference('Site', null) |
site_calibration
Type | Default | Description |
---|---|---|
Reference<SiteCalibration> | new Reference('SiteCalibration', null) |
type
Type | Default | Description |
---|---|---|
enum(DEVICE_TYPES) | null |
Read-Only
validate_at
Type | Default | Description |
---|---|---|
Date | null | null |
width
Type | Default | Description |
---|---|---|
number | null | null |
Methods
toJSON
toJSON(): object
Returns:
Type: object (see properties bellow)
Name | Type | Description |
---|---|---|
core_version | string | null | |
height | number | null | |
id | int | symbol | null | |
metadata | object | |
name | string | null | |
site | int | symbol | null | |
site_calibration | int | symbol | null | |
type | string | null | |
validate_at | string | null | Datetime in ISO 8601 format |
width | number | null |
fromJSON
fromJSON(json: object): Device
Parameters:
Name | Type | Required | Default | Description |
---|---|---|---|---|
json | object | Yes | - | |
json.core_version | string | null | No | null | |
json.height | number | null | No | null | |
json.id | int | symbol | null | No | null | |
json.metadata | object | No | {} | |
json.name | string | null | No | null | |
json.site | int | symbol | null | No | null | |
json.site_calibration | int | symbol | null | No | null | |
json.type | string | null | No | null | |
json.validate_at | string | null | No | null | Datetime in ISO 8601 format |
json.width | number | null | No | null |
Returns:
Returns this
clone
clone(): Device
Returns:
A new deep copy
Type: Device