UNPKG

reveal-sdk-node

Version:

RevealBI Node.js SDK

83 lines (82 loc) 2.62 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.RVNativeAnalysisServicesDataSource = void 0; const RVAnalysisServicesDataSource_1 = require("./RVAnalysisServicesDataSource"); /** * Microsoft Analysis Services (MS SSAS) TCP connection data source */ class RVNativeAnalysisServicesDataSource extends RVAnalysisServicesDataSource_1.RVAnalysisServicesDataSource { /** @hidden */ constructor(json) { var _a; super(json); this._host = null; this._port = 0; // @if SERVER_SDK /** * Optional user name to impersonate, in 'DOMAIN/username' format. The caller must have administrative permissions in Analysis Services. Using this property is a way to achieve Single Sign On with on-prem SSAS. */ this._effectiveUserName = null; if (json) { var props = json.Properties; this._host = props['Host']; this._port = (_a = props['Port']) !== null && _a !== void 0 ? _a : 0; // @if SERVER_SDK this._effectiveUserName = props['EffectiveUserName']; // @endif } } /** @hidden */ toJson() { var json = super.toJson(); var props = json.Properties; props['Host'] = this._host; if (this._port > 0) { props['Port'] = this._port; } // @if SERVER_SDK props['EffectiveUserName'] = this._effectiveUserName; // @endif return json; } /** * Hostname or IP address of the server */ get host() { return this._host; } set host(value) { this._host = value; } /** * TCP port where the server is accepting connections, 2383 is the default port for SSAS. */ get port() { return this._port; } set port(value) { this._port = value; } /** @hidden */ getType() { return "RVNativeAnalysisServicesDataSource"; } get effectiveUserName() { return this._effectiveUserName; } set effectiveUserName(value) { this._effectiveUserName = value; } // @endif /** @hidden */ _getWrapper() { var wrapper = super._getWrapper(); wrapper.host(this.host); wrapper.port(this.port); // @if SERVER_SDK wrapper.effectiveUserName(this.effectiveUserName); // @endif return wrapper; } } exports.RVNativeAnalysisServicesDataSource = RVNativeAnalysisServicesDataSource;