@iotile/iotile-cloud
Version:
A typescript library for interfacing with the IOTile Cloud API
36 lines • 1.13 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var FleetDevice = /** @class */ (function () {
function FleetDevice(data) {
this.device = data.device;
this.alwaysOn = data.always_on;
this.isAccessPoint = data.is_access_point;
}
return FleetDevice;
}());
exports.FleetDevice = FleetDevice;
var Fleet = /** @class */ (function () {
function Fleet(data) {
this.id = data.id;
this.name = data.name;
this.slug = data.slug;
this.description = data.description;
this.isNetwork = data.is_network;
this.memberDictionary = {};
this.members = [];
}
Fleet.prototype.addDevice = function (item) {
this.members.push(item);
this.memberDictionary[item.device] = item;
};
Fleet.prototype.getPostPayload = function () {
var payload = {};
payload['name'] = this.name;
payload['description'] = this.description;
payload['is_network'] = this.isNetwork;
return payload;
};
return Fleet;
}());
exports.Fleet = Fleet;
//# sourceMappingURL=fleet.js.map