diffusion
Version:
Diffusion JavaScript client
54 lines (53 loc) • 2.45 kB
JavaScript
;
/**
* @module Services.Control
*/
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.GetSessionPropertiesResponseSerialiser = exports.GetSessionPropertiesResponseSerialiserClass = void 0;
var Codec = require("./../../io/codec");
var serialiser_1 = require("./../../serialisers/serialiser");
var get_session_properties_response_1 = require("./get-session-properties-response");
/**
* Serialiser for {@link GetSessionProperties}
*/
var GetSessionPropertiesResponseSerialiserClass = /** @class */ (function (_super) {
__extends(GetSessionPropertiesResponseSerialiserClass, _super);
function GetSessionPropertiesResponseSerialiserClass() {
return _super !== null && _super.apply(this, arguments) || this;
}
/**
* Read a {@link GetSessionProperties} from the stream
*
* @param bis the input stream
* @return the {@link GetSessionProperties} that was read
*/
GetSessionPropertiesResponseSerialiserClass.prototype.read = function (bis) {
if (Codec.readBoolean(bis)) {
return new get_session_properties_response_1.GetSessionPropertiesResponse(Codec.readDictionary(bis, Codec.readString));
}
else {
return null;
}
};
return GetSessionPropertiesResponseSerialiserClass;
}(serialiser_1.AbstractSerialiser));
exports.GetSessionPropertiesResponseSerialiserClass = GetSessionPropertiesResponseSerialiserClass;
/**
* The {@link GetSessionPropertiesResponseSerialiser} singleton
*/ // eslint-disable-next-line @typescript-eslint/naming-convention
exports.GetSessionPropertiesResponseSerialiser = new GetSessionPropertiesResponseSerialiserClass();