/// <summary> /// Gets all available views for given user in the specified hub. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='hubName'> /// The name of the hub. /// </param> /// <param name='userId'> /// The user ID. Use * to retreive hub level views. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <ViewResourceFormatInner> > ListByHubAsync(this IViewsOperations operations, string resourceGroupName, string hubName, string userId, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListByHubWithHttpMessagesAsync(resourceGroupName, hubName, userId, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Creates a view or updates an exisiting view in the hub. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='hubName'> /// The name of the hub. /// </param> /// <param name='viewName'> /// The name of the view. /// </param> /// <param name='parameters'> /// Parameters supplied to the CreateOrUpdate View operation. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ViewResourceFormatInner> CreateOrUpdateAsync(this IViewsOperations operations, string resourceGroupName, string hubName, string viewName, ViewResourceFormatInner parameters, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, hubName, viewName, parameters, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets all available views for given user in the specified hub. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='nextPageLink'> /// The NextLink from the previous successful call to List operation. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <ViewResourceFormat> > ListByHubNextAsync(this IViewsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListByHubNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Deletes a view in the specified hub. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='hubName'> /// The name of the hub. /// </param> /// <param name='viewName'> /// The name of the view. /// </param> /// <param name='userId'> /// The user ID. Use * to retreive hub level view. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task DeleteAsync(this IViewsOperations operations, string resourceGroupName, string hubName, string viewName, string userId, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, hubName, viewName, userId, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Creates a view or updates an exisiting view in the hub. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='hubName'> /// The name of the hub. /// </param> /// <param name='viewName'> /// The name of the view. /// </param> /// <param name='parameters'> /// Parameters supplied to the CreateOrUpdate View operation. /// </param> public static ViewResourceFormat CreateOrUpdate(this IViewsOperations operations, string resourceGroupName, string hubName, string viewName, ViewResourceFormat parameters) { return(operations.CreateOrUpdateAsync(resourceGroupName, hubName, viewName, parameters).GetAwaiter().GetResult()); }
/// <summary> /// Gets all available views for given user in the specified hub. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='hubName'> /// The name of the hub. /// </param> /// <param name='userId'> /// The user ID. Use * to retreive hub level views. /// </param> public static IPage <ViewResourceFormat> ListByHub(this IViewsOperations operations, string resourceGroupName, string hubName, string userId) { return(operations.ListByHubAsync(resourceGroupName, hubName, userId).GetAwaiter().GetResult()); }
/// <summary> /// Gets all available views for given user in the specified hub. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='nextPageLink'> /// The NextLink from the previous successful call to List operation. /// </param> public static IPage <ViewResourceFormat> ListByHubNext(this IViewsOperations operations, string nextPageLink) { return(operations.ListByHubNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// Deletes a view in the specified hub. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='hubName'> /// The name of the hub. /// </param> /// <param name='viewName'> /// The name of the view. /// </param> /// <param name='userId'> /// The user ID. Use * to retreive hub level view. /// </param> public static void Delete(this IViewsOperations operations, string resourceGroupName, string hubName, string viewName, string userId) { operations.DeleteAsync(resourceGroupName, hubName, viewName, userId).GetAwaiter().GetResult(); }
/// <summary> /// Gets a view in the hub. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='hubName'> /// The name of the hub. /// </param> /// <param name='viewName'> /// The name of the view. /// </param> /// <param name='userId'> /// The user ID. Use * to retreive hub level view. /// </param> public static ViewResourceFormat Get(this IViewsOperations operations, string resourceGroupName, string hubName, string viewName, string userId) { return(operations.GetAsync(resourceGroupName, hubName, viewName, userId).GetAwaiter().GetResult()); }