Skip to content

Commit

Permalink
Merge remote-tracking branch 'powerbi/master' into release-4.20.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ayeshurun committed Jun 16, 2024
2 parents 5440dcf + 3c828ef commit 2aab643
Show file tree
Hide file tree
Showing 11 changed files with 1,049 additions and 40 deletions.
98 changes: 98 additions & 0 deletions sdk/PowerBI.Api/Extensions/V2/ReportsOperationsExtensions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
// <auto-generated>
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>

namespace Microsoft.PowerBI.Api
{
using Models;
using System.IO;
using System.Threading;
using System.Threading.Tasks;

/// <summary>
/// Extension methods for ReportsOperations.
/// </summary>
public static partial class ReportsOperationsExtensions
{
/// <summary>
/// Binds the specified data source of the paginated report from the specified
/// workspace to the specified gateway, optionally with a given data source ID.
/// If you don't supply a specific data source ID, the data source will be
/// bound to the first matching data source in the gateway.
/// </summary>
/// <remarks>
///
/// ## Permissions
///
/// This API call can be called by a service principal profile.
///
/// ## Required Delegated Scopes
///
/// Workspace.Read.All or Workspace.ReadWrite.All
///
/// ## Limitations
///
/// Only supports the on-premises data gateway
/// &lt;br&gt;&lt;br&gt;
/// </remarks>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='groupId'>
/// The workspace ID
/// </param>
/// <param name='reportId'>
/// The report ID
/// </param>
/// <param name='rdlBindToGatewayRequest'>
/// The bind to gateway request payload.
/// </param>
public static void BindToGateway(this IReportsOperations operations, System.Guid groupId, System.Guid reportId, RdlBindToGatewayRequest rdlBindToGatewayRequest)
{
operations.BindToGatewayInGroupAsync(groupId, reportId, rdlBindToGatewayRequest).GetAwaiter().GetResult();
}

/// <summary>
/// Binds the specified data source of the paginated report from the specified
/// workspace to the specified gateway, optionally with a given data source ID.
/// If you don't supply a specific data source ID, the data source will be
/// bound to the first matching data source in the gateway.
/// </summary>
/// <remarks>
///
/// ## Permissions
///
/// This API call can be called by a service principal profile.
///
/// ## Required Delegated Scopes
///
/// Workspace.Read.All or Workspace.ReadWrite.All
///
/// ## Limitations
///
/// Only supports the on-premises data gateway
/// &lt;br&gt;&lt;br&gt;
/// </remarks>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='groupId'>
/// The workspace ID
/// </param>
/// <param name='reportId'>
/// The report ID
/// </param>
/// <param name='rdlBindToGatewayRequest'>
/// The bind to gateway request payload.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task BindToGatewayAsync(this IReportsOperations operations, System.Guid groupId, System.Guid reportId, RdlBindToGatewayRequest rdlBindToGatewayRequest, CancellationToken cancellationToken = default(CancellationToken))
{
(await operations.BindToGatewayInGroupWithHttpMessagesAsync(groupId, reportId, rdlBindToGatewayRequest, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
}
}
98 changes: 94 additions & 4 deletions sdk/PowerBI.Api/Source/IReportsOperations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,47 @@ public partial interface IReportsOperations
/// </exception>
Task<HttpOperationResponse<Stream>> GetFileOfExportToFileWithHttpMessagesAsync(System.Guid reportId, string exportId, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Binds the specified data source of the paginated report from **My
/// workspace** to the specified gateway, optionally with a given data
/// source ID. If you don't supply a specific data source ID, the data
/// source will be bound to the first matching data source in the
/// gateway.
/// </summary>
/// <remarks>
///
/// ## Permissions
///
/// This API call can be called by a service principal profile.
///
/// ## Required Delegated Scopes
///
/// Report.ReadWrite.All or Report.Read.All
///
/// ## Limitations
///
/// Only supports on-premises data gateway
/// &lt;br&gt;&lt;br&gt;
/// </remarks>
/// <param name='reportId'>
/// The report ID
/// </param>
/// <param name='rdlBindToGatewayRequest'>
/// The bind to gateway request payload.
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <exception cref="Microsoft.Rest.HttpOperationException">
/// Thrown when the operation returned an invalid status code
/// </exception>
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown when a required parameter is null
/// </exception>
Task<HttpOperationResponse> BindToGatewayWithHttpMessagesAsync(System.Guid reportId, RdlBindToGatewayRequest rdlBindToGatewayRequest, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Returns a list of reports from the specified workspace.
/// </summary>
/// <remarks>
Expand Down Expand Up @@ -731,10 +772,15 @@ public partial interface IReportsOperations
///
/// ## Limitations
///
/// For .pbix reports, exporting a report with a [Power BI service live
/// connection](/power-bi/desktop-report-lifecycle-datasets) isn't
/// supported after calling [Rebind
/// Report](/rest/api/power-bi/reports/rebind-report).
/// * For .pbix reports, exporting a report is subject to the same
/// limitation as [downloading a report .pbix
/// file](/power-bi/create-reports/service-export-to-pbix#limitations-when-downloading-a-report-pbix-file).
///
/// * After calling [Rebind
/// Report](/rest/api/power-bi/reports/rebind-report), exporting a
/// report with a [Power BI service live
/// connection](/power-bi/connect-data/desktop-report-lifecycle-datasets)
/// isn't supported.
/// &lt;br&gt;&lt;br&gt;
/// </remarks>
/// <param name='groupId'>
Expand Down Expand Up @@ -1314,6 +1360,50 @@ public partial interface IReportsOperations
/// </exception>
Task<HttpOperationResponse<EmbedToken>> GenerateTokenInGroupWithHttpMessagesAsync(System.Guid groupId, System.Guid reportId, GenerateTokenRequest requestParameters, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Binds the specified data source of the paginated report from the
/// specified workspace to the specified gateway, optionally with a
/// given data source ID. If you don't supply a specific data source
/// ID, the data source will be bound to the first matching data source
/// in the gateway.
/// </summary>
/// <remarks>
///
/// ## Permissions
///
/// This API call can be called by a service principal profile.
///
/// ## Required Delegated Scopes
///
/// Workspace.Read.All or Workspace.ReadWrite.All
///
/// ## Limitations
///
/// Only supports the on-premises data gateway
/// &lt;br&gt;&lt;br&gt;
/// </remarks>
/// <param name='groupId'>
/// The workspace ID
/// </param>
/// <param name='reportId'>
/// The report ID
/// </param>
/// <param name='rdlBindToGatewayRequest'>
/// The bind to gateway request payload.
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <exception cref="Microsoft.Rest.HttpOperationException">
/// Thrown when the operation returned an invalid status code
/// </exception>
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown when a required parameter is null
/// </exception>
Task<HttpOperationResponse> BindToGatewayInGroupWithHttpMessagesAsync(System.Guid groupId, System.Guid reportId, RdlBindToGatewayRequest rdlBindToGatewayRequest, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Returns a list of reports from the specified workspace.
/// </summary>
/// <remarks>
Expand Down
20 changes: 13 additions & 7 deletions sdk/PowerBI.Api/Source/Models/AdminDataset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,13 @@ public AdminDataset()
/// API with the `getArtifactUsers` parameter.</param>
/// <param name="addRowsAPIEnabled">Whether the dataset allows adding
/// new rows</param>
/// <param name="isRefreshable">Whether the dataset is refreshable or
/// not. A Power BI refreshable dataset is a dataset that has been
/// refreshed at least once, or for which a valid refresh schedule
/// exists.</param>
/// <param name="isRefreshable">This field returns `true` when the
/// dataset is either recently refreshed or is configured for automatic
/// refresh, with the connection mode specifically set to 'Import'. The
/// value will return `false` for other connection modes, such as
/// 'DirectQuery' and 'LiveConnection', regardless of whether the
/// dataset is manually refreshed or is set up for automatic
/// refresh.</param>
/// <param name="isInPlaceSharingEnabled">Whether the dataset can be
/// shared with external users to be consumed in their own
/// tenant</param>
Expand Down Expand Up @@ -218,9 +221,12 @@ public AdminDataset()
public bool? AddRowsAPIEnabled { get; set; }

/// <summary>
/// Gets or sets whether the dataset is refreshable or not. A Power BI
/// refreshable dataset is a dataset that has been refreshed at least
/// once, or for which a valid refresh schedule exists.
/// Gets or sets this field returns `true` when the dataset is either
/// recently refreshed or is configured for automatic refresh, with the
/// connection mode specifically set to 'Import'. The value will return
/// `false` for other connection modes, such as 'DirectQuery' and
/// 'LiveConnection', regardless of whether the dataset is manually
/// refreshed or is set up for automatic refresh.
/// </summary>
[JsonProperty(PropertyName = "IsRefreshable")]
public bool? IsRefreshable { get; set; }
Expand Down
20 changes: 13 additions & 7 deletions sdk/PowerBI.Api/Source/Models/Dataset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,13 @@ public Dataset()
/// API with the `getArtifactUsers` parameter.</param>
/// <param name="addRowsAPIEnabled">Whether the dataset allows adding
/// new rows</param>
/// <param name="isRefreshable">Whether the dataset is refreshable or
/// not. A Power BI refreshable dataset is a dataset that has been
/// refreshed at least once, or for which a valid refresh schedule
/// exists.</param>
/// <param name="isRefreshable">This field returns `true` when the
/// dataset is either recently refreshed or is configured for automatic
/// refresh, with the connection mode specifically set to 'Import'. The
/// value will return `false` for other connection modes, such as
/// 'DirectQuery' and 'LiveConnection', regardless of whether the
/// dataset is manually refreshed or is set up for automatic
/// refresh.</param>
/// <param name="isInPlaceSharingEnabled">Whether the dataset can be
/// shared with external users to be consumed in their own
/// tenant</param>
Expand Down Expand Up @@ -214,9 +217,12 @@ public Dataset()
public bool? AddRowsAPIEnabled { get; set; }

/// <summary>
/// Gets or sets whether the dataset is refreshable or not. A Power BI
/// refreshable dataset is a dataset that has been refreshed at least
/// once, or for which a valid refresh schedule exists.
/// Gets or sets this field returns `true` when the dataset is either
/// recently refreshed or is configured for automatic refresh, with the
/// connection mode specifically set to 'Import'. The value will return
/// `false` for other connection modes, such as 'DirectQuery' and
/// 'LiveConnection', regardless of whether the dataset is manually
/// refreshed or is set up for automatic refresh.
/// </summary>
[JsonProperty(PropertyName = "IsRefreshable")]
public bool? IsRefreshable { get; set; }
Expand Down
20 changes: 13 additions & 7 deletions sdk/PowerBI.Api/Source/Models/DatasetMiscProperties.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,13 @@ public DatasetMiscProperties()
/// </summary>
/// <param name="addRowsAPIEnabled">Whether the dataset allows adding
/// new rows</param>
/// <param name="isRefreshable">Whether the dataset is refreshable or
/// not. A Power BI refreshable dataset is a dataset that has been
/// refreshed at least once, or for which a valid refresh schedule
/// exists.</param>
/// <param name="isRefreshable">This field returns `true` when the
/// dataset is either recently refreshed or is configured for automatic
/// refresh, with the connection mode specifically set to 'Import'. The
/// value will return `false` for other connection modes, such as
/// 'DirectQuery' and 'LiveConnection', regardless of whether the
/// dataset is manually refreshed or is set up for automatic
/// refresh.</param>
/// <param name="isInPlaceSharingEnabled">Whether the dataset can be
/// shared with external users to be consumed in their own
/// tenant</param>
Expand All @@ -55,9 +58,12 @@ public DatasetMiscProperties()
public bool? AddRowsAPIEnabled { get; set; }

/// <summary>
/// Gets or sets whether the dataset is refreshable or not. A Power BI
/// refreshable dataset is a dataset that has been refreshed at least
/// once, or for which a valid refresh schedule exists.
/// Gets or sets this field returns `true` when the dataset is either
/// recently refreshed or is configured for automatic refresh, with the
/// connection mode specifically set to 'Import'. The value will return
/// `false` for other connection modes, such as 'DirectQuery' and
/// 'LiveConnection', regardless of whether the dataset is manually
/// refreshed or is set up for automatic refresh.
/// </summary>
[JsonProperty(PropertyName = "IsRefreshable")]
public bool? IsRefreshable { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion sdk/PowerBI.Api/Source/Models/ModifiedWorkspace.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public ModifiedWorkspace(System.Guid id)
/// <summary>
/// Gets or sets the workspace object ID
/// </summary>
[JsonProperty(PropertyName = "Id")]
[JsonProperty(PropertyName = "id")]
public System.Guid Id { get; set; }

/// <summary>
Expand Down
Loading

0 comments on commit 2aab643

Please sign in to comment.