src/models/resource/resource-ref.ts
Base class reference to a Resource (Device, Component, etc.). This object is only the id-name pair one would find in a Device Manager's devices array, not the full model.
NOTE: This is not related to the Core Framework Resource class! The English word made sense for these objects that are ID-name pairs since they are resource references (ResourceRef) on the REST server that resolve into actual resource entities at the server.
Properties |
Methods |
deserialize | ||||||||
deserialize(input: any)
|
||||||||
Defined in src/models/resource/resource-ref.ts:20
|
||||||||
Deserializes a JSON object into this class
Parameters :
Returns :
this
|
Public id |
id:
|
Type : string
|
Defined in src/models/resource/resource-ref.ts:17
|
Unique ID of the resource |
Public name |
name:
|
Type : string
|
Defined in src/models/resource/resource-ref.ts:15
|
Name of the resource |
import { ISerializable } from '../serialization/index';
/**
* Base class reference to a Resource (Device, Component, etc.). This object is
* only the id-name pair one would find in a Device Manager's devices array,
* not the full model.
*
* NOTE: This is not related to the Core Framework Resource class! The English
* word made sense for these objects that are ID-name pairs since they are
* resource references (ResourceRef) on the REST server that resolve into actual
* resource entities at the server.
*/
export class ResourceRef implements ISerializable<ResourceRef> {
/** Name of the resource */
public name: string;
/** Unique ID of the resource */
public id: string;
/** Deserializes a JSON object into this class */
deserialize(input: any) {
this.name = input.name;
this.id = input.id;
return this;
}
}