"use strict";
const Utils = require("../utils/Utils");

/**
 * Represents a device.
 * @constructor
 * @param {string} id - Device id
 * @param {string} [name] - Human readable device names
 * @param {type} [type] - Device type
 * @returns {object} A Device object with the given parameters.
 */
function Device(id, name, type, created) {
    const _id = id || null;
    if (_id) {
        Utils.assertValidDeviceId(_id);
    }
    const _name = name || null;
    const _type = type || null;
    const _created = created || null;

    this.getCreated = () => _created;
    this.getId = () => _id;
    this.getName = () => _name;
    this.getType = () => _type;
    this.toJSON = () => {
        const ret = {id: _id};
        if (_name) {
            ret.name = _name;
        }
        if (_type) {
            ret.type = _type;
        }
        if (_created) {
            ret.created = _created;
        }
        return ret;
    };
}

module.exports = Device;

@@ -234,22 +234,22 @@
 eturns %7B
-object
+Device
 %7D A Devi
@@ -532,101 +532,509 @@
     
-this.getCreated = () =%3E _created;%0A    this.getId = () =%3E _id;%0A    this.getName = () =%3E _name;
+/**%0A     * Get the device's created date.%0A     * @returns %7Bstring%7D Creation date as a string, null if not set.%0A     */%0A    this.getCreated = () =%3E _created;%0A%0A    /**%0A     * Get the device's id.%0A     * @returns %7Bstring%7D Device id.%0A     */%0A    this.getId = () =%3E _id;%0A%0A    /**%0A     * Get the device's name.%0A     * @returns %7Bstring%7D Device name, null if not set.%0A     */%0A    this.getName = () =%3E _name;%0A%0A    /**%0A     * Get the device's type.%0A     * @returns %7Bstring%7D Device type, null if not set.%0A     */
 %0A   
@@ -1058,24 +1058,25 @@
 ) =%3E _type;%0A
+%0A
     this.toJ

Add some jsdoc for Device