UNPKG

reveal-sdk-node

Version:

RevealBI Node.js SDK

54 lines (53 loc) 1.86 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.RVRESTDataSourceItem = void 0; const RVDataSourceItem_1 = require("../AbstractClasses/RVDataSourceItem"); const RVRESTDataSource_1 = require("./RVRESTDataSource"); /** REST API data source item */ class RVRESTDataSourceItem extends RVDataSourceItem_1.RVDataSourceItem { /** @hidden */ constructor(arg) { super(arg); this._parameters = null; if (arg instanceof RVRESTDataSource_1.RVRESTDataSource) { this.url = arg.url; } else { var props = arg.Properties; this.dataSource.url = props["Url"]; this._parameters = arg["Parameters"]; } } /** @hidden */ toJson() { var json = super.toJson(); var props = json['Properties']; props['Url'] = this.dataSource.url; if (this._parameters) json['Parameters'] = this._parameters; // else, super already set this prop to {}. return json; } /** Values for the parameters specified in the data source {@link RVRESTDataSource.url} property. */ get parameters() { return this._parameters; } set parameters(value) { this._parameters = value; } /** * URL to the REST endpoint. * The value will be set as the URL of the item's associated {@link RVRESTDataSource} data source object. * @deprecated This property is deprecated and will soon be removed. Please set the Url directly on the data source instead. */ get url() { return this.dataSource.url; } set url(value) { this.dataSource.url = value; } /** @hidden */ getType() { return "RVRESTDataSourceItem"; } } exports.RVRESTDataSourceItem = RVRESTDataSourceItem;