/// <summary>
 /// Get past recommendations for an app, optionally specified by the time
 /// range.
 /// </summary>
 /// <remarks>
 /// Get past recommendations for an app, optionally specified by the time
 /// range.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of the resource group to which the resource belongs.
 /// </param>
 /// <param name='hostingEnvironmentName'>
 /// Name of the hosting environment.
 /// </param>
 /// <param name='expiredOnly'>
 /// Specify &lt;code&gt;false&lt;/code&gt; to return all recommendations. The
 /// default is &lt;code&gt;true&lt;/code&gt;, which returns only expired
 /// recommendations.
 /// </param>
 /// <param name='filter'>
 /// Filter is specified by using OData syntax. Example: $filter=channel eq
 /// 'Api' or channel eq 'Notification' and startTime eq 2014-01-01T00:00:00Z
 /// and endTime eq 2014-12-31T23:59:59Z and timeGrain eq
 /// duration'[PT1H|PT1M|P1D]
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <RecommendationInner> > ListHistoryForHostingEnvironmentAsync(this IRecommendationsOperations operations, string resourceGroupName, string hostingEnvironmentName, bool?expiredOnly = default(bool?), string filter = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListHistoryForHostingEnvironmentWithHttpMessagesAsync(resourceGroupName, hostingEnvironmentName, expiredOnly, filter, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }