public List <PBISequenceNumber> GetSequenceNumbers(PBIAPIClient powerBiAPI = null)
        {
            if (ParentDataset == null)
            {
                throw new Exception("Cannot delete rows from PowerBI table as the table is not linked to a DataSet in PowerBI!");
            }

            if (Name == null)
            {
                throw new Exception("Cannot add row to PowerBI table as the table does not have a name!");
            }

            if (powerBiAPI == null)
            {
                if (ParentDataset.ParentPowerBIAPI == null)
                {
                    throw new Exception("No PowerBI API Object was supplied!");
                }
                else
                {
                    powerBiAPI = ParentDataset.ParentPowerBIAPI;
                }
            }

            PBIObjectList <PBISequenceNumber> objList = JsonConvert.DeserializeObject <PBIObjectList <PBISequenceNumber> >(powerBiAPI.SendGETRequest(ApiURL + "/sequenceNumbers").ResponseToString());

            foreach (var item in objList.Items)
            {
                item.ParentTable = this;
            }

            return(objList.Items);
        }
        public void LoadGatewayDatasourcesFromPowerBI()
        {
            PBIObjectList <PBIGatewayDatasource> objList = JsonConvert.DeserializeObject <PBIObjectList <PBIGatewayDatasource> >(ParentPowerBIAPI.SendGETRequest(ApiURL + "/Default.GetBoundGatewayDataSources").ResponseToString());

            foreach (var item in objList.Items)
            {
                item.ParentGroup  = this.ParentGroup;
                item.ParentObject = this;
            }

            GatewayDatasources = objList.Items;
        }
        public void LoadDatasourcesFromPowerBI()
        {
            PBIObjectList <PBIDatasource> objList = JsonConvert.DeserializeObject <PBIObjectList <PBIDatasource> >(ParentPowerBIAPI.SendGETRequest(ApiURL, PBIAPI.Datasources).ResponseToString());

            foreach (var item in objList.Items)
            {
                item.ParentGroup  = this.ParentGroup;
                item.ParentObject = this;
            }

            Datasources = objList.Items;
        }
        public void LoadRefreshesFromPowerBI()
        {
            PBIObjectList <PBIRefresh> objList = JsonConvert.DeserializeObject <PBIObjectList <PBIRefresh> >(ParentPowerBIAPI.SendGETRequest(ApiURL, PBIAPI.Refreshes).ResponseToString());

            this._refreshes = objList.Items;
        }