UNPKG

xiot-core-spec-ts

Version:
20 lines (19 loc) 669 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.DeviceChildrenRemovedCodec = void 0; const DeviceChildrenRemoved_1 = require("../../../typedef/notice/device/impl/DeviceChildrenRemoved"); class DeviceChildrenRemovedCodec { static encode(x) { return { did: x.did, children: x.children, timestamp: x.timestamp }; } static decode(o) { const e = new DeviceChildrenRemoved_1.DeviceChildrenRemoved(o.timestamp || new Date().getTime(), o.did); e.children = o.children; return e; } } exports.DeviceChildrenRemovedCodec = DeviceChildrenRemovedCodec;