/// <summary> /// Returns the specified import from the specified workspace. /// </summary> /// <remarks> /// <br/>**Required scope**: Dataset.ReadWrite.All or Dataset.Read.All /// <br/>To set the permissions scope, see [Register an /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='groupId'> /// The workspace id /// </param> /// <param name='importId'> /// The import id /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <Import> GetImportByIdInGroupAsync(this IImports operations, string groupId, string importId, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetImportByIdInGroupWithHttpMessagesAsync(groupId, importId, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Creates new content on the specified workspace from .pbix, Excel, or file /// path in OneDrive for Business. /// </summary> /// <remarks> /// <br/>**Required scope**: Dataset.ReadWrite.All <br/>To set the /// permissions scope, see [Register an /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// <h3>Notes</h3><ul><li>To import a file, request /// Headers should include **Content-Type: multipart/form-data** with the file /// [encoded as form data](https://www.w3.org/TR/html401/interact/forms.html) /// in the request body </li><li>To import from OneDrive for /// Business, request Headers should include **Content-Type: application/json** /// with [ImportInfo](/rest/api/power-bi/imports/postimportingroup#importinfo) /// in the request body.</li><li>To import .pbix files larger than /// 1 GB see [Create Temporary Upload Location In /// Group](/rest/api/power-bi/imports/createtemporaryuploadlocationingroup), /// suported only for workspaces on premium capacity.</li></ul> /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='groupId'> /// The workspace id /// </param> /// <param name='datasetDisplayName'> /// The display name of the dataset should include file extension. Not /// supported when importing from OneDrive for Business. /// </param> /// <param name='importInfo'> /// The import to post /// </param> /// <param name='nameConflict'> /// Determines what to do if a dataset with the same name already exists. /// Possible values include: 'Ignore', 'Abort', 'Overwrite', /// 'CreateOrOverwrite' /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <Import> PostImportInGroupAsync(this IImports operations, string groupId, string datasetDisplayName, ImportInfo importInfo, string nameConflict = default(string), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.PostImportInGroupWithHttpMessagesAsync(groupId, datasetDisplayName, importInfo, nameConflict, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Uploads a PBIX file to the specified group /// </summary> /// <param name="operations"> /// The import operations /// </param> /// <param name='groupId'> /// The group id /// </param> /// <param name='fileStream'> /// The PBIX file to import /// </param> /// <param name='datasetDisplayName'> /// The dataset display name /// </param> /// <param name='nameConflict'> /// Whether to overwrite dataset during conflicts /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <Import> PostImportWithFileAsyncInGroup(this IImports operations, string groupId, Stream fileStream, string datasetDisplayName = default(string), string nameConflict = default(string), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.PostImportFileWithHttpMessage(groupId, fileStream, datasetDisplayName, nameConflict, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets the import metadata for the specifed import id /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='collectionName'> /// The workspace collection name /// </param> /// <param name='workspaceId'> /// The workspace id /// </param> /// <param name='importId'> /// The import id /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <Import> GetImportByIdAsync(this IImports operations, string collectionName, string workspaceId, string importId, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetImportByIdWithHttpMessagesAsync(collectionName, workspaceId, importId, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Returns a list of imports from **"My Workspace"**. /// </summary> /// <remarks> /// <br/>**Required scope**: Dataset.ReadWrite.All or Dataset.Read.All /// <br/>To set the permissions scope, see [Register an /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ODataResponseListImport> GetImportsAsync(this IImports operations, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetImportsWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Returns a list of imports for the organization. /// </summary> /// <remarks> /// **Note:** The user must have administrator rights (such as Office 365 /// Global Administrator or Power BI Service Administrator) to call this API. /// <br/><br/>**Required scope**: Tenant.Read.All or /// Tenant.ReadWrite.All<br/>Application only and delegated permissions /// are supported.<br/>To set the permissions scope, see [Register an /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='expand'> /// Expands related entities inline /// </param> /// <param name='filter'> /// Filters the results, based on a boolean condition /// </param> /// <param name='top'> /// Returns only the first n results /// </param> /// <param name='skip'> /// Skips the first n results /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ODataResponseListImport> GetImportsAsAdminAsync(this IImports operations, string expand = default(string), string filter = default(string), int?top = default(int?), int?skip = default(int?), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetImportsAsAdminWithHttpMessagesAsync(expand, filter, top, skip, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Creates a temporary blob storage used to import .pbix files larger than 1 /// GB. /// </summary> /// <remarks> /// To import .pbix files larger than 1 GB, create a temporary upload location /// and upload the .pbix file using the shared access signature (SAS) url from /// the response, and then call [Post Import In /// Group](/rest/api/power-bi/imports/postimportingroup) and specify 'fileUrl' /// to be the SAS url in the [Request /// Body](/rest/api/power-bi/imports/postimportingroup#request-body).<br/><br/>**Note**: /// Import large .pbix files is only available for workspaces on premium /// capacity. <br/><br/>**Required scope**: Dataset.ReadWrite.All /// <br/>To set the permissions scope, see [Register an /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='groupId'> /// The workspace id /// </param> public static TemporaryUploadLocation CreateTemporaryUploadLocationInGroup(this IImports operations, string groupId) { return(operations.CreateTemporaryUploadLocationInGroupAsync(groupId).GetAwaiter().GetResult()); }
/// <summary> /// Returns the specified import from the specified workspace. /// </summary> /// <remarks> /// <br/>**Required scope**: Dataset.ReadWrite.All or Dataset.Read.All /// <br/>To set the permissions scope, see [Register an /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='groupId'> /// The workspace id /// </param> /// <param name='importId'> /// The import id /// </param> public static Import GetImportByIdInGroup(this IImports operations, string groupId, string importId) { return(operations.GetImportByIdInGroupAsync(groupId, importId).GetAwaiter().GetResult()); }
/// <summary> /// Creates a new import using the specified import info /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='collectionName'> /// The workspace collection name /// </param> /// <param name='workspaceId'> /// The workspace id /// </param> /// <param name='datasetDisplayName'> /// The display name of the dataset /// </param> /// <param name='importInfo'> /// The import to post /// </param> /// <param name='nameConflict'> /// Determines what to do if a dataset with the same name already exists /// </param> public static Import PostImport(this IImports operations, string collectionName, string workspaceId, string datasetDisplayName, ImportInfo importInfo, string nameConflict = default(string)) { return(Task.Factory.StartNew(s => ((IImports)s).PostImportAsync(collectionName, workspaceId, datasetDisplayName, importInfo, nameConflict), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Creates new content on **"My Workspace"** from .pbix, Excel or file path in /// OneDrive for Business. /// </summary> /// <remarks> /// <br/>**Required scope**: Dataset.ReadWrite.All <br/>To set the /// permissions scope, see [Register an /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// <h3>Notes</h3><ul><li>To import a file, request /// Headers should include **Content-Type: multipart/form-data** with the file /// [encoded as form data](https://www.w3.org/TR/html401/interact/forms.html) /// in the request body. </li><li>To import from OneDrive for /// Business, request Headers should include **Content-Type: application/json** /// with [ImportInfo](/rest/api/power-bi/imports/postimport#importinfo) in the /// request body.</li><li>To import .pbix files larger than 1 GB, /// see [Create Temporary Upload /// Location](/rest/api/power-bi/imports/createtemporaryuploadlocation), /// suported only for workspaces on premium capacity.</li></ul> /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='datasetDisplayName'> /// The display name of the dataset, should include file extension. Not /// supported when importing from OneDrive for Business. /// </param> /// <param name='importInfo'> /// The import to post /// </param> /// <param name='nameConflict'> /// Determines what to do if a dataset with the same name already exists. /// Possible values include: 'Ignore', 'Abort', 'Overwrite', /// 'CreateOrOverwrite' /// </param> public static Import PostImport(this IImports operations, string datasetDisplayName, ImportInfo importInfo, string nameConflict = default(string)) { return(operations.PostImportAsync(datasetDisplayName, importInfo, nameConflict).GetAwaiter().GetResult()); }
/// <summary> /// Returns a list of imports for the organization. /// </summary> /// <remarks> /// **Note:** The user must have administrator rights (such as Office 365 /// Global Administrator or Power BI Service Administrator) to call this API. /// <br/><br/>**Required scope**: Tenant.Read.All or /// Tenant.ReadWrite.All<br/>Application only and delegated permissions /// are supported.<br/>To set the permissions scope, see [Register an /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='expand'> /// Expands related entities inline /// </param> /// <param name='filter'> /// Filters the results, based on a boolean condition /// </param> /// <param name='top'> /// Returns only the first n results /// </param> /// <param name='skip'> /// Skips the first n results /// </param> public static ODataResponseListImport GetImportsAsAdmin(this IImports operations, string expand = default(string), string filter = default(string), int?top = default(int?), int?skip = default(int?)) { return(operations.GetImportsAsAdminAsync(expand, filter, top, skip).GetAwaiter().GetResult()); }
/// <summary> /// Returns the specified import from **"My Workspace"**. /// </summary> /// <remarks> /// <br/>**Required scope**: Dataset.ReadWrite.All or Dataset.Read.All /// <br/>To set the permissions scope, see [Register an /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='importId'> /// The import id /// </param> public static Import GetImportById(this IImports operations, string importId) { return(operations.GetImportByIdAsync(importId).GetAwaiter().GetResult()); }
/// <summary> /// Uploads a PBIX file to MyWorkspace /// </summary> /// <param name="operations"> /// The import operations /// </param> /// <param name='fileStream'> /// The PBIX file to import /// </param> /// <param name='datasetDisplayName'> /// The dataset display name /// </param> /// <param name='nameConflict'> /// Whether to overwrite dataset during conflicts /// </param> public static Import PostImportWithFile(this IImports operations, Stream fileStream, string datasetDisplayName = default(string), string nameConflict = default(string)) { return(Task.Factory.StartNew(s => ((IImports)s).PostImportFileWithHttpMessage(fileStream, datasetDisplayName, nameConflict), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult().Body); }
/// <summary> /// Returns a list of imports for the specified workspace /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='collectionName'> /// The workspace collection name /// </param> /// <param name='workspaceId'> /// The workspace id /// </param> public static ODataResponseListImport GetImports(this IImports operations, string collectionName, string workspaceId) { return(operations.GetImportsAsync(collectionName, workspaceId).GetAwaiter().GetResult()); }
/// <summary> /// Gets the import metadata for the specifed import id /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='collectionName'> /// The workspace collection name /// </param> /// <param name='workspaceId'> /// The workspace id /// </param> /// <param name='importId'> /// The import id /// </param> public static Import GetImportById(this IImports operations, string collectionName, string workspaceId, string importId) { return(operations.GetImportByIdAsync(collectionName, workspaceId, importId).GetAwaiter().GetResult()); }
/// <summary> /// Creates a temporary blob storage used to import .pbix files larger than 1 /// GB. /// </summary> /// <remarks> /// To import .pbix files larger than 1 GB, create a temporary upload location /// and upload the .pbix file using the shared access signature (SAS) url from /// the response, and then call [Post Import In /// Group](/rest/api/power-bi/imports/postimportingroup) and specify 'fileUrl' /// to be the SAS url in the [Request /// Body](/rest/api/power-bi/imports/postimportingroup#request-body).<br/><br/>**Note**: /// Import large .pbix files is only available for workspaces on premium /// capacity. <br/><br/>**Required scope**: Dataset.ReadWrite.All /// <br/>To set the permissions scope, see [Register an /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='groupId'> /// The workspace id /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <TemporaryUploadLocation> CreateTemporaryUploadLocationInGroupAsync(this IImports operations, string groupId, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CreateTemporaryUploadLocationInGroupWithHttpMessagesAsync(groupId, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Creates a temporary blob storage to be used to import .pbix files larger /// than 1 GB. /// </summary> /// <remarks> /// To import .pbix files larger than 1 GB, create a temporary upload location /// and upload the file using the shared access signature (SAS) url from the /// response, and then call [Post /// Import](/rest/api/power-bi/imports/postimport) and specify 'fileUrl' to be /// the SAS url in the [Request /// Body](/rest/api/power-bi/imports/postimport#request-body)<br/><br/>**Note**: /// Import large .pbix files is only available for workspaces on premium /// capacity. <br/><br/>**Required scope**: Dataset.ReadWrite.All /// <br/>To set the permissions scope, see [Register an /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> public static TemporaryUploadLocation CreateTemporaryUploadLocation(this IImports operations) { return(operations.CreateTemporaryUploadLocationAsync().GetAwaiter().GetResult()); }
/// <summary> /// Returns a list of imports from the specified workspace. /// </summary> /// <remarks> /// <br/>**Required scope**: Dataset.ReadWrite.All or Dataset.Read.All /// <br/>To set the permissions scope, see [Register an /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='groupId'> /// The workspace id /// </param> public static ODataResponseListImport GetImportsInGroup(this IImports operations, string groupId) { return(operations.GetImportsInGroupAsync(groupId).GetAwaiter().GetResult()); }
/// <summary> /// Returns a list of imports from **"My Workspace"**. /// </summary> /// <remarks> /// <br/>**Required scope**: Dataset.ReadWrite.All or Dataset.Read.All /// <br/>To set the permissions scope, see [Register an /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> public static ODataResponseListImport GetImports(this IImports operations) { return(operations.GetImportsAsync().GetAwaiter().GetResult()); }
protected override void InitializeObject(IGenericEntity ent) { if (ent is IImports) { IImports importsClass = (IImports)ent; DBStoredProcedure spInsertIntoImportTables = new DBStoredProcedure(); spInsertIntoImportTables.ProcedureName = "impWriteToImportTable"; spInsertIntoImportTables.AddParameter(new DBParameter("@fileName", DbType.String, ParameterDirection.Input, importsClass.FileName)); spInsertIntoImportTables.AddParameter(new DBParameter("@IdAssociate", DbType.Int32, ParameterDirection.Input, importsClass.IdAssociate)); this.AddStoredProcedure("InsertToImportsTable", spInsertIntoImportTables); DBStoredProcedure spInsertIntoActualTables = new DBStoredProcedure(); spInsertIntoActualTables.ProcedureName = "impWriteToActualTable"; spInsertIntoActualTables.AddParameter(new DBParameter("@IdAssociate", DbType.Int32, ParameterDirection.Input, importsClass.IdAssociate)); spInsertIntoActualTables.AddParameter(new DBParameter("@IdImport", DbType.Int32, ParameterDirection.Input, importsClass.IdImport)); spInsertIntoActualTables.AddParameter(new DBParameter("@SkipCCHRError", DbType.Byte, ParameterDirection.Input, importsClass.SkipCostCentersWithoutHourlyRateError)); this.AddStoredProcedure("InsertToActualTable", spInsertIntoActualTables); DBStoredProcedure spInsertIntoLogTables = new DBStoredProcedure(); spInsertIntoLogTables.ProcedureName = "impWriteToLogTables"; spInsertIntoLogTables.AddParameter(new DBParameter("@IdImport", DbType.Int32, ParameterDirection.Input, importsClass.IdImport)); spInsertIntoLogTables.AddParameter(new DBParameter("@IdAssociate", DbType.Int32, ParameterDirection.Input, importsClass.IdAssociate)); this.AddStoredProcedure("InsertToLogTable", spInsertIntoLogTables); DBStoredProcedure spCheckFileAlreadyUploaded = new DBStoredProcedure(); spCheckFileAlreadyUploaded.ProcedureName = "impCheckFileAlreadyUploaded"; spCheckFileAlreadyUploaded.AddParameter(new DBParameter("@fileName", DbType.String, ParameterDirection.Input, importsClass.FileName)); this.AddStoredProcedure("CheckFileAlreadyUploaded", spCheckFileAlreadyUploaded); DBStoredProcedure spSelect = new DBStoredProcedure(); spSelect.ProcedureName = "impSelectImports"; spSelect.AddParameter(new DBParameter("@IdImport", DbType.Int32, ParameterDirection.Input, importsClass.IdImport)); this.AddStoredProcedure("SelectObject", spSelect); DBStoredProcedure spRemove = new DBStoredProcedure(); spRemove.ProcedureName = "impRemoveActualImport"; spRemove.AddParameter(new DBParameter("@IdImport", DbType.Int32, ParameterDirection.Input, importsClass.IdImport)); this.AddStoredProcedure("impRemoveActualImport", spRemove); DBStoredProcedure spUploadErrorsToLogTables = new DBStoredProcedure(); spUploadErrorsToLogTables.ProcedureName = "impUploadErrorsToLogTables"; spUploadErrorsToLogTables.AddParameter(new DBParameter("@fileName", DbType.String, ParameterDirection.Input, importsClass.FileName)); spUploadErrorsToLogTables.AddParameter(new DBParameter("@IdAssociate", DbType.Int32, ParameterDirection.Input, importsClass.IdAssociate)); spUploadErrorsToLogTables.AddParameter(new DBParameter("@Message", DbType.Int32, ParameterDirection.Input, importsClass.Message)); spUploadErrorsToLogTables.AddParameter(new DBParameter("@IdSource", DbType.Int32, ParameterDirection.Input, importsClass.IdSource)); this.AddStoredProcedure("UploadErrorsToLogTables", spUploadErrorsToLogTables); DBStoredProcedure spProcessErrorToLogTable = new DBStoredProcedure(); spProcessErrorToLogTable.ProcedureName = "impProcessErrorToLogTable"; spProcessErrorToLogTable.AddParameter(new DBParameter("@IdImport", DbType.String, ParameterDirection.Input, importsClass.IdImport)); spProcessErrorToLogTable.AddParameter(new DBParameter("@Message", DbType.Int32, ParameterDirection.Input, importsClass.Message)); this.AddStoredProcedure("ProcessErrorToLogTable", spProcessErrorToLogTable); DBStoredProcedure spWriteKeyrowsMissingToLogTable = new DBStoredProcedure(); spWriteKeyrowsMissingToLogTable.ProcedureName = "impWriteKeyrowsMissingToLogTable"; spWriteKeyrowsMissingToLogTable.AddParameter(new DBParameter("@IdImport", DbType.Int32, ParameterDirection.Input, importsClass.IdImport)); spWriteKeyrowsMissingToLogTable.AddParameter(new DBParameter("@IdRow", DbType.Int32, ParameterDirection.Input, importsClass.IdRow)); spWriteKeyrowsMissingToLogTable.AddParameter(new DBParameter("@Message", DbType.String, ParameterDirection.Input, importsClass.Message)); this.AddStoredProcedure("WriteKeyrowsMissingToLogTable", spWriteKeyrowsMissingToLogTable); DBStoredProcedure spGetNonExistingAssociateNumbers = new DBStoredProcedure(); spGetNonExistingAssociateNumbers.ProcedureName = "impGetNonExistingAssociateNumbers"; spGetNonExistingAssociateNumbers.AddParameter(new DBParameter("@IdImport", DbType.Int32, ParameterDirection.Input, importsClass.IdImport)); this.AddStoredProcedure("GetNonExistingAssociateNumbers", spGetNonExistingAssociateNumbers); DBStoredProcedure spCheckChronologicalOrder = new DBStoredProcedure(); spCheckChronologicalOrder.ProcedureName = "impCheckFileImportChronologicalOrder"; spCheckChronologicalOrder.AddParameter(new DBParameter("@fileName", DbType.String, ParameterDirection.Input, importsClass.FileName)); this.AddStoredProcedure("CheckFileImportChronologicalOrder", spCheckChronologicalOrder); DBStoredProcedure spChronologicalErrorsToLogTables = new DBStoredProcedure(); spChronologicalErrorsToLogTables.ProcedureName = "impChronologicalErrorsToLogTables"; spChronologicalErrorsToLogTables.AddParameter(new DBParameter("@fileName", DbType.String, ParameterDirection.Input, importsClass.FileName)); spChronologicalErrorsToLogTables.AddParameter(new DBParameter("@IdAssociate", DbType.Int32, ParameterDirection.Input, importsClass.IdAssociate)); spChronologicalErrorsToLogTables.AddParameter(new DBParameter("@Message", DbType.Int32, ParameterDirection.Input, importsClass.Message)); spChronologicalErrorsToLogTables.AddParameter(new DBParameter("@IdSource", DbType.Int32, ParameterDirection.Input, importsClass.IdSource)); this.AddStoredProcedure("ChronologicalErrorsToLogTables", spChronologicalErrorsToLogTables); } }
/// <summary> /// Returns a list of imports for the specified workspace /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='collectionName'> /// The workspace collection name /// </param> /// <param name='workspaceId'> /// The workspace id /// </param> public static ODataResponseListImport GetImports(this IImports operations, string collectionName, string workspaceId) { return(Task.Factory.StartNew(s => ((IImports)s).GetImportsAsync(collectionName, workspaceId), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }