/// <summary>
 /// Creates or updates a watchlist and its watchlist items (bulk creation, e.g.
 /// through text/csv content type). To create a Watchlist and its items, we
 /// should call this endpoint with rawContent and contentType properties.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='workspaceName'>
 /// The name of the workspace.
 /// </param>
 /// <param name='watchlistAlias'>
 /// Watchlist Alias
 /// </param>
 /// <param name='watchlist'>
 /// The watchlist
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <Watchlist> CreateOrUpdateAsync(this IWatchlistsOperations operations, string resourceGroupName, string workspaceName, string watchlistAlias, Watchlist watchlist, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, workspaceName, watchlistAlias, watchlist, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Gets all watchlists, without watchlist items.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='workspaceName'>
 /// The name of the workspace.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <Watchlist> > ListAsync(this IWatchlistsOperations operations, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, workspaceName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Gets all watchlists, without watchlist items.
 /// </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 <Watchlist> > ListNextAsync(this IWatchlistsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Delete a watchlist.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='workspaceName'>
 /// The name of the workspace.
 /// </param>
 /// <param name='watchlistAlias'>
 /// Watchlist Alias
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <WatchlistsDeleteHeaders> DeleteAsync(this IWatchlistsOperations operations, string resourceGroupName, string workspaceName, string watchlistAlias, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.DeleteWithHttpMessagesAsync(resourceGroupName, workspaceName, watchlistAlias, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Headers);
     }
 }
 /// <summary>
 /// Gets a watchlist, without its watchlist items.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='workspaceName'>
 /// The name of the workspace.
 /// </param>
 /// <param name='watchlistAlias'>
 /// Watchlist Alias
 /// </param>
 public static Watchlist Get(this IWatchlistsOperations operations, string resourceGroupName, string workspaceName, string watchlistAlias)
 {
     return(operations.GetAsync(resourceGroupName, workspaceName, watchlistAlias).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Gets all watchlists, without watchlist items.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='workspaceName'>
 /// The name of the workspace.
 /// </param>
 public static IPage <Watchlist> List(this IWatchlistsOperations operations, string resourceGroupName, string workspaceName)
 {
     return(operations.ListAsync(resourceGroupName, workspaceName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Gets all watchlists, without watchlist items.
 /// </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 <Watchlist> ListNext(this IWatchlistsOperations operations, string nextPageLink)
 {
     return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Creates or updates a watchlist and its watchlist items (bulk creation, e.g.
 /// through text/csv content type). To create a Watchlist and its items, we
 /// should call this endpoint with rawContent and contentType properties.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='workspaceName'>
 /// The name of the workspace.
 /// </param>
 /// <param name='watchlistAlias'>
 /// Watchlist Alias
 /// </param>
 /// <param name='watchlist'>
 /// The watchlist
 /// </param>
 public static Watchlist CreateOrUpdate(this IWatchlistsOperations operations, string resourceGroupName, string workspaceName, string watchlistAlias, Watchlist watchlist)
 {
     return(operations.CreateOrUpdateAsync(resourceGroupName, workspaceName, watchlistAlias, watchlist).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Delete a watchlist.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='workspaceName'>
 /// The name of the workspace.
 /// </param>
 /// <param name='watchlistAlias'>
 /// Watchlist Alias
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteAsync(this IWatchlistsOperations operations, string resourceGroupName, string workspaceName, string watchlistAlias, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, workspaceName, watchlistAlias, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
 /// <summary>
 /// Delete a watchlist.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='workspaceName'>
 /// The name of the workspace.
 /// </param>
 /// <param name='watchlistAlias'>
 /// Watchlist Alias
 /// </param>
 public static void Delete(this IWatchlistsOperations operations, string resourceGroupName, string workspaceName, string watchlistAlias)
 {
     operations.DeleteAsync(resourceGroupName, workspaceName, watchlistAlias).GetAwaiter().GetResult();
 }