/// <summary>
 /// List all API associated products.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.ApiManagement.IApiProductsOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group.
 /// </param>
 /// <param name='serviceName'>
 /// Required. The name of the Api Management service.
 /// </param>
 /// <param name='aid'>
 /// Required. Identifier of the API.
 /// </param>
 /// <param name='query'>
 /// Optional.
 /// </param>
 /// <returns>
 /// List Products operation response details.
 /// </returns>
 public static ProductListResponse List(this IApiProductsOperations operations, string resourceGroupName, string serviceName, string aid, QueryParameters query)
 {
     return Task.Factory.StartNew((object s) => 
     {
         return ((IApiProductsOperations)s).ListAsync(resourceGroupName, serviceName, aid, query);
     }
     , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }
 /// <summary>
 /// Lists report records.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.ApiManagement.IReportsOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group.
 /// </param>
 /// <param name='serviceName'>
 /// Required. The name of the Api Management service.
 /// </param>
 /// <param name='aggregation'>
 /// Required. Report aggregation.
 /// </param>
 /// <param name='query'>
 /// Optional.
 /// </param>
 /// <param name='interval'>
 /// Optional. By time interval. This value is only applicable to ByTime
 /// aggregation. Interval must be multiple of 15 minutes and may not
 /// be zero. The value should be in ISO  8601 format
 /// (http://en.wikipedia.org/wiki/ISO_8601#Durations).This code can be
 /// used to convert TimSpan to a valid interval string:
 /// XmlConvert.ToString(new TimeSpan(hours, minutes, secconds))
 /// </param>
 /// <returns>
 /// List Report records operation response details.
 /// </returns>
 public static ReportListResponse List(this IReportsOperations operations, string resourceGroupName, string serviceName, ReportsAggregation aggregation, QueryParameters query, string interval)
 {
     return Task.Factory.StartNew((object s) => 
     {
         return ((IReportsOperations)s).ListAsync(resourceGroupName, serviceName, aggregation, query, interval);
     }
     , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }
 /// <summary>
 /// List all APIs of the Api Management service instance.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.ApiManagement.IApisOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group.
 /// </param>
 /// <param name='serviceName'>
 /// Required. The name of the Api Management service.
 /// </param>
 /// <param name='query'>
 /// Optional.
 /// </param>
 /// <returns>
 /// List Api operations response details.
 /// </returns>
 public static Task<ApiListResponse> ListAsync(this IApisOperations operations, string resourceGroupName, string serviceName, QueryParameters query)
 {
     return operations.ListAsync(resourceGroupName, serviceName, query, CancellationToken.None);
 }
 /// <summary>
 /// List all user subscriptions of the Api Management service instance.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.ApiManagement.IUserSubscriptionsOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group.
 /// </param>
 /// <param name='serviceName'>
 /// Required. The name of the Api Management service.
 /// </param>
 /// <param name='uid'>
 /// Required. User identifier.
 /// </param>
 /// <param name='query'>
 /// Optional.
 /// </param>
 /// <returns>
 /// List Subscriptions operation response details.
 /// </returns>
 public static Task<SubscriptionListResponse> ListAsync(this IUserSubscriptionsOperations operations, string resourceGroupName, string serviceName, string uid, QueryParameters query)
 {
     return operations.ListAsync(resourceGroupName, serviceName, uid, query, CancellationToken.None);
 }
 /// <summary>
 /// Lists report records.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.ApiManagement.IReportsOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group.
 /// </param>
 /// <param name='serviceName'>
 /// Required. The name of the Api Management service.
 /// </param>
 /// <param name='aggregation'>
 /// Required. Report aggregation.
 /// </param>
 /// <param name='query'>
 /// Optional.
 /// </param>
 /// <param name='interval'>
 /// Optional. By time interval. This value is only applicable to ByTime
 /// aggregation. Interval must be multiple of 15 minutes and may not
 /// be zero. The value should be in ISO  8601 format
 /// (http://en.wikipedia.org/wiki/ISO_8601#Durations).This code can be
 /// used to convert TimSpan to a valid interval string:
 /// XmlConvert.ToString(new TimeSpan(hours, minutes, secconds))
 /// </param>
 /// <returns>
 /// List Report records operation response details.
 /// </returns>
 public static Task<ReportListResponse> ListAsync(this IReportsOperations operations, string resourceGroupName, string serviceName, ReportsAggregation aggregation, QueryParameters query, string interval)
 {
     return operations.ListAsync(resourceGroupName, serviceName, aggregation, query, interval, CancellationToken.None);
 }