@bitmovin/api-sdk
Version:
Bitmovin JS/TS API SDK
52 lines (51 loc) • 2.18 kB
JavaScript
;
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.Task = void 0;
var Mapper_1 = require("../common/Mapper");
var BitmovinResponse_1 = require("./BitmovinResponse");
var ErrorDetails_1 = require("./ErrorDetails");
var Message_1 = require("./Message");
var Subtask_1 = require("./Subtask");
/**
* @export
* @class Task
*/
var Task = /** @class */ (function (_super) {
__extends(Task, _super);
function Task(obj) {
var _this = _super.call(this, obj) || this;
if (!obj) {
return _this;
}
_this.status = (0, Mapper_1.map)(obj.status);
_this.eta = (0, Mapper_1.map)(obj.eta);
_this.progress = (0, Mapper_1.map)(obj.progress);
_this.subtasks = (0, Mapper_1.mapArray)(obj.subtasks, Subtask_1.default);
_this.messages = (0, Mapper_1.mapArray)(obj.messages, Message_1.default);
_this.createdAt = (0, Mapper_1.map)(obj.createdAt, Date);
_this.queuedAt = (0, Mapper_1.map)(obj.queuedAt, Date);
_this.runningAt = (0, Mapper_1.map)(obj.runningAt, Date);
_this.finishedAt = (0, Mapper_1.map)(obj.finishedAt, Date);
_this.errorAt = (0, Mapper_1.map)(obj.errorAt, Date);
_this.error = (0, Mapper_1.map)(obj.error, ErrorDetails_1.default);
return _this;
}
return Task;
}(BitmovinResponse_1.default));
exports.Task = Task;
exports.default = Task;