reveal-sdk-node
Version:
RevealBI Node.js SDK
93 lines (92 loc) • 2.62 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RVBigQueryDataSourceItem = void 0;
const RVDataSourceItem_1 = require("../AbstractClasses/RVDataSourceItem");
const RVBigQueryDataSource_1 = require("./RVBigQueryDataSource");
/**
* BigQuery data source item
*/
class RVBigQueryDataSourceItem extends RVDataSourceItem_1.RVDataSourceItem {
/** @hidden */
constructor(arg) {
super(arg);
this._projectId = null;
this._datasetId = null;
this._table = null;
// @if SERVER_SDK
this._customQuery = null;
if (!(arg instanceof RVBigQueryDataSource_1.RVBigQueryDataSource)) {
var props = arg.Properties;
this._projectId = props["projectId"];
this._datasetId = props["datasetId"];
this._table = props["tableId"];
// @if SERVER_SDK
this._customQuery = arg['Parameters']['RPCustomQuery'];
// @endif
}
}
/** @hidden */
toJson() {
var json = super.toJson();
var props = json['Properties'];
props['projectId'] = this._projectId;
props['datasetId'] = this._datasetId;
props['tableId'] = this._table;
// @if SERVER_SDK
json['Parameters']['RPCustomQuery'] = this._customQuery;
// @endif
return json;
}
/**
* BigQuery ProjectId
*/
get projectId() {
return this._projectId;
}
set projectId(value) {
this._projectId = value;
}
/**
* BigQuery dataset
*/
get datasetId() {
return this._datasetId;
}
set datasetId(value) {
this._datasetId = value;
}
/**
* Name of the table (or view) to get data from
*/
get table() {
return this._table;
}
set table(value) {
this._table = value;
}
/** @hidden */
get customQuery() {
return this._customQuery;
}
/** @hidden */
set customQuery(value) {
this._customQuery = value;
}
// @endif
/** @hidden */
getType() {
return "RVBigQueryDataSourceItem";
}
/** @hidden */
_getWrapper() {
var wrapper = super._getWrapper();
wrapper.projectId(this.projectId);
wrapper.datasetId(this.datasetId);
wrapper.table(this.table);
// @if SERVER_SDK
wrapper.customQuery(this.customQuery);
// @endif
return wrapper;
}
}
exports.RVBigQueryDataSourceItem = RVBigQueryDataSourceItem;