Skip to content

Commit

Permalink
Merge pull request #1859 from naveedaz/AutoRest
Browse files Browse the repository at this point in the history
Some API fixes and enhancements
  • Loading branch information
amarzavery committed Mar 17, 2016
2 parents 179a6e9 + efff035 commit 413c0d6
Show file tree
Hide file tree
Showing 38 changed files with 4,852 additions and 5,320 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4106,7 +4106,7 @@ internal HostingEnvironmentsOperations(WebSiteManagementClient client)
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public async Task<AzureOperationResponse<ServerFarmCollection>> GetHostingEnvironmentServerFarmsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
public async Task<AzureOperationResponse<ServerFarmCollection>> GetHostingEnvironmentWebHostingPlansWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (resourceGroupName == null)
{
Expand Down Expand Up @@ -4134,11 +4134,11 @@ internal HostingEnvironmentsOperations(WebSiteManagementClient client)
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("name", name);
tracingParameters.Add("cancellationToken", cancellationToken);
ServiceClientTracing.Enter(_invocationId, this, "GetHostingEnvironmentServerFarms", tracingParameters);
ServiceClientTracing.Enter(_invocationId, this, "GetHostingEnvironmentWebHostingPlans", tracingParameters);
}
// Construct URL
var _baseUrl = this.Client.BaseUri.AbsoluteUri;
var _url = new Uri(new Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms").ToString();
var _url = new Uri(new Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/webhostingplans").ToString();
_url = _url.Replace("{resourceGroupName}", Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{name}", Uri.EscapeDataString(name));
_url = _url.Replace("{subscriptionId}", Uri.EscapeDataString(this.Client.SubscriptionId));
Expand Down Expand Up @@ -4286,7 +4286,7 @@ internal HostingEnvironmentsOperations(WebSiteManagementClient client)
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public async Task<AzureOperationResponse<ServerFarmCollection>> GetHostingEnvironmentWebHostingPlansWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
public async Task<AzureOperationResponse<ServerFarmCollection>> GetHostingEnvironmentServerFarmsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (resourceGroupName == null)
{
Expand Down Expand Up @@ -4314,11 +4314,11 @@ internal HostingEnvironmentsOperations(WebSiteManagementClient client)
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("name", name);
tracingParameters.Add("cancellationToken", cancellationToken);
ServiceClientTracing.Enter(_invocationId, this, "GetHostingEnvironmentWebHostingPlans", tracingParameters);
ServiceClientTracing.Enter(_invocationId, this, "GetHostingEnvironmentServerFarms", tracingParameters);
}
// Construct URL
var _baseUrl = this.Client.BaseUri.AbsoluteUri;
var _url = new Uri(new Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/webhostingplans").ToString();
var _url = new Uri(new Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms").ToString();
_url = _url.Replace("{resourceGroupName}", Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{name}", Uri.EscapeDataString(name));
_url = _url.Replace("{subscriptionId}", Uri.EscapeDataString(this.Client.SubscriptionId));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1120,9 +1120,9 @@ public static UsageCollection GetHostingEnvironmentWebWorkerUsages(this IHosting
/// <param name='name'>
/// Name of hostingEnvironment (App Service Environment)
/// </param>
public static ServerFarmCollection GetHostingEnvironmentServerFarms(this IHostingEnvironmentsOperations operations, string resourceGroupName, string name)
public static ServerFarmCollection GetHostingEnvironmentWebHostingPlans(this IHostingEnvironmentsOperations operations, string resourceGroupName, string name)
{
return Task.Factory.StartNew(s => ((IHostingEnvironmentsOperations)s).GetHostingEnvironmentServerFarmsAsync(resourceGroupName, name), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
return Task.Factory.StartNew(s => ((IHostingEnvironmentsOperations)s).GetHostingEnvironmentWebHostingPlansAsync(resourceGroupName, name), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
}

/// <summary>
Expand All @@ -1141,9 +1141,9 @@ public static ServerFarmCollection GetHostingEnvironmentServerFarms(this IHostin
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<ServerFarmCollection> GetHostingEnvironmentServerFarmsAsync( this IHostingEnvironmentsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken))
public static async Task<ServerFarmCollection> GetHostingEnvironmentWebHostingPlansAsync( this IHostingEnvironmentsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.GetHostingEnvironmentServerFarmsWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false))
using (var _result = await operations.GetHostingEnvironmentWebHostingPlansWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
Expand All @@ -1162,9 +1162,9 @@ public static ServerFarmCollection GetHostingEnvironmentServerFarms(this IHostin
/// <param name='name'>
/// Name of hostingEnvironment (App Service Environment)
/// </param>
public static ServerFarmCollection GetHostingEnvironmentWebHostingPlans(this IHostingEnvironmentsOperations operations, string resourceGroupName, string name)
public static ServerFarmCollection GetHostingEnvironmentServerFarms(this IHostingEnvironmentsOperations operations, string resourceGroupName, string name)
{
return Task.Factory.StartNew(s => ((IHostingEnvironmentsOperations)s).GetHostingEnvironmentWebHostingPlansAsync(resourceGroupName, name), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
return Task.Factory.StartNew(s => ((IHostingEnvironmentsOperations)s).GetHostingEnvironmentServerFarmsAsync(resourceGroupName, name), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
}

/// <summary>
Expand All @@ -1183,9 +1183,9 @@ public static ServerFarmCollection GetHostingEnvironmentWebHostingPlans(this IHo
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<ServerFarmCollection> GetHostingEnvironmentWebHostingPlansAsync( this IHostingEnvironmentsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken))
public static async Task<ServerFarmCollection> GetHostingEnvironmentServerFarmsAsync( this IHostingEnvironmentsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.GetHostingEnvironmentWebHostingPlansWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false))
using (var _result = await operations.GetHostingEnvironmentServerFarmsWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ public partial interface IHostingEnvironmentsOperations
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
Task<AzureOperationResponse<ServerFarmCollection>> GetHostingEnvironmentServerFarmsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
Task<AzureOperationResponse<ServerFarmCollection>> GetHostingEnvironmentWebHostingPlansWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Get all serverfarms (App Service Plans) on the hostingEnvironment
/// (App Service Environment).
Expand All @@ -513,7 +513,7 @@ public partial interface IHostingEnvironmentsOperations
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
Task<AzureOperationResponse<ServerFarmCollection>> GetHostingEnvironmentWebHostingPlansWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
Task<AzureOperationResponse<ServerFarmCollection>> GetHostingEnvironmentServerFarmsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Get all multi role pools
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator 0.14.0.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.

namespace Microsoft.Azure.Management.WebSites
{
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;

/// <summary>
/// RecommendationsOperations operations.
/// </summary>
public partial interface IRecommendationsOperations
{
/// <summary>
/// Gets a list of recommendations associated with the specified
/// subscription.
/// </summary>
/// <param name='featured'>
/// If set, this API returns only the most critical recommendation
/// among the others. Otherwise this API returns all recommendations
/// available
/// </param>
/// <param name='filter'>
/// Return only channels specified in the filter. Filter is specified
/// by using OData syntax. Example: $filter=channels eq 'Api' or
/// channel eq 'Notification'
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
Task<AzureOperationResponse<IList<Recommendation>>> GetRecommendationBySubscriptionWithHttpMessagesAsync(bool? featured = default(bool?), string filter = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Gets the detailed properties of the recommendation object for the
/// specified web site.
/// </summary>
/// <param name='resourceGroupName'>
/// Resource group name
/// </param>
/// <param name='siteName'>
/// Site name
/// </param>
/// <param name='name'>
/// Recommendation rule name
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
Task<AzureOperationResponse<RecommendationRule>> GetRuleDetailsBySiteNameWithHttpMessagesAsync(string resourceGroupName, string siteName, string name, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Gets a list of recommendations associated with the specified web
/// site.
/// </summary>
/// <param name='resourceGroupName'>
/// Resource group name
/// </param>
/// <param name='siteName'>
/// Site name
/// </param>
/// <param name='featured'>
/// If set, this API returns only the most critical recommendation
/// among the others. Otherwise this API returns all recommendations
/// available
/// </param>
/// <param name='siteSku'>
/// The name of site SKU.
/// </param>
/// <param name='numSlots'>
/// The number of site slots associated to the site
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
Task<AzureOperationResponse<IList<Recommendation>>> GetRecommendedRulesForSiteWithHttpMessagesAsync(string resourceGroupName, string siteName, bool? featured = default(bool?), string siteSku = default(string), int? numSlots = default(int?), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Gets the list of past recommendations optionally specified by the
/// time range.
/// </summary>
/// <param name='resourceGroupName'>
/// Resource group name
/// </param>
/// <param name='siteName'>
/// Site name
/// </param>
/// <param name='startTime'>
/// The start time of a time range to query, e.g. $filter=startTime eq
/// '2015-01-01T00:00:00Z' and endTime eq '2015-01-02T00:00:00Z'
/// </param>
/// <param name='endTime'>
/// The end time of a time range to query, e.g. $filter=startTime eq
/// '2015-01-01T00:00:00Z' and endTime eq '2015-01-02T00:00:00Z'
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
Task<AzureOperationResponse<IList<Recommendation>>> GetRecommendationHistoryForSiteWithHttpMessagesAsync(string resourceGroupName, string siteName, string startTime = default(string), string endTime = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ public partial interface IServerFarmsOperations
/// Name of server farm
/// </param>
/// <param name='workerName'>
/// Name of worker machine, typically IP address
/// Name of worker machine, typically starts with RD
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
Expand Down
Loading

0 comments on commit 413c0d6

Please sign in to comment.