UNPKG

@xompass/sdk-cloud-api

Version:

Xompass Client for cloud-api

153 lines 4.8 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.HealthcheckEvent = void 0; var HealthcheckEvent = /** @class */ (function () { function HealthcheckEvent(data) { this.currentState = 'OPENED'; this._comments = []; this._stateChanges = []; Object.assign(this, data); } /** * The name of the model represented by this $resource, * i.e. `HealthcheckEvent`. */ HealthcheckEvent.getModelName = function () { return 'HealthcheckEvent'; }; /** * @method factory * @author Jonathan Casarrubias * @license MIT * This method creates an instance of HealthcheckEvent for dynamic purposes. */ HealthcheckEvent.factory = function (data) { return new HealthcheckEvent(data); }; /** * @method getModelDefinition * @author Julien Ledun * @license MIT * This method returns an object that represents some of the model * definitions. */ HealthcheckEvent.getModelDefinition = function () { return { name: 'HealthcheckEvent', plural: 'HealthcheckEvents', path: 'HealthcheckEvents', idName: 'id', properties: { currentState: { name: 'currentState', type: 'string', default: 'OPENED' }, seen: { name: 'seen', type: 'boolean' }, expiresAt: { name: 'expiresAt', type: 'Date' }, healthStatus: { name: 'healthStatus', type: 'string' }, created: { name: 'created', type: 'Date' }, modified: { name: 'modified', type: 'Date' }, deleted: { name: 'deleted', type: 'Date', default: undefined }, id: { name: 'id', type: 'any' }, assetId: { name: 'assetId', type: 'any' }, _comments: { name: '_comments', type: 'Array<any>', default: [] }, _stateChanges: { name: '_stateChanges', type: 'Array<any>', default: [] }, _data: { name: '_data', type: 'any' }, projectId: { name: 'projectId', type: 'any' }, }, relations: { asset: { name: 'asset', type: 'Asset', model: 'Asset', relationType: 'belongsTo', keyFrom: 'assetId', keyTo: 'id' }, comments: { name: 'comments', type: 'any[]', model: '', relationType: 'embedsMany', keyFrom: '_comments', keyTo: 'id' }, stateChanges: { name: 'stateChanges', type: 'any[]', model: '', relationType: 'embedsMany', keyFrom: '_stateChanges', keyTo: 'id' }, data: { name: 'data', type: 'any[]', model: '', relationType: 'embedsOne', keyFrom: '_data', keyTo: 'id' }, trackingLogs: { name: 'trackingLogs', type: 'Log[]', model: 'Log', relationType: 'hasMany', keyFrom: 'id', keyTo: 'trackingModelId' }, project: { name: 'project', type: 'Project', model: 'Project', relationType: 'belongsTo', keyFrom: 'projectId', keyTo: 'id' }, } }; }; return HealthcheckEvent; }()); exports.HealthcheckEvent = HealthcheckEvent; //# sourceMappingURL=HealthcheckEvent.js.map