diff --git a/src/ResourceManagement/Compute/Compute.Tests/Compute.Tests.csproj b/src/ResourceManagement/Compute/Compute.Tests/Compute.Tests.csproj index 07f35485607c4..155af54d895aa 100644 --- a/src/ResourceManagement/Compute/Compute.Tests/Compute.Tests.csproj +++ b/src/ResourceManagement/Compute/Compute.Tests/Compute.Tests.csproj @@ -117,6 +117,18 @@ + + + + + $(LibraryNugetPackageFolder)\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll + + + $(LibraryNugetPackageFolder)\Microsoft.Rest.ClientRuntime.1.1.0\lib\net45\Microsoft.Rest.ClientRuntime.dll + + + $(LibraryNugetPackageFolder)\Microsoft.Rest.ClientRuntime.Azure.1.0.13\lib\net45\Microsoft.Rest.ClientRuntime.Azure.dll + ..\..\..\..\packages\Microsoft.Azure.Test.Framework.2.0.5658.29898-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll True diff --git a/src/ResourceManagement/Compute/Compute.Tests/ScenarioTests/AvailabilitySetTests.cs b/src/ResourceManagement/Compute/Compute.Tests/ScenarioTests/AvailabilitySetTests.cs index 04bf0cee43f2f..14f75a9e5e4d0 100644 --- a/src/ResourceManagement/Compute/Compute.Tests/ScenarioTests/AvailabilitySetTests.cs +++ b/src/ResourceManagement/Compute/Compute.Tests/ScenarioTests/AvailabilitySetTests.cs @@ -13,16 +13,16 @@ // limitations under the License. // +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; using Microsoft.Azure; using Microsoft.Azure.Management.Compute; using Microsoft.Azure.Management.Compute.Models; using Microsoft.Azure.Management.Resources; using Microsoft.Azure.Management.Resources.Models; using Microsoft.Azure.Test; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Net; using Xunit; namespace Compute.Tests @@ -91,7 +91,7 @@ private void Initialize() resourcesClient = ComputeManagementTestUtilities.GetResourceManagementClient(handler); computeClient = ComputeManagementTestUtilities.GetComputeManagementClient(handler); - subId = computeClient.Credentials.SubscriptionId; + subId = computeClient.SubscriptionId; location = ComputeManagementTestUtilities.DefaultLocation; resourceGroupName = TestUtilities.GenerateName(testPrefix); diff --git a/src/ResourceManagement/Compute/Compute.Tests/ScenarioTests/ListVMTests.cs b/src/ResourceManagement/Compute/Compute.Tests/ScenarioTests/ListVMTests.cs index 3716da386e716..db0358f1e69f8 100644 --- a/src/ResourceManagement/Compute/Compute.Tests/ScenarioTests/ListVMTests.cs +++ b/src/ResourceManagement/Compute/Compute.Tests/ScenarioTests/ListVMTests.cs @@ -13,12 +13,11 @@ // limitations under the License. // +using System.Linq; using Microsoft.Azure.Management.Compute; using Microsoft.Azure.Management.Compute.Models; -using Microsoft.Azure.Test; -using System.Net; using Microsoft.Azure.Management.Resources; -using Microsoft.Azure.Management.Storage.Models; +using Microsoft.Azure.Test; using Xunit; namespace Compute.Tests @@ -51,12 +50,12 @@ public void TestListVMInSubscription() var vm2 = CreateVM_NoAsyncTracking(rg2Name, asName, storageAccountOutput, imageRef, out inputVM2); var listResponse = m_CrpClient.VirtualMachines.ListAll(); - Assert.True(listResponse.Value.Count >= 2); - Assert.Null(listResponse.NextLink); + Assert.True(listResponse.Count() >= 2); + Assert.Null(listResponse.NextPageLink); int vmsValidatedCount = 0; - foreach (var vm in listResponse.Value ) + foreach (var vm in listResponse) { if (vm.Name == vm1.Name) { diff --git a/src/ResourceManagement/Compute/Compute.Tests/ScenarioTests/VMScenarioTests.cs b/src/ResourceManagement/Compute/Compute.Tests/ScenarioTests/VMScenarioTests.cs index 86567d970b08b..164ee31e391cf 100644 --- a/src/ResourceManagement/Compute/Compute.Tests/ScenarioTests/VMScenarioTests.cs +++ b/src/ResourceManagement/Compute/Compute.Tests/ScenarioTests/VMScenarioTests.cs @@ -13,13 +13,13 @@ // limitations under the License. // +using System.Linq; +using System.Net; using Microsoft.Azure; using Microsoft.Azure.Management.Compute; using Microsoft.Azure.Management.Compute.Models; using Microsoft.Azure.Management.Resources; using Microsoft.Azure.Test; -using System.Linq; -using System.Net; using Xunit; namespace Compute.Tests @@ -71,7 +71,7 @@ public void TestVMScenarioOperations() ValidateVMInstanceView(inputVM, getVMWithInstanceViewResponse); var listResponse = m_CrpClient.VirtualMachines.List(rgName); - ValidateVM(inputVM, listResponse.Value.FirstOrDefault(x => x.Name == inputVM.Name), + ValidateVM(inputVM, listResponse.FirstOrDefault(x => x.Name == inputVM.Name), Helpers.GetVMReferenceId(m_subId, rgName, inputVM.Name)); var listVMSizesResponse = m_CrpClient.VirtualMachines.ListAvailableSizes(rgName, inputVM.Name); diff --git a/src/ResourceManagement/Compute/Compute.Tests/ScenarioTests/VMTestBase.cs b/src/ResourceManagement/Compute/Compute.Tests/ScenarioTests/VMTestBase.cs index dc2c9a9b54bb1..685673b2327d8 100644 --- a/src/ResourceManagement/Compute/Compute.Tests/ScenarioTests/VMTestBase.cs +++ b/src/ResourceManagement/Compute/Compute.Tests/ScenarioTests/VMTestBase.cs @@ -13,7 +13,11 @@ // limitations under the License. // -using Compute.Tests; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Net; using Microsoft.Azure; using Microsoft.Azure.Management.Compute; using Microsoft.Azure.Management.Compute.Models; @@ -24,12 +28,8 @@ using Microsoft.Azure.Management.Storage; using Microsoft.Azure.Management.Storage.Models; using Microsoft.Azure.Test; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Net; + using Xunit; -using System.Diagnostics; namespace Compute.Tests { @@ -63,7 +63,7 @@ protected void EnsureClientsInitialized() m_SrpClient = ComputeManagementTestUtilities.GetStorageManagementClient(handler); m_NrpClient = ComputeManagementTestUtilities.GetNetworkResourceProviderClient(handler); - m_subId = m_CrpClient.Credentials.SubscriptionId; + m_subId = m_CrpClient.SubscriptionId; m_location = ComputeManagementTestUtilities.DefaultLocation; } } @@ -130,7 +130,7 @@ protected StorageAccount CreateStorageAccount(string rgName, string storageAccou ComputeManagementTestUtilities.WaitSeconds(10); var stos = m_SrpClient.StorageAccounts.ListByResourceGroup(rgName); created = - stos.Value.Any( + stos.Any( t => StringComparer.OrdinalIgnoreCase.Equals(t.Name, storageAccountName)); } diff --git a/src/ResourceManagement/Compute/ComputeManagement/ComputeManagement.csproj b/src/ResourceManagement/Compute/ComputeManagement/ComputeManagement.csproj index 7950152123584..fd4414cf0d26c 100644 --- a/src/ResourceManagement/Compute/ComputeManagement/ComputeManagement.csproj +++ b/src/ResourceManagement/Compute/ComputeManagement/ComputeManagement.csproj @@ -38,6 +38,39 @@ True + + + + + $(LibraryNugetPackageFolder)\Newtonsoft.Json.6.0.4\lib\portable-net45+wp80+win8+wpa81\Newtonsoft.Json.dll + + + $(LibraryNugetPackageFolder)\Microsoft.Rest.ClientRuntime.1.1.0\lib\portable-net45+win8+wpa81\Microsoft.Rest.ClientRuntime.dll + + + $(LibraryNugetPackageFolder)\Microsoft.Rest.ClientRuntime.Azure.1.0.13\lib\portable-net45+win8+wpa81\Microsoft.Rest.ClientRuntime.Azure.dll + + + + + + + + + + + + $(LibraryNugetPackageFolder)\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll + + + $(LibraryNugetPackageFolder)\Microsoft.Rest.ClientRuntime.1.1.0\lib\net45\Microsoft.Rest.ClientRuntime.dll + + + $(LibraryNugetPackageFolder)\Microsoft.Rest.ClientRuntime.Azure.1.0.13\lib\net45\Microsoft.Rest.ClientRuntime.Azure.dll + + + + diff --git a/src/ResourceManagement/Compute/ComputeManagement/Generated/AvailabilitySetsOperations.cs b/src/ResourceManagement/Compute/ComputeManagement/Generated/AvailabilitySetsOperations.cs index e9a147a7ca84f..8ae5710ed37eb 100644 --- a/src/ResourceManagement/Compute/ComputeManagement/Generated/AvailabilitySetsOperations.cs +++ b/src/ResourceManagement/Compute/ComputeManagement/Generated/AvailabilitySetsOperations.cs @@ -11,8 +11,9 @@ namespace Microsoft.Azure.Management.Compute using System.Threading.Tasks; using Microsoft.Rest; using Newtonsoft.Json; - using Microsoft.Azure.OData; + using System.Linq; using System.Linq.Expressions; + using Microsoft.Azure.OData; using Microsoft.Azure; using Models; @@ -153,6 +154,10 @@ internal AvailabilitySetsOperations(ComputeManagementClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } if (shouldTrace) { ServiceClientTracing.Exit(invocationId, result); @@ -286,6 +291,10 @@ internal AvailabilitySetsOperations(ComputeManagementClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { @@ -416,6 +425,10 @@ internal AvailabilitySetsOperations(ComputeManagementClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { @@ -555,6 +568,10 @@ internal AvailabilitySetsOperations(ComputeManagementClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { @@ -710,6 +727,10 @@ internal AvailabilitySetsOperations(ComputeManagementClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { diff --git a/src/ResourceManagement/Compute/ComputeManagement/Generated/AvailabilitySetsOperationsExtensions.cs b/src/ResourceManagement/Compute/ComputeManagement/Generated/AvailabilitySetsOperationsExtensions.cs index 63637d2305fb8..e75b7239604da 100644 --- a/src/ResourceManagement/Compute/ComputeManagement/Generated/AvailabilitySetsOperationsExtensions.cs +++ b/src/ResourceManagement/Compute/ComputeManagement/Generated/AvailabilitySetsOperationsExtensions.cs @@ -16,7 +16,7 @@ public static partial class AvailabilitySetsOperationsExtensions /// The operation to delete the availability set. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -33,7 +33,7 @@ public static void Delete(this IAvailabilitySetsOperations operations, string re /// The operation to delete the availability set. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -53,7 +53,7 @@ public static void Delete(this IAvailabilitySetsOperations operations, string re /// The operation to get the availability set. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -70,7 +70,7 @@ public static AvailabilitySet Get(this IAvailabilitySetsOperations operations, s /// The operation to get the availability set. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -91,7 +91,7 @@ public static AvailabilitySet Get(this IAvailabilitySetsOperations operations, s /// The operation to list the availability sets. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -105,7 +105,7 @@ public static AvailabilitySetListResult List(this IAvailabilitySetsOperations op /// The operation to list the availability sets. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -123,7 +123,7 @@ public static AvailabilitySetListResult List(this IAvailabilitySetsOperations op /// Lists virtual-machine-sizes available to be used for an availability set. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -140,7 +140,7 @@ public static VirtualMachineSizeListResult ListAvailableSizes(this IAvailability /// Lists virtual-machine-sizes available to be used for an availability set. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -161,7 +161,7 @@ public static VirtualMachineSizeListResult ListAvailableSizes(this IAvailability /// The operation to create or update the availability set. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -181,7 +181,7 @@ public static AvailabilitySet CreateOrUpdate(this IAvailabilitySetsOperations op /// The operation to create or update the availability set. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. diff --git a/src/ResourceManagement/Compute/ComputeManagement/Generated/ComputeManagementClient.cs b/src/ResourceManagement/Compute/ComputeManagement/Generated/ComputeManagementClient.cs index dd88e889b1d24..5ff8570b94694 100644 --- a/src/ResourceManagement/Compute/ComputeManagement/Generated/ComputeManagementClient.cs +++ b/src/ResourceManagement/Compute/ComputeManagement/Generated/ComputeManagementClient.cs @@ -13,8 +13,9 @@ namespace Microsoft.Azure.Management.Compute using Microsoft.Rest; using Microsoft.Rest.Serialization; using Newtonsoft.Json; - using Microsoft.Azure.OData; + using System.Linq; using System.Linq.Expressions; + using Microsoft.Azure.OData; using Microsoft.Azure; using Models; @@ -38,10 +39,9 @@ public partial class ComputeManagementClient : ServiceClient - /// Subscription credentials which uniquely identify Microsoft Azure - /// subscription. + /// Management credentials for Azure. /// - public SubscriptionCloudCredentials Credentials { get; private set; } + public ServiceClientCredentials Credentials { get; private set; } /// /// Gets subscription credentials which uniquely identify Microsoft @@ -137,13 +137,13 @@ public ComputeManagementClient(Uri baseUri, params DelegatingHandler[] handlers) /// Initializes a new instance of the ComputeManagementClient class. /// /// - /// Required. Subscription credentials which uniquely identify Microsoft Azure subscription. + /// Required. Management credentials for Azure. /// /// /// Optional. The set of delegating handlers to insert in the http /// client pipeline. /// - public ComputeManagementClient(SubscriptionCloudCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) + public ComputeManagementClient(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) { if (credentials == null) { @@ -159,13 +159,13 @@ public ComputeManagementClient(SubscriptionCloudCredentials credentials, params /// Optional. The base URI of the service. /// /// - /// Required. Subscription credentials which uniquely identify Microsoft Azure subscription. + /// Required. Management credentials for Azure. /// /// /// Optional. The set of delegating handlers to insert in the http /// client pipeline. /// - public ComputeManagementClient(Uri baseUri, SubscriptionCloudCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) + public ComputeManagementClient(Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) { @@ -194,10 +194,6 @@ private void Initialize() this.BaseUri = new Uri("https://management.azure.com"); this.ApiVersion = "2015-06-15"; this.AcceptLanguage = "en-US"; - if (this.Credentials != null) - { - this.Credentials.InitializeServiceClient(this); - } SerializationSettings = new JsonSerializerSettings { Formatting = Formatting.Indented, diff --git a/src/ResourceManagement/Compute/ComputeManagement/Generated/IAvailabilitySetsOperations.cs b/src/ResourceManagement/Compute/ComputeManagement/Generated/IAvailabilitySetsOperations.cs index 857d3e316719a..ded1117c2d08d 100644 --- a/src/ResourceManagement/Compute/ComputeManagement/Generated/IAvailabilitySetsOperations.cs +++ b/src/ResourceManagement/Compute/ComputeManagement/Generated/IAvailabilitySetsOperations.cs @@ -6,8 +6,9 @@ namespace Microsoft.Azure.Management.Compute using System.Threading; using System.Threading.Tasks; using Microsoft.Rest; - using Microsoft.Azure.OData; + using System.Linq; using System.Linq.Expressions; + using Microsoft.Azure.OData; using Microsoft.Azure; using Models; @@ -25,10 +26,10 @@ public partial interface IAvailabilitySetsOperations /// The name of the availability set. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task DeleteWithHttpMessagesAsync(string resourceGroupName, string availabilitySetName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -41,10 +42,10 @@ public partial interface IAvailabilitySetsOperations /// The name of the availability set. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> GetWithHttpMessagesAsync(string resourceGroupName, string availabilitySetName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -54,10 +55,10 @@ public partial interface IAvailabilitySetsOperations /// The name of the resource group. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> ListWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -71,10 +72,10 @@ public partial interface IAvailabilitySetsOperations /// The name of the availability set. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> ListAvailableSizesWithHttpMessagesAsync(string resourceGroupName, string availabilitySetName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -90,10 +91,10 @@ public partial interface IAvailabilitySetsOperations /// Parameters supplied to the Create Availability Set operation. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string name, AvailabilitySet parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } diff --git a/src/ResourceManagement/Compute/ComputeManagement/Generated/IComputeManagementClient.cs b/src/ResourceManagement/Compute/ComputeManagement/Generated/IComputeManagementClient.cs index e4be4181302f5..c2cd3b6010cd3 100644 --- a/src/ResourceManagement/Compute/ComputeManagement/Generated/IComputeManagementClient.cs +++ b/src/ResourceManagement/Compute/ComputeManagement/Generated/IComputeManagementClient.cs @@ -7,8 +7,9 @@ namespace Microsoft.Azure.Management.Compute using System.Threading.Tasks; using Newtonsoft.Json; using Microsoft.Rest; - using Microsoft.Azure.OData; + using System.Linq; using System.Linq.Expressions; + using Microsoft.Azure.OData; using Microsoft.Azure; using Models; @@ -32,10 +33,9 @@ public partial interface IComputeManagementClient JsonSerializerSettings DeserializationSettings { get; } /// - /// Subscription credentials which uniquely identify Microsoft Azure - /// subscription. + /// Management credentials for Azure. /// - SubscriptionCloudCredentials Credentials { get; } + ServiceClientCredentials Credentials { get; } /// /// Gets subscription credentials which uniquely identify Microsoft diff --git a/src/ResourceManagement/Compute/ComputeManagement/Generated/IUsageOperations.cs b/src/ResourceManagement/Compute/ComputeManagement/Generated/IUsageOperations.cs index 2cfe2d4aae339..54b7e6ab02ac0 100644 --- a/src/ResourceManagement/Compute/ComputeManagement/Generated/IUsageOperations.cs +++ b/src/ResourceManagement/Compute/ComputeManagement/Generated/IUsageOperations.cs @@ -6,8 +6,9 @@ namespace Microsoft.Azure.Management.Compute using System.Threading; using System.Threading.Tasks; using Microsoft.Rest; - using Microsoft.Azure.OData; + using System.Linq; using System.Linq.Expressions; + using Microsoft.Azure.OData; using Microsoft.Azure; using Models; @@ -22,10 +23,10 @@ public partial interface IUsageOperations /// The location upon which resource usage is queried. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> ListWithHttpMessagesAsync(string location, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } diff --git a/src/ResourceManagement/Compute/ComputeManagement/Generated/IVirtualMachineExtensionImagesOperations.cs b/src/ResourceManagement/Compute/ComputeManagement/Generated/IVirtualMachineExtensionImagesOperations.cs index 54369f522c7d3..206eca9803ea6 100644 --- a/src/ResourceManagement/Compute/ComputeManagement/Generated/IVirtualMachineExtensionImagesOperations.cs +++ b/src/ResourceManagement/Compute/ComputeManagement/Generated/IVirtualMachineExtensionImagesOperations.cs @@ -6,8 +6,9 @@ namespace Microsoft.Azure.Management.Compute using System.Threading; using System.Threading.Tasks; using Microsoft.Rest; - using Microsoft.Azure.OData; + using System.Linq; using System.Linq.Expressions; + using Microsoft.Azure.OData; using Microsoft.Azure; using Models; @@ -27,10 +28,10 @@ public partial interface IVirtualMachineExtensionImagesOperations /// /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> GetWithHttpMessagesAsync(string location, string publisherName, string type, string version, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -50,10 +51,10 @@ public partial interface IVirtualMachineExtensionImagesOperations /// /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task>> ListVersionsWithHttpMessagesAsync(string location, string publisherName, string type, Expression> filter = default(Expression>), int? top = default(int?), string orderby = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -64,10 +65,10 @@ public partial interface IVirtualMachineExtensionImagesOperations /// /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task>> ListTypesWithHttpMessagesAsync(string location, string publisherName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } diff --git a/src/ResourceManagement/Compute/ComputeManagement/Generated/IVirtualMachineExtensionsOperations.cs b/src/ResourceManagement/Compute/ComputeManagement/Generated/IVirtualMachineExtensionsOperations.cs index 969a37bfdfa2e..f387633f1c0a8 100644 --- a/src/ResourceManagement/Compute/ComputeManagement/Generated/IVirtualMachineExtensionsOperations.cs +++ b/src/ResourceManagement/Compute/ComputeManagement/Generated/IVirtualMachineExtensionsOperations.cs @@ -6,8 +6,9 @@ namespace Microsoft.Azure.Management.Compute using System.Threading; using System.Threading.Tasks; using Microsoft.Rest; - using Microsoft.Azure.OData; + using System.Linq; using System.Linq.Expressions; + using Microsoft.Azure.OData; using Microsoft.Azure; using Models; @@ -33,10 +34,10 @@ public partial interface IVirtualMachineExtensionsOperations /// operation. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string vmName, string vmExtensionName, VirtualMachineExtension extensionParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -57,10 +58,10 @@ public partial interface IVirtualMachineExtensionsOperations /// operation. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string vmName, string vmExtensionName, VirtualMachineExtension extensionParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -77,10 +78,10 @@ public partial interface IVirtualMachineExtensionsOperations /// The name of the virtual machine extension. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task DeleteWithHttpMessagesAsync(string resourceGroupName, string vmName, string vmExtensionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -97,10 +98,10 @@ public partial interface IVirtualMachineExtensionsOperations /// The name of the virtual machine extension. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string vmName, string vmExtensionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -120,10 +121,10 @@ public partial interface IVirtualMachineExtensionsOperations /// 'instanceView'. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> GetWithHttpMessagesAsync(string resourceGroupName, string vmName, string vmExtensionName, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } diff --git a/src/ResourceManagement/Compute/ComputeManagement/Generated/IVirtualMachineImagesOperations.cs b/src/ResourceManagement/Compute/ComputeManagement/Generated/IVirtualMachineImagesOperations.cs index c0c1bf2cfb3f0..ac55fcb9e49fb 100644 --- a/src/ResourceManagement/Compute/ComputeManagement/Generated/IVirtualMachineImagesOperations.cs +++ b/src/ResourceManagement/Compute/ComputeManagement/Generated/IVirtualMachineImagesOperations.cs @@ -6,8 +6,9 @@ namespace Microsoft.Azure.Management.Compute using System.Threading; using System.Threading.Tasks; using Microsoft.Rest; - using Microsoft.Azure.OData; + using System.Linq; using System.Linq.Expressions; + using Microsoft.Azure.OData; using Microsoft.Azure; using Models; @@ -29,10 +30,10 @@ public partial interface IVirtualMachineImagesOperations /// /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> GetWithHttpMessagesAsync(string location, string publisherName, string offer, string skus, string version, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -43,10 +44,10 @@ public partial interface IVirtualMachineImagesOperations /// /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task>> ListOffersWithHttpMessagesAsync(string location, string publisherName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -55,10 +56,10 @@ public partial interface IVirtualMachineImagesOperations /// /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task>> ListPublishersWithHttpMessagesAsync(string location, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -71,10 +72,10 @@ public partial interface IVirtualMachineImagesOperations /// /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task>> ListSkusWithHttpMessagesAsync(string location, string publisherName, string offer, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -96,10 +97,10 @@ public partial interface IVirtualMachineImagesOperations /// /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task>> ListWithHttpMessagesAsync(string location, string publisherName, string offer, string skus, Expression> filter = default(Expression>), int? top = default(int?), string orderby = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } diff --git a/src/ResourceManagement/Compute/ComputeManagement/Generated/IVirtualMachineSizesOperations.cs b/src/ResourceManagement/Compute/ComputeManagement/Generated/IVirtualMachineSizesOperations.cs index 95c108948eb52..54608e814d7e5 100644 --- a/src/ResourceManagement/Compute/ComputeManagement/Generated/IVirtualMachineSizesOperations.cs +++ b/src/ResourceManagement/Compute/ComputeManagement/Generated/IVirtualMachineSizesOperations.cs @@ -6,8 +6,9 @@ namespace Microsoft.Azure.Management.Compute using System.Threading; using System.Threading.Tasks; using Microsoft.Rest; - using Microsoft.Azure.OData; + using System.Linq; using System.Linq.Expressions; + using Microsoft.Azure.OData; using Microsoft.Azure; using Models; @@ -23,10 +24,10 @@ public partial interface IVirtualMachineSizesOperations /// The location upon which virtual-machine-sizes is queried. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> ListWithHttpMessagesAsync(string location, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } diff --git a/src/ResourceManagement/Compute/ComputeManagement/Generated/IVirtualMachinesOperations.cs b/src/ResourceManagement/Compute/ComputeManagement/Generated/IVirtualMachinesOperations.cs index 7113379b005c7..f92d9af095faa 100644 --- a/src/ResourceManagement/Compute/ComputeManagement/Generated/IVirtualMachinesOperations.cs +++ b/src/ResourceManagement/Compute/ComputeManagement/Generated/IVirtualMachinesOperations.cs @@ -6,8 +6,9 @@ namespace Microsoft.Azure.Management.Compute using System.Threading; using System.Threading.Tasks; using Microsoft.Rest; - using Microsoft.Azure.OData; + using System.Linq; using System.Linq.Expressions; + using Microsoft.Azure.OData; using Microsoft.Azure; using Models; @@ -29,10 +30,10 @@ public partial interface IVirtualMachinesOperations /// Parameters supplied to the Capture Virtual Machine operation. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> CaptureWithHttpMessagesAsync(string resourceGroupName, string vmName, VirtualMachineCaptureParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -49,10 +50,10 @@ public partial interface IVirtualMachinesOperations /// Parameters supplied to the Capture Virtual Machine operation. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> BeginCaptureWithHttpMessagesAsync(string resourceGroupName, string vmName, VirtualMachineCaptureParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -68,10 +69,10 @@ public partial interface IVirtualMachinesOperations /// Parameters supplied to the Create Virtual Machine operation. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string vmName, VirtualMachine parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -87,10 +88,10 @@ public partial interface IVirtualMachinesOperations /// Parameters supplied to the Create Virtual Machine operation. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string vmName, VirtualMachine parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -103,10 +104,10 @@ public partial interface IVirtualMachinesOperations /// The name of the virtual machine. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task DeleteWithHttpMessagesAsync(string resourceGroupName, string vmName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -119,10 +120,10 @@ public partial interface IVirtualMachinesOperations /// The name of the virtual machine. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string vmName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -139,10 +140,10 @@ public partial interface IVirtualMachinesOperations /// 'instanceView'. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> GetWithHttpMessagesAsync(string resourceGroupName, string vmName, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -157,10 +158,10 @@ public partial interface IVirtualMachinesOperations /// The name of the virtual machine. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task DeallocateWithHttpMessagesAsync(string resourceGroupName, string vmName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -175,10 +176,10 @@ public partial interface IVirtualMachinesOperations /// The name of the virtual machine. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task BeginDeallocateWithHttpMessagesAsync(string resourceGroupName, string vmName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -191,10 +192,10 @@ public partial interface IVirtualMachinesOperations /// The name of the virtual machine. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task GeneralizeWithHttpMessagesAsync(string resourceGroupName, string vmName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -204,12 +205,12 @@ public partial interface IVirtualMachinesOperations /// The name of the resource group. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Gets the list of Virtual Machines in the subscription. Use /// nextLink property in the response to get the next page of Virtual @@ -217,12 +218,12 @@ public partial interface IVirtualMachinesOperations /// Virtual Machines. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListAllWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListAllWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Lists virtual-machine-sizes available to be used for a virtual /// machine. @@ -234,10 +235,10 @@ public partial interface IVirtualMachinesOperations /// The name of the virtual machine. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> ListAvailableSizesWithHttpMessagesAsync(string resourceGroupName, string vmName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -250,10 +251,10 @@ public partial interface IVirtualMachinesOperations /// The name of the virtual machine. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task PowerOffWithHttpMessagesAsync(string resourceGroupName, string vmName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -266,10 +267,10 @@ public partial interface IVirtualMachinesOperations /// The name of the virtual machine. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task BeginPowerOffWithHttpMessagesAsync(string resourceGroupName, string vmName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -282,10 +283,10 @@ public partial interface IVirtualMachinesOperations /// The name of the virtual machine. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task RestartWithHttpMessagesAsync(string resourceGroupName, string vmName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -298,10 +299,10 @@ public partial interface IVirtualMachinesOperations /// The name of the virtual machine. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task BeginRestartWithHttpMessagesAsync(string resourceGroupName, string vmName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -314,10 +315,10 @@ public partial interface IVirtualMachinesOperations /// The name of the virtual machine. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task StartWithHttpMessagesAsync(string resourceGroupName, string vmName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -330,40 +331,40 @@ public partial interface IVirtualMachinesOperations /// The name of the virtual machine. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task BeginStartWithHttpMessagesAsync(string resourceGroupName, string vmName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// The operation to list virtual machines under a resource group. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Gets the list of Virtual Machines in the subscription. Use /// nextLink property in the response to get the next page of Virtual /// Machines. Do this till nextLink is not null to fetch all the /// Virtual Machines. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListAllNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListAllNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/src/ResourceManagement/Compute/ComputeManagement/Generated/Models/CachingTypes.cs b/src/ResourceManagement/Compute/ComputeManagement/Generated/Models/CachingTypes.cs index 4b85315714462..1a0ffe079ef0d 100644 --- a/src/ResourceManagement/Compute/ComputeManagement/Generated/Models/CachingTypes.cs +++ b/src/ResourceManagement/Compute/ComputeManagement/Generated/Models/CachingTypes.cs @@ -5,7 +5,7 @@ namespace Microsoft.Azure.Management.Compute.Models using System.Runtime.Serialization; /// - /// Defines values for CachingTypes + /// Defines values for CachingTypes. /// [JsonConverter(typeof(StringEnumConverter))] public enum CachingTypes diff --git a/src/ResourceManagement/Compute/ComputeManagement/Generated/Models/ComponentNames.cs b/src/ResourceManagement/Compute/ComputeManagement/Generated/Models/ComponentNames.cs index 3460fb0b8f9d4..2dcc4874ef5d3 100644 --- a/src/ResourceManagement/Compute/ComputeManagement/Generated/Models/ComponentNames.cs +++ b/src/ResourceManagement/Compute/ComputeManagement/Generated/Models/ComponentNames.cs @@ -5,7 +5,7 @@ namespace Microsoft.Azure.Management.Compute.Models using System.Runtime.Serialization; /// - /// Defines values for ComponentNames + /// Defines values for ComponentNames. /// [JsonConverter(typeof(StringEnumConverter))] public enum ComponentNames diff --git a/src/ResourceManagement/Compute/ComputeManagement/Generated/Models/ComputeOperationStatus.cs b/src/ResourceManagement/Compute/ComputeManagement/Generated/Models/ComputeOperationStatus.cs index c34c10cb3bb45..34d9619641f93 100644 --- a/src/ResourceManagement/Compute/ComputeManagement/Generated/Models/ComputeOperationStatus.cs +++ b/src/ResourceManagement/Compute/ComputeManagement/Generated/Models/ComputeOperationStatus.cs @@ -5,7 +5,7 @@ namespace Microsoft.Azure.Management.Compute.Models using System.Runtime.Serialization; /// - /// Defines values for ComputeOperationStatus + /// Defines values for ComputeOperationStatus. /// [JsonConverter(typeof(StringEnumConverter))] public enum ComputeOperationStatus diff --git a/src/ResourceManagement/Compute/ComputeManagement/Generated/Models/DiskCreateOptionTypes.cs b/src/ResourceManagement/Compute/ComputeManagement/Generated/Models/DiskCreateOptionTypes.cs index 9842fc7c45a78..84d9ec14f266c 100644 --- a/src/ResourceManagement/Compute/ComputeManagement/Generated/Models/DiskCreateOptionTypes.cs +++ b/src/ResourceManagement/Compute/ComputeManagement/Generated/Models/DiskCreateOptionTypes.cs @@ -5,7 +5,7 @@ namespace Microsoft.Azure.Management.Compute.Models using System.Runtime.Serialization; /// - /// Defines values for DiskCreateOptionTypes + /// Defines values for DiskCreateOptionTypes. /// [JsonConverter(typeof(StringEnumConverter))] public enum DiskCreateOptionTypes diff --git a/src/ResourceManagement/Compute/ComputeManagement/Generated/Models/OperatingSystemTypes.cs b/src/ResourceManagement/Compute/ComputeManagement/Generated/Models/OperatingSystemTypes.cs index dc2a2f60d7c36..ded33d5cc3fcd 100644 --- a/src/ResourceManagement/Compute/ComputeManagement/Generated/Models/OperatingSystemTypes.cs +++ b/src/ResourceManagement/Compute/ComputeManagement/Generated/Models/OperatingSystemTypes.cs @@ -5,7 +5,7 @@ namespace Microsoft.Azure.Management.Compute.Models using System.Runtime.Serialization; /// - /// Defines values for OperatingSystemTypes + /// Defines values for OperatingSystemTypes. /// [JsonConverter(typeof(StringEnumConverter))] public enum OperatingSystemTypes diff --git a/src/ResourceManagement/Compute/ComputeManagement/Generated/Models/OperationStatus.cs b/src/ResourceManagement/Compute/ComputeManagement/Generated/Models/OperationStatus.cs index eace81d08944c..afa9e78a42f4a 100644 --- a/src/ResourceManagement/Compute/ComputeManagement/Generated/Models/OperationStatus.cs +++ b/src/ResourceManagement/Compute/ComputeManagement/Generated/Models/OperationStatus.cs @@ -5,7 +5,7 @@ namespace Microsoft.Azure.Management.Compute.Models using System.Runtime.Serialization; /// - /// Defines values for OperationStatus + /// Defines values for OperationStatus. /// [JsonConverter(typeof(StringEnumConverter))] public enum OperationStatus diff --git a/src/ResourceManagement/Compute/ComputeManagement/Generated/Models/PassNames.cs b/src/ResourceManagement/Compute/ComputeManagement/Generated/Models/PassNames.cs index b2195dbbf0b15..05ac9a51c4eb4 100644 --- a/src/ResourceManagement/Compute/ComputeManagement/Generated/Models/PassNames.cs +++ b/src/ResourceManagement/Compute/ComputeManagement/Generated/Models/PassNames.cs @@ -5,7 +5,7 @@ namespace Microsoft.Azure.Management.Compute.Models using System.Runtime.Serialization; /// - /// Defines values for PassNames + /// Defines values for PassNames. /// [JsonConverter(typeof(StringEnumConverter))] public enum PassNames diff --git a/src/ResourceManagement/Compute/ComputeManagement/Generated/Models/ProtocolTypes.cs b/src/ResourceManagement/Compute/ComputeManagement/Generated/Models/ProtocolTypes.cs index 4dcdac0fbeb94..189916d03ac88 100644 --- a/src/ResourceManagement/Compute/ComputeManagement/Generated/Models/ProtocolTypes.cs +++ b/src/ResourceManagement/Compute/ComputeManagement/Generated/Models/ProtocolTypes.cs @@ -5,7 +5,7 @@ namespace Microsoft.Azure.Management.Compute.Models using System.Runtime.Serialization; /// - /// Defines values for ProtocolTypes + /// Defines values for ProtocolTypes. /// [JsonConverter(typeof(StringEnumConverter))] public enum ProtocolTypes diff --git a/src/ResourceManagement/Compute/ComputeManagement/Generated/Models/SettingNames.cs b/src/ResourceManagement/Compute/ComputeManagement/Generated/Models/SettingNames.cs index f121929f8b9d3..ec77b1112f7ae 100644 --- a/src/ResourceManagement/Compute/ComputeManagement/Generated/Models/SettingNames.cs +++ b/src/ResourceManagement/Compute/ComputeManagement/Generated/Models/SettingNames.cs @@ -5,7 +5,7 @@ namespace Microsoft.Azure.Management.Compute.Models using System.Runtime.Serialization; /// - /// Defines values for SettingNames + /// Defines values for SettingNames. /// [JsonConverter(typeof(StringEnumConverter))] public enum SettingNames diff --git a/src/ResourceManagement/Compute/ComputeManagement/Generated/Models/StatusLevelTypes.cs b/src/ResourceManagement/Compute/ComputeManagement/Generated/Models/StatusLevelTypes.cs index 80f0c651e46ff..8ef6c425faa9f 100644 --- a/src/ResourceManagement/Compute/ComputeManagement/Generated/Models/StatusLevelTypes.cs +++ b/src/ResourceManagement/Compute/ComputeManagement/Generated/Models/StatusLevelTypes.cs @@ -5,7 +5,7 @@ namespace Microsoft.Azure.Management.Compute.Models using System.Runtime.Serialization; /// - /// Defines values for StatusLevelTypes + /// Defines values for StatusLevelTypes. /// [JsonConverter(typeof(StringEnumConverter))] public enum StatusLevelTypes diff --git a/src/ResourceManagement/Compute/ComputeManagement/Generated/Models/UsageUnit.cs b/src/ResourceManagement/Compute/ComputeManagement/Generated/Models/UsageUnit.cs index 240324054e00b..e9bce6a926a6b 100644 --- a/src/ResourceManagement/Compute/ComputeManagement/Generated/Models/UsageUnit.cs +++ b/src/ResourceManagement/Compute/ComputeManagement/Generated/Models/UsageUnit.cs @@ -5,7 +5,7 @@ namespace Microsoft.Azure.Management.Compute.Models using System.Runtime.Serialization; /// - /// Defines values for UsageUnit + /// Defines values for UsageUnit. /// [JsonConverter(typeof(StringEnumConverter))] public enum UsageUnit diff --git a/src/ResourceManagement/Compute/ComputeManagement/Generated/Models/VirtualMachineSizeTypes.cs b/src/ResourceManagement/Compute/ComputeManagement/Generated/Models/VirtualMachineSizeTypes.cs index 2832c9b94c88b..cf891ef4e499d 100644 --- a/src/ResourceManagement/Compute/ComputeManagement/Generated/Models/VirtualMachineSizeTypes.cs +++ b/src/ResourceManagement/Compute/ComputeManagement/Generated/Models/VirtualMachineSizeTypes.cs @@ -5,7 +5,7 @@ namespace Microsoft.Azure.Management.Compute.Models using System.Runtime.Serialization; /// - /// Defines values for VirtualMachineSizeTypes + /// Defines values for VirtualMachineSizeTypes. /// [JsonConverter(typeof(StringEnumConverter))] public enum VirtualMachineSizeTypes diff --git a/src/ResourceManagement/Compute/ComputeManagement/Generated/UsageOperations.cs b/src/ResourceManagement/Compute/ComputeManagement/Generated/UsageOperations.cs index 05c8f216c184c..be438ab0947fe 100644 --- a/src/ResourceManagement/Compute/ComputeManagement/Generated/UsageOperations.cs +++ b/src/ResourceManagement/Compute/ComputeManagement/Generated/UsageOperations.cs @@ -11,8 +11,9 @@ namespace Microsoft.Azure.Management.Compute using System.Threading.Tasks; using Microsoft.Rest; using Newtonsoft.Json; - using Microsoft.Azure.OData; + using System.Linq; using System.Linq.Expressions; + using Microsoft.Azure.OData; using Microsoft.Azure; using Models; @@ -151,6 +152,10 @@ internal UsageOperations(ComputeManagementClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { diff --git a/src/ResourceManagement/Compute/ComputeManagement/Generated/UsageOperationsExtensions.cs b/src/ResourceManagement/Compute/ComputeManagement/Generated/UsageOperationsExtensions.cs index 53c21c82abb1c..8163812020a0e 100644 --- a/src/ResourceManagement/Compute/ComputeManagement/Generated/UsageOperationsExtensions.cs +++ b/src/ResourceManagement/Compute/ComputeManagement/Generated/UsageOperationsExtensions.cs @@ -16,7 +16,7 @@ public static partial class UsageOperationsExtensions /// Lists compute usages for a subscription. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The location upon which resource usage is queried. @@ -30,7 +30,7 @@ public static ListUsagesResult List(this IUsageOperations operations, string loc /// Lists compute usages for a subscription. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The location upon which resource usage is queried. diff --git a/src/ResourceManagement/Compute/ComputeManagement/Generated/VirtualMachineExtensionImagesOperations.cs b/src/ResourceManagement/Compute/ComputeManagement/Generated/VirtualMachineExtensionImagesOperations.cs index 2e7f2a3229481..7d4e78cc04cca 100644 --- a/src/ResourceManagement/Compute/ComputeManagement/Generated/VirtualMachineExtensionImagesOperations.cs +++ b/src/ResourceManagement/Compute/ComputeManagement/Generated/VirtualMachineExtensionImagesOperations.cs @@ -11,8 +11,9 @@ namespace Microsoft.Azure.Management.Compute using System.Threading.Tasks; using Microsoft.Rest; using Newtonsoft.Json; - using Microsoft.Azure.OData; + using System.Linq; using System.Linq.Expressions; + using Microsoft.Azure.OData; using Microsoft.Azure; using Models; @@ -174,6 +175,10 @@ internal VirtualMachineExtensionImagesOperations(ComputeManagementClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { @@ -341,6 +346,10 @@ internal VirtualMachineExtensionImagesOperations(ComputeManagementClient client) var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { @@ -478,6 +487,10 @@ internal VirtualMachineExtensionImagesOperations(ComputeManagementClient client) var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { diff --git a/src/ResourceManagement/Compute/ComputeManagement/Generated/VirtualMachineExtensionImagesOperationsExtensions.cs b/src/ResourceManagement/Compute/ComputeManagement/Generated/VirtualMachineExtensionImagesOperationsExtensions.cs index 91d2ec97d3a2f..050b5a765485f 100644 --- a/src/ResourceManagement/Compute/ComputeManagement/Generated/VirtualMachineExtensionImagesOperationsExtensions.cs +++ b/src/ResourceManagement/Compute/ComputeManagement/Generated/VirtualMachineExtensionImagesOperationsExtensions.cs @@ -16,7 +16,7 @@ public static partial class VirtualMachineExtensionImagesOperationsExtensions /// Gets a virtual machine extension image. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// @@ -35,7 +35,7 @@ public static VirtualMachineExtensionImage Get(this IVirtualMachineExtensionImag /// Gets a virtual machine extension image. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// @@ -58,7 +58,7 @@ public static VirtualMachineExtensionImage Get(this IVirtualMachineExtensionImag /// Gets a list of virtual machine extension image versions. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// @@ -82,7 +82,7 @@ public static VirtualMachineExtensionImage Get(this IVirtualMachineExtensionImag /// Gets a list of virtual machine extension image versions. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// @@ -110,7 +110,7 @@ public static VirtualMachineExtensionImage Get(this IVirtualMachineExtensionImag /// Gets a list of virtual machine extension image types. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// @@ -125,7 +125,7 @@ public static IList ListTypes(this IVirtualMachineE /// Gets a list of virtual machine extension image types. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// diff --git a/src/ResourceManagement/Compute/ComputeManagement/Generated/VirtualMachineExtensionsOperations.cs b/src/ResourceManagement/Compute/ComputeManagement/Generated/VirtualMachineExtensionsOperations.cs index cfe39b3c83487..42b62a8c878f2 100644 --- a/src/ResourceManagement/Compute/ComputeManagement/Generated/VirtualMachineExtensionsOperations.cs +++ b/src/ResourceManagement/Compute/ComputeManagement/Generated/VirtualMachineExtensionsOperations.cs @@ -11,8 +11,9 @@ namespace Microsoft.Azure.Management.Compute using System.Threading.Tasks; using Microsoft.Rest; using Newtonsoft.Json; - using Microsoft.Azure.OData; + using System.Linq; using System.Linq.Expressions; + using Microsoft.Azure.OData; using Microsoft.Azure; using Models; @@ -51,10 +52,10 @@ internal VirtualMachineExtensionsOperations(ComputeManagementClient client) /// Parameters supplied to the Create Virtual Machine Extension operation. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string vmName, string vmExtensionName, VirtualMachineExtension extensionParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { @@ -218,6 +219,10 @@ internal VirtualMachineExtensionsOperations(ComputeManagementClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "Created")) { @@ -250,10 +255,10 @@ internal VirtualMachineExtensionsOperations(ComputeManagementClient client) /// The name of the virtual machine extension. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string vmName, string vmExtensionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { @@ -391,6 +396,10 @@ internal VirtualMachineExtensionsOperations(ComputeManagementClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } if (shouldTrace) { ServiceClientTracing.Exit(invocationId, result); @@ -541,6 +550,10 @@ internal VirtualMachineExtensionsOperations(ComputeManagementClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { diff --git a/src/ResourceManagement/Compute/ComputeManagement/Generated/VirtualMachineExtensionsOperationsExtensions.cs b/src/ResourceManagement/Compute/ComputeManagement/Generated/VirtualMachineExtensionsOperationsExtensions.cs index a795a97aa57cc..6b83444159e4c 100644 --- a/src/ResourceManagement/Compute/ComputeManagement/Generated/VirtualMachineExtensionsOperationsExtensions.cs +++ b/src/ResourceManagement/Compute/ComputeManagement/Generated/VirtualMachineExtensionsOperationsExtensions.cs @@ -16,7 +16,7 @@ public static partial class VirtualMachineExtensionsOperationsExtensions /// The operation to create or update the extension. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -40,7 +40,7 @@ public static VirtualMachineExtension CreateOrUpdate(this IVirtualMachineExtensi /// The operation to create or update the extension. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -68,7 +68,7 @@ public static VirtualMachineExtension CreateOrUpdate(this IVirtualMachineExtensi /// The operation to create or update the extension. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -92,7 +92,7 @@ public static VirtualMachineExtension BeginCreateOrUpdate(this IVirtualMachineEx /// The operation to create or update the extension. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -120,7 +120,7 @@ public static VirtualMachineExtension BeginCreateOrUpdate(this IVirtualMachineEx /// The operation to delete the extension. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -140,7 +140,7 @@ public static void Delete(this IVirtualMachineExtensionsOperations operations, s /// The operation to delete the extension. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -163,7 +163,7 @@ public static void Delete(this IVirtualMachineExtensionsOperations operations, s /// The operation to delete the extension. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -183,7 +183,7 @@ public static void BeginDelete(this IVirtualMachineExtensionsOperations operatio /// The operation to delete the extension. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -206,7 +206,7 @@ public static void BeginDelete(this IVirtualMachineExtensionsOperations operatio /// The operation to get the extension. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -229,7 +229,7 @@ public static void BeginDelete(this IVirtualMachineExtensionsOperations operatio /// The operation to get the extension. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. diff --git a/src/ResourceManagement/Compute/ComputeManagement/Generated/VirtualMachineImagesOperations.cs b/src/ResourceManagement/Compute/ComputeManagement/Generated/VirtualMachineImagesOperations.cs index d64ed2e749fbb..29fa218473606 100644 --- a/src/ResourceManagement/Compute/ComputeManagement/Generated/VirtualMachineImagesOperations.cs +++ b/src/ResourceManagement/Compute/ComputeManagement/Generated/VirtualMachineImagesOperations.cs @@ -11,8 +11,9 @@ namespace Microsoft.Azure.Management.Compute using System.Threading.Tasks; using Microsoft.Rest; using Newtonsoft.Json; - using Microsoft.Azure.OData; + using System.Linq; using System.Linq.Expressions; + using Microsoft.Azure.OData; using Microsoft.Azure; using Models; @@ -182,6 +183,10 @@ internal VirtualMachineImagesOperations(ComputeManagementClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { @@ -319,6 +324,10 @@ internal VirtualMachineImagesOperations(ComputeManagementClient client) var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { @@ -448,6 +457,10 @@ internal VirtualMachineImagesOperations(ComputeManagementClient client) var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { @@ -593,6 +606,10 @@ internal VirtualMachineImagesOperations(ComputeManagementClient client) var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { @@ -768,6 +785,10 @@ internal VirtualMachineImagesOperations(ComputeManagementClient client) var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { diff --git a/src/ResourceManagement/Compute/ComputeManagement/Generated/VirtualMachineImagesOperationsExtensions.cs b/src/ResourceManagement/Compute/ComputeManagement/Generated/VirtualMachineImagesOperationsExtensions.cs index d44d6a98f5bab..b78fb8bf231c7 100644 --- a/src/ResourceManagement/Compute/ComputeManagement/Generated/VirtualMachineImagesOperationsExtensions.cs +++ b/src/ResourceManagement/Compute/ComputeManagement/Generated/VirtualMachineImagesOperationsExtensions.cs @@ -16,7 +16,7 @@ public static partial class VirtualMachineImagesOperationsExtensions /// Gets a virtual machine image. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// @@ -37,7 +37,7 @@ public static VirtualMachineImage Get(this IVirtualMachineImagesOperations opera /// Gets a virtual machine image. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// @@ -62,7 +62,7 @@ public static VirtualMachineImage Get(this IVirtualMachineImagesOperations opera /// Gets a list of virtual machine image offers. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// @@ -77,7 +77,7 @@ public static IList ListOffers(this IVirtualMachine /// Gets a list of virtual machine image offers. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// @@ -96,7 +96,7 @@ public static IList ListOffers(this IVirtualMachine /// Gets a list of virtual machine image publishers. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// @@ -109,7 +109,7 @@ public static IList ListPublishers(this IVirtualMac /// Gets a list of virtual machine image publishers. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// @@ -126,7 +126,7 @@ public static IList ListPublishers(this IVirtualMac /// Gets a list of virtual machine image skus. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// @@ -143,7 +143,7 @@ public static IList ListSkus(this IVirtualMachineIm /// Gets a list of virtual machine image skus. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// @@ -164,7 +164,7 @@ public static IList ListSkus(this IVirtualMachineIm /// Gets a list of virtual machine images. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// @@ -190,7 +190,7 @@ public static IList ListSkus(this IVirtualMachineIm /// Gets a list of virtual machine images. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// diff --git a/src/ResourceManagement/Compute/ComputeManagement/Generated/VirtualMachineSizesOperations.cs b/src/ResourceManagement/Compute/ComputeManagement/Generated/VirtualMachineSizesOperations.cs index 05b13e1c00e21..e4c2b58d55d5e 100644 --- a/src/ResourceManagement/Compute/ComputeManagement/Generated/VirtualMachineSizesOperations.cs +++ b/src/ResourceManagement/Compute/ComputeManagement/Generated/VirtualMachineSizesOperations.cs @@ -11,8 +11,9 @@ namespace Microsoft.Azure.Management.Compute using System.Threading.Tasks; using Microsoft.Rest; using Newtonsoft.Json; - using Microsoft.Azure.OData; + using System.Linq; using System.Linq.Expressions; + using Microsoft.Azure.OData; using Microsoft.Azure; using Models; @@ -151,6 +152,10 @@ internal VirtualMachineSizesOperations(ComputeManagementClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { diff --git a/src/ResourceManagement/Compute/ComputeManagement/Generated/VirtualMachineSizesOperationsExtensions.cs b/src/ResourceManagement/Compute/ComputeManagement/Generated/VirtualMachineSizesOperationsExtensions.cs index 89ec7fef353e0..5555959be4c2e 100644 --- a/src/ResourceManagement/Compute/ComputeManagement/Generated/VirtualMachineSizesOperationsExtensions.cs +++ b/src/ResourceManagement/Compute/ComputeManagement/Generated/VirtualMachineSizesOperationsExtensions.cs @@ -16,7 +16,7 @@ public static partial class VirtualMachineSizesOperationsExtensions /// Lists virtual-machine-sizes available in a location for a subscription. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The location upon which virtual-machine-sizes is queried. @@ -30,7 +30,7 @@ public static VirtualMachineSizeListResult List(this IVirtualMachineSizesOperati /// Lists virtual-machine-sizes available in a location for a subscription. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The location upon which virtual-machine-sizes is queried. diff --git a/src/ResourceManagement/Compute/ComputeManagement/Generated/VirtualMachinesOperations.cs b/src/ResourceManagement/Compute/ComputeManagement/Generated/VirtualMachinesOperations.cs index 887bb61cd4be8..bf2d830b9915b 100644 --- a/src/ResourceManagement/Compute/ComputeManagement/Generated/VirtualMachinesOperations.cs +++ b/src/ResourceManagement/Compute/ComputeManagement/Generated/VirtualMachinesOperations.cs @@ -11,8 +11,9 @@ namespace Microsoft.Azure.Management.Compute using System.Threading.Tasks; using Microsoft.Rest; using Newtonsoft.Json; - using Microsoft.Azure.OData; + using System.Linq; using System.Linq.Expressions; + using Microsoft.Azure.OData; using Microsoft.Azure; using Models; @@ -48,10 +49,10 @@ internal VirtualMachinesOperations(ComputeManagementClient client) /// Parameters supplied to the Capture Virtual Machine operation. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// public async Task> CaptureWithHttpMessagesAsync(string resourceGroupName, string vmName, VirtualMachineCaptureParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { @@ -200,6 +201,10 @@ internal VirtualMachinesOperations(ComputeManagementClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { @@ -226,10 +231,10 @@ internal VirtualMachinesOperations(ComputeManagementClient client) /// Parameters supplied to the Create Virtual Machine operation. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string vmName, VirtualMachine parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { @@ -383,6 +388,10 @@ internal VirtualMachinesOperations(ComputeManagementClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "Created")) { @@ -412,10 +421,10 @@ internal VirtualMachinesOperations(ComputeManagementClient client) /// The name of the virtual machine. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string vmName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { @@ -544,6 +553,10 @@ internal VirtualMachinesOperations(ComputeManagementClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } if (shouldTrace) { ServiceClientTracing.Exit(invocationId, result); @@ -685,6 +698,10 @@ internal VirtualMachinesOperations(ComputeManagementClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { @@ -709,10 +726,10 @@ internal VirtualMachinesOperations(ComputeManagementClient client) /// The name of the virtual machine. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// public async Task DeallocateWithHttpMessagesAsync(string resourceGroupName, string vmName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { @@ -842,6 +859,10 @@ internal VirtualMachinesOperations(ComputeManagementClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } if (shouldTrace) { ServiceClientTracing.Exit(invocationId, result); @@ -968,6 +989,10 @@ internal VirtualMachinesOperations(ComputeManagementClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } if (shouldTrace) { ServiceClientTracing.Exit(invocationId, result); @@ -987,7 +1012,7 @@ internal VirtualMachinesOperations(ComputeManagementClient client) /// /// Cancellation token. /// - public async Task> ListWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -1089,14 +1114,18 @@ internal VirtualMachinesOperations(ComputeManagementClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { @@ -1116,7 +1145,7 @@ internal VirtualMachinesOperations(ComputeManagementClient client) /// /// Cancellation token. /// - public async Task> ListAllWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListAllWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (this.Client.ApiVersion == null) { @@ -1212,14 +1241,18 @@ internal VirtualMachinesOperations(ComputeManagementClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { @@ -1354,6 +1387,10 @@ internal VirtualMachinesOperations(ComputeManagementClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { @@ -1377,10 +1414,10 @@ internal VirtualMachinesOperations(ComputeManagementClient client) /// The name of the virtual machine. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// public async Task PowerOffWithHttpMessagesAsync(string resourceGroupName, string vmName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { @@ -1509,6 +1546,10 @@ internal VirtualMachinesOperations(ComputeManagementClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } if (shouldTrace) { ServiceClientTracing.Exit(invocationId, result); @@ -1526,10 +1567,10 @@ internal VirtualMachinesOperations(ComputeManagementClient client) /// The name of the virtual machine. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// public async Task RestartWithHttpMessagesAsync(string resourceGroupName, string vmName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { @@ -1658,6 +1699,10 @@ internal VirtualMachinesOperations(ComputeManagementClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } if (shouldTrace) { ServiceClientTracing.Exit(invocationId, result); @@ -1675,10 +1720,10 @@ internal VirtualMachinesOperations(ComputeManagementClient client) /// The name of the virtual machine. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// public async Task StartWithHttpMessagesAsync(string resourceGroupName, string vmName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { @@ -1807,6 +1852,10 @@ internal VirtualMachinesOperations(ComputeManagementClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } if (shouldTrace) { ServiceClientTracing.Exit(invocationId, result); @@ -1817,7 +1866,7 @@ internal VirtualMachinesOperations(ComputeManagementClient client) /// /// The operation to list virtual machines under a resource group. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// @@ -1826,11 +1875,11 @@ internal VirtualMachinesOperations(ComputeManagementClient client) /// /// Cancellation token. /// - public async Task> ListNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (nextLink == null) + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextLink"); + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing bool shouldTrace = ServiceClientTracing.IsEnabled; @@ -1839,13 +1888,13 @@ internal VirtualMachinesOperations(ComputeManagementClient client) { invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("nextLink", nextLink); + tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(invocationId, this, "ListNext", tracingParameters); } // Construct URL string url = "{nextLink}"; - url = url.Replace("{nextLink}", nextLink); + url = url.Replace("{nextLink}", nextPageLink); List queryParameters = new List(); if (queryParameters.Count > 0) { @@ -1914,14 +1963,18 @@ internal VirtualMachinesOperations(ComputeManagementClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { @@ -1935,7 +1988,7 @@ internal VirtualMachinesOperations(ComputeManagementClient client) /// property in the response to get the next page of Virtual Machines. Do /// this till nextLink is not null to fetch all the Virtual Machines. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// @@ -1944,11 +1997,11 @@ internal VirtualMachinesOperations(ComputeManagementClient client) /// /// Cancellation token. /// - public async Task> ListAllNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListAllNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (nextLink == null) + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextLink"); + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing bool shouldTrace = ServiceClientTracing.IsEnabled; @@ -1957,13 +2010,13 @@ internal VirtualMachinesOperations(ComputeManagementClient client) { invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("nextLink", nextLink); + tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(invocationId, this, "ListAllNext", tracingParameters); } // Construct URL string url = "{nextLink}"; - url = url.Replace("{nextLink}", nextLink); + url = url.Replace("{nextLink}", nextPageLink); List queryParameters = new List(); if (queryParameters.Count > 0) { @@ -2032,14 +2085,18 @@ internal VirtualMachinesOperations(ComputeManagementClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { diff --git a/src/ResourceManagement/Compute/ComputeManagement/Generated/VirtualMachinesOperationsExtensions.cs b/src/ResourceManagement/Compute/ComputeManagement/Generated/VirtualMachinesOperationsExtensions.cs index 57a4f322b6251..ae80e89cf87e0 100644 --- a/src/ResourceManagement/Compute/ComputeManagement/Generated/VirtualMachinesOperationsExtensions.cs +++ b/src/ResourceManagement/Compute/ComputeManagement/Generated/VirtualMachinesOperationsExtensions.cs @@ -17,7 +17,7 @@ public static partial class VirtualMachinesOperationsExtensions /// template that can be used to create similar VMs. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -38,7 +38,7 @@ public static ComputeLongRunningOperationResult Capture(this IVirtualMachinesOpe /// template that can be used to create similar VMs. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -63,7 +63,7 @@ public static ComputeLongRunningOperationResult Capture(this IVirtualMachinesOpe /// template that can be used to create similar VMs. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -84,7 +84,7 @@ public static ComputeLongRunningOperationResult BeginCapture(this IVirtualMachin /// template that can be used to create similar VMs. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -108,7 +108,7 @@ public static ComputeLongRunningOperationResult BeginCapture(this IVirtualMachin /// The operation to create or update a virtual machine. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -128,7 +128,7 @@ public static VirtualMachine CreateOrUpdate(this IVirtualMachinesOperations oper /// The operation to create or update a virtual machine. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -152,7 +152,7 @@ public static VirtualMachine CreateOrUpdate(this IVirtualMachinesOperations oper /// The operation to create or update a virtual machine. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -172,7 +172,7 @@ public static VirtualMachine BeginCreateOrUpdate(this IVirtualMachinesOperations /// The operation to create or update a virtual machine. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -196,7 +196,7 @@ public static VirtualMachine BeginCreateOrUpdate(this IVirtualMachinesOperations /// The operation to delete a virtual machine. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -213,7 +213,7 @@ public static void Delete(this IVirtualMachinesOperations operations, string res /// The operation to delete a virtual machine. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -233,7 +233,7 @@ public static void Delete(this IVirtualMachinesOperations operations, string res /// The operation to delete a virtual machine. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -250,7 +250,7 @@ public static void BeginDelete(this IVirtualMachinesOperations operations, strin /// The operation to delete a virtual machine. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -270,7 +270,7 @@ public static void BeginDelete(this IVirtualMachinesOperations operations, strin /// The operation to get a virtual machine. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -290,7 +290,7 @@ public static void BeginDelete(this IVirtualMachinesOperations operations, strin /// The operation to get a virtual machine. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -315,7 +315,7 @@ public static void BeginDelete(this IVirtualMachinesOperations operations, strin /// not billed for the compute resources that this Virtual Machine uses. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -333,7 +333,7 @@ public static void Deallocate(this IVirtualMachinesOperations operations, string /// not billed for the compute resources that this Virtual Machine uses. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -354,7 +354,7 @@ public static void Deallocate(this IVirtualMachinesOperations operations, string /// not billed for the compute resources that this Virtual Machine uses. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -372,7 +372,7 @@ public static void BeginDeallocate(this IVirtualMachinesOperations operations, s /// not billed for the compute resources that this Virtual Machine uses. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -392,7 +392,7 @@ public static void BeginDeallocate(this IVirtualMachinesOperations operations, s /// Sets the state of the VM as Generalized. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -409,7 +409,7 @@ public static void Generalize(this IVirtualMachinesOperations operations, string /// Sets the state of the VM as Generalized. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -429,12 +429,12 @@ public static void Generalize(this IVirtualMachinesOperations operations, string /// The operation to list virtual machines under a resource group. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. /// - public static VirtualMachineListResult List(this IVirtualMachinesOperations operations, string resourceGroupName) + public static Page List(this IVirtualMachinesOperations operations, string resourceGroupName) { return Task.Factory.StartNew(s => ((IVirtualMachinesOperations)s).ListAsync(resourceGroupName), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } @@ -443,7 +443,7 @@ public static VirtualMachineListResult List(this IVirtualMachinesOperations oper /// The operation to list virtual machines under a resource group. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -451,9 +451,9 @@ public static VirtualMachineListResult List(this IVirtualMachinesOperations oper /// /// Cancellation token. /// - public static async Task ListAsync( this IVirtualMachinesOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListAsync( this IVirtualMachinesOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false); return result.Body; } @@ -463,9 +463,9 @@ public static VirtualMachineListResult List(this IVirtualMachinesOperations oper /// this till nextLink is not null to fetch all the Virtual Machines. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - public static VirtualMachineListResult ListAll(this IVirtualMachinesOperations operations) + public static Page ListAll(this IVirtualMachinesOperations operations) { return Task.Factory.StartNew(s => ((IVirtualMachinesOperations)s).ListAllAsync(), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } @@ -476,14 +476,14 @@ public static VirtualMachineListResult ListAll(this IVirtualMachinesOperations o /// this till nextLink is not null to fetch all the Virtual Machines. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// Cancellation token. /// - public static async Task ListAllAsync( this IVirtualMachinesOperations operations, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListAllAsync( this IVirtualMachinesOperations operations, CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListAllWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListAllWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false); return result.Body; } @@ -491,7 +491,7 @@ public static VirtualMachineListResult ListAll(this IVirtualMachinesOperations o /// Lists virtual-machine-sizes available to be used for a virtual machine. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -508,7 +508,7 @@ public static VirtualMachineSizeListResult ListAvailableSizes(this IVirtualMachi /// Lists virtual-machine-sizes available to be used for a virtual machine. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -529,7 +529,7 @@ public static VirtualMachineSizeListResult ListAvailableSizes(this IVirtualMachi /// The operation to power off (stop) a virtual machine. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -546,7 +546,7 @@ public static void PowerOff(this IVirtualMachinesOperations operations, string r /// The operation to power off (stop) a virtual machine. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -566,7 +566,7 @@ public static void PowerOff(this IVirtualMachinesOperations operations, string r /// The operation to power off (stop) a virtual machine. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -583,7 +583,7 @@ public static void BeginPowerOff(this IVirtualMachinesOperations operations, str /// The operation to power off (stop) a virtual machine. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -603,7 +603,7 @@ public static void BeginPowerOff(this IVirtualMachinesOperations operations, str /// The operation to restart a virtual machine. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -620,7 +620,7 @@ public static void Restart(this IVirtualMachinesOperations operations, string re /// The operation to restart a virtual machine. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -640,7 +640,7 @@ public static void Restart(this IVirtualMachinesOperations operations, string re /// The operation to restart a virtual machine. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -657,7 +657,7 @@ public static void BeginRestart(this IVirtualMachinesOperations operations, stri /// The operation to restart a virtual machine. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -677,7 +677,7 @@ public static void BeginRestart(this IVirtualMachinesOperations operations, stri /// The operation to start a virtual machine. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -694,7 +694,7 @@ public static void Start(this IVirtualMachinesOperations operations, string reso /// The operation to start a virtual machine. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -714,7 +714,7 @@ public static void Start(this IVirtualMachinesOperations operations, string reso /// The operation to start a virtual machine. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -731,7 +731,7 @@ public static void BeginStart(this IVirtualMachinesOperations operations, string /// The operation to start a virtual machine. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -751,31 +751,31 @@ public static void BeginStart(this IVirtualMachinesOperations operations, string /// The operation to list virtual machines under a resource group. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// - public static VirtualMachineListResult ListNext(this IVirtualMachinesOperations operations, string nextLink) + public static Page ListNext(this IVirtualMachinesOperations operations, string nextPageLink) { - return Task.Factory.StartNew(s => ((IVirtualMachinesOperations)s).ListNextAsync(nextLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + return Task.Factory.StartNew(s => ((IVirtualMachinesOperations)s).ListNextAsync(nextPageLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } /// /// The operation to list virtual machines under a resource group. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// /// Cancellation token. /// - public static async Task ListNextAsync( this IVirtualMachinesOperations operations, string nextLink, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListNextAsync( this IVirtualMachinesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListNextWithHttpMessagesAsync(nextLink, null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false); return result.Body; } @@ -785,14 +785,14 @@ public static VirtualMachineListResult ListNext(this IVirtualMachinesOperations /// this till nextLink is not null to fetch all the Virtual Machines. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// - public static VirtualMachineListResult ListAllNext(this IVirtualMachinesOperations operations, string nextLink) + public static Page ListAllNext(this IVirtualMachinesOperations operations, string nextPageLink) { - return Task.Factory.StartNew(s => ((IVirtualMachinesOperations)s).ListAllNextAsync(nextLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + return Task.Factory.StartNew(s => ((IVirtualMachinesOperations)s).ListAllNextAsync(nextPageLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } /// @@ -801,17 +801,17 @@ public static VirtualMachineListResult ListAllNext(this IVirtualMachinesOperatio /// this till nextLink is not null to fetch all the Virtual Machines. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// /// Cancellation token. /// - public static async Task ListAllNextAsync( this IVirtualMachinesOperations operations, string nextLink, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListAllNextAsync( this IVirtualMachinesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListAllNextWithHttpMessagesAsync(nextLink, null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListAllNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false); return result.Body; } diff --git a/src/ResourceManagement/Network/Network.Tests/Network.Tests.csproj b/src/ResourceManagement/Network/Network.Tests/Network.Tests.csproj index 65fbe238501dd..ad0c26c67c0af 100644 --- a/src/ResourceManagement/Network/Network.Tests/Network.Tests.csproj +++ b/src/ResourceManagement/Network/Network.Tests/Network.Tests.csproj @@ -109,6 +109,18 @@ + + + + + $(LibraryNugetPackageFolder)\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll + + + $(LibraryNugetPackageFolder)\Microsoft.Rest.ClientRuntime.1.1.0\lib\net45\Microsoft.Rest.ClientRuntime.dll + + + $(LibraryNugetPackageFolder)\Microsoft.Rest.ClientRuntime.Azure.1.0.13\lib\net45\Microsoft.Rest.ClientRuntime.Azure.dll + ..\..\..\..\packages\Microsoft.Azure.Test.Framework.2.0.5658.29898-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll True diff --git a/src/ResourceManagement/Network/Network.Tests/Tests/ApplicationGatewayTests.cs b/src/ResourceManagement/Network/Network.Tests/Tests/ApplicationGatewayTests.cs index 526acdaaa59b8..467a086ba788e 100644 --- a/src/ResourceManagement/Network/Network.Tests/Tests/ApplicationGatewayTests.cs +++ b/src/ResourceManagement/Network/Network.Tests/Tests/ApplicationGatewayTests.cs @@ -1,19 +1,17 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; +using System.Linq; using System.Net; +using System.Security.Cryptography.X509Certificates; +using Microsoft.Azure; +using Microsoft.Azure.Management.Network; +using Microsoft.Azure.Management.Network.Models; using Microsoft.Azure.Management.Resources; using Microsoft.Azure.Management.Resources.Models; using Microsoft.Azure.Test; using Networks.Tests.Helpers; using ResourceGroups.Tests; using Xunit; -using Microsoft.Azure; -using System; -using Microsoft.Azure.Management.Network; -using System.Security.Cryptography.X509Certificates; -using Microsoft.Azure.Management.Network.Models; -using System.Net.Http; -using System.Net.Http.Headers; -using System.Text; namespace Networks.Tests { @@ -154,12 +152,12 @@ private ApplicationGateway CreateApplicationGateway() Name = httpListenerName, FrontendPort = new SubResource() { - Id = GetChildAppGwResourceId(networkResourceProviderClient.Credentials.SubscriptionId, + Id = GetChildAppGwResourceId(networkResourceProviderClient.SubscriptionId, resourceGroupName, appGwName, "frontendPorts", frontendPortName) }, FrontendIpConfiguration = new SubResource() { - Id = GetChildAppGwResourceId(networkResourceProviderClient.Credentials.SubscriptionId, + Id = GetChildAppGwResourceId(networkResourceProviderClient.SubscriptionId, resourceGroupName, appGwName, "frontendIPConfigurations", frontendIpConfigName) }, SslCertificate = null, @@ -174,17 +172,17 @@ private ApplicationGateway CreateApplicationGateway() RuleType = ApplicationGatewayRequestRoutingRuleType.Basic, HttpListener = new SubResource() { - Id = GetChildAppGwResourceId(networkResourceProviderClient.Credentials.SubscriptionId, + Id = GetChildAppGwResourceId(networkResourceProviderClient.SubscriptionId, resourceGroupName, appGwName, "httpListeners", httpListenerName) }, BackendAddressPool = new SubResource() { - Id = GetChildAppGwResourceId(networkResourceProviderClient.Credentials.SubscriptionId, + Id = GetChildAppGwResourceId(networkResourceProviderClient.SubscriptionId, resourceGroupName, appGwName, "backendAddressPools", backendAddressPoolName) }, BackendHttpSettings = new SubResource() { - Id = GetChildAppGwResourceId(networkResourceProviderClient.Credentials.SubscriptionId, + Id = GetChildAppGwResourceId(networkResourceProviderClient.SubscriptionId, resourceGroupName, appGwName, "backendHttpSettingsCollection", backendHttpSettingsName) } } @@ -286,17 +284,17 @@ private ApplicationGateway CreateApplicationGatewayWithSsl() Name = httpListenerName, FrontendPort = new SubResource() { - Id = GetChildAppGwResourceId(networkResourceProviderClient.Credentials.SubscriptionId, + Id = GetChildAppGwResourceId(networkResourceProviderClient.SubscriptionId, resourceGroupName, appGwName, "frontendPorts", frontendPortName) }, FrontendIpConfiguration = new SubResource() { - Id = GetChildAppGwResourceId(networkResourceProviderClient.Credentials.SubscriptionId, + Id = GetChildAppGwResourceId(networkResourceProviderClient.SubscriptionId, resourceGroupName, appGwName, "frontendIPConfigurations", frontendIpConfigName) }, SslCertificate = new SubResource() { - Id = GetChildAppGwResourceId(networkResourceProviderClient.Credentials.SubscriptionId, + Id = GetChildAppGwResourceId(networkResourceProviderClient.SubscriptionId, resourceGroupName, appGwName, "sslCertificates", sslCertName) }, Protocol = ApplicationGatewayProtocol.Http @@ -310,17 +308,17 @@ private ApplicationGateway CreateApplicationGatewayWithSsl() RuleType = ApplicationGatewayRequestRoutingRuleType.Basic, HttpListener = new SubResource() { - Id = GetChildAppGwResourceId(networkResourceProviderClient.Credentials.SubscriptionId, + Id = GetChildAppGwResourceId(networkResourceProviderClient.SubscriptionId, resourceGroupName, appGwName, "httpListeners", httpListenerName) }, BackendAddressPool = new SubResource() { - Id = GetChildAppGwResourceId(networkResourceProviderClient.Credentials.SubscriptionId, + Id = GetChildAppGwResourceId(networkResourceProviderClient.SubscriptionId, resourceGroupName, appGwName, "backendAddressPools", backendAddressPoolName) }, BackendHttpSettings = new SubResource() { - Id = GetChildAppGwResourceId(networkResourceProviderClient.Credentials.SubscriptionId, + Id = GetChildAppGwResourceId(networkResourceProviderClient.SubscriptionId, resourceGroupName, appGwName, "backendHttpSettingsCollection", backendHttpSettingsName) } } @@ -382,11 +380,11 @@ public void ApplicationGatewayApiTest() // List AppGw var listAppGw = networkResourceProviderClient.ApplicationGateways.List(resourceGroupName); - Assert.Equal(1, listAppGw.Value.Count); + Assert.Equal(1, listAppGw.Count()); // List all AppGw var listAllAppGw = networkResourceProviderClient.ApplicationGateways.ListAll(); - Assert.Equal(1, listAllAppGw.Value.Count); + Assert.Equal(1, listAllAppGw.Count()); //Add one more gateway // Put AppGw @@ -402,11 +400,11 @@ public void ApplicationGatewayApiTest() // List AppGw listAppGw = networkResourceProviderClient.ApplicationGateways.List(resourceGroupName); - Assert.Equal(2, listAppGw.Value.Count); + Assert.Equal(2, listAppGw.Count()); // List all AppGw listAllAppGw = networkResourceProviderClient.ApplicationGateways.ListAll(); - Assert.Equal(2, listAllAppGw.Value.Count); + Assert.Equal(2, listAllAppGw.Count()); //Start AppGw networkResourceProviderClient.ApplicationGateways.Start(resourceGroupName, appGwName); @@ -425,7 +423,7 @@ public void ApplicationGatewayApiTest() // Verify Delete listAppGw = networkResourceProviderClient.ApplicationGateways.List(resourceGroupName); - Assert.Null(listAppGw.Value); + Assert.Null(listAppGw); } } } diff --git a/src/ResourceManagement/Network/Network.Tests/Tests/GatewayOperationsTests.cs b/src/ResourceManagement/Network/Network.Tests/Tests/GatewayOperationsTests.cs index 2b5fa6cbe0196..a3d4255167e07 100644 --- a/src/ResourceManagement/Network/Network.Tests/Tests/GatewayOperationsTests.cs +++ b/src/ResourceManagement/Network/Network.Tests/Tests/GatewayOperationsTests.cs @@ -1,19 +1,16 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; +using System.Linq; using System.Net; +using Microsoft.Azure; +using Microsoft.Azure.Management.Network; +using Microsoft.Azure.Management.Network.Models; using Microsoft.Azure.Management.Resources; using Microsoft.Azure.Management.Resources.Models; using Microsoft.Azure.Test; using Networks.Tests.Helpers; using ResourceGroups.Tests; using Xunit; -using Microsoft.Azure; -using System; -using Microsoft.Azure.Management.Network; -using System.Security.Cryptography.X509Certificates; -using Microsoft.Azure.Management.Network.Models; -using System.Net.Http; -using System.Net.Http.Headers; -using System.Text; namespace Networks.Tests { @@ -118,16 +115,16 @@ public void VirtualNetworkGatewayOperationsApisTest() // 4. ListVitualNetworkGateways API var listVirtualNetworkGatewayResponse = networkResourceProviderClient.VirtualNetworkGateways.List(resourceGroupName); - Console.WriteLine("ListVirtualNetworkGateways count ={0} ", listVirtualNetworkGatewayResponse.Value.Count); - Assert.Equal(1, listVirtualNetworkGatewayResponse.Value.Count); + Console.WriteLine("ListVirtualNetworkGateways count ={0} ", listVirtualNetworkGatewayResponse.Count()); + Assert.Equal(1, listVirtualNetworkGatewayResponse.Count()); // 5A. DeleteVirtualNetworkGateway API networkResourceProviderClient.VirtualNetworkGateways.Delete(resourceGroupName, virtualNetworkGatewayName); // 5B. ListVitualNetworkGateways API after deleting VirtualNetworkGateway listVirtualNetworkGatewayResponse = networkResourceProviderClient.VirtualNetworkGateways.List(resourceGroupName); - Console.WriteLine("ListVirtualNetworkGateways count ={0} ", listVirtualNetworkGatewayResponse.Value.Count); - Assert.Equal(0, listVirtualNetworkGatewayResponse.Value.Count); + Console.WriteLine("ListVirtualNetworkGateways count ={0} ", listVirtualNetworkGatewayResponse.Count()); + Assert.Equal(0, listVirtualNetworkGatewayResponse.Count()); } } @@ -212,16 +209,16 @@ public void LocalNettworkGatewayOperationsApisTest() // 4. ListLocalNetworkGateways API var listLocalNetworkGatewayResponse = networkResourceProviderClient.LocalNetworkGateways.List(resourceGroupName); - Console.WriteLine("ListLocalNetworkGateways count ={0} ", listLocalNetworkGatewayResponse.Value.Count); - Assert.Equal(1, listLocalNetworkGatewayResponse.Value.Count); + Console.WriteLine("ListLocalNetworkGateways count ={0} ", listLocalNetworkGatewayResponse.Count()); + Assert.Equal(1, listLocalNetworkGatewayResponse.Count()); // 5A. DeleteLocalNetworkGateway API networkResourceProviderClient.LocalNetworkGateways.Delete(resourceGroupName, localNetworkGatewayName); // 5B. ListLocalNetworkGateways API after DeleteLocalNetworkGateway API was called listLocalNetworkGatewayResponse = networkResourceProviderClient.LocalNetworkGateways.List(resourceGroupName); - Console.WriteLine("ListLocalNetworkGateways count ={0} ", listLocalNetworkGatewayResponse.Value.Count); - Assert.Equal(0, listLocalNetworkGatewayResponse.Value.Count); + Console.WriteLine("ListLocalNetworkGateways count ={0} ", listLocalNetworkGatewayResponse.Count()); + Assert.Equal(0, listLocalNetworkGatewayResponse.Count()); } } @@ -377,16 +374,16 @@ public void VirtualNetworkGatewayConnectionOperationsApisTest() // 4. ListVitualNetworkGatewayConnections API var listVirtualNetworkGatewayConectionResponse = networkResourceProviderClient.VirtualNetworkGatewayConnections.List(resourceGroupName); - Console.WriteLine("ListVirtualNetworkGatewayConnections count ={0} ", listVirtualNetworkGatewayConectionResponse.Value.Count); - Assert.Equal(1, listVirtualNetworkGatewayConectionResponse.Value.Count); + Console.WriteLine("ListVirtualNetworkGatewayConnections count ={0} ", listVirtualNetworkGatewayConectionResponse.Count()); + Assert.Equal(1, listVirtualNetworkGatewayConectionResponse.Count()); // 5A. DeleteVirtualNetworkGatewayConnection API networkResourceProviderClient.VirtualNetworkGatewayConnections.Delete(resourceGroupName, VirtualNetworkGatewayConnectionName); // 5B. ListVitualNetworkGatewayConnections API after DeleteVirtualNetworkGatewayConnection API called listVirtualNetworkGatewayConectionResponse = networkResourceProviderClient.VirtualNetworkGatewayConnections.List(resourceGroupName); - Console.WriteLine("ListVirtualNetworkGatewayConnections count ={0} ", listVirtualNetworkGatewayConectionResponse.Value.Count); - Assert.Equal(0, listVirtualNetworkGatewayConectionResponse.Value.Count); + Console.WriteLine("ListVirtualNetworkGatewayConnections count ={0} ", listVirtualNetworkGatewayConectionResponse.Count()); + Assert.Equal(0, listVirtualNetworkGatewayConectionResponse.Count()); } } diff --git a/src/ResourceManagement/Network/Network.Tests/Tests/LoadBalancerTests.cs b/src/ResourceManagement/Network/Network.Tests/Tests/LoadBalancerTests.cs index 331c15a188d93..483874375155d 100644 --- a/src/ResourceManagement/Network/Network.Tests/Tests/LoadBalancerTests.cs +++ b/src/ResourceManagement/Network/Network.Tests/Tests/LoadBalancerTests.cs @@ -86,7 +86,7 @@ public void LoadBalancerApiTest() Name = loadBalancingRuleName, FrontendIPConfiguration = new SubResource() { - Id = GetChildLbResourceId(networkResourceProviderClient.Credentials.SubscriptionId, + Id = GetChildLbResourceId(networkResourceProviderClient.SubscriptionId, resourceGroupName, lbName, "FrontendIPConfigurations", frontendIpConfigName) }, Protocol = TransportProtocol.Tcp, @@ -96,12 +96,12 @@ public void LoadBalancerApiTest() IdleTimeoutInMinutes = 15, BackendAddressPool = new SubResource() { - Id = GetChildLbResourceId(networkResourceProviderClient.Credentials.SubscriptionId, + Id = GetChildLbResourceId(networkResourceProviderClient.SubscriptionId, resourceGroupName, lbName, "backendAddressPools", backEndAddressPoolName) }, Probe = new SubResource() { - Id = GetChildLbResourceId(networkResourceProviderClient.Credentials.SubscriptionId, + Id = GetChildLbResourceId(networkResourceProviderClient.SubscriptionId, resourceGroupName, lbName, "probes", probeName) } } @@ -125,7 +125,7 @@ public void LoadBalancerApiTest() Name = inboundNatRule1Name, FrontendIPConfiguration = new SubResource() { - Id = GetChildLbResourceId(networkResourceProviderClient.Credentials.SubscriptionId, + Id = GetChildLbResourceId(networkResourceProviderClient.SubscriptionId, resourceGroupName, lbName, "FrontendIPConfigurations", frontendIpConfigName) }, Protocol = TransportProtocol.Tcp, @@ -139,7 +139,7 @@ public void LoadBalancerApiTest() Name = inboundNatRule2Name, FrontendIPConfiguration = new SubResource() { - Id = GetChildLbResourceId(networkResourceProviderClient.Credentials.SubscriptionId, + Id = GetChildLbResourceId(networkResourceProviderClient.SubscriptionId, resourceGroupName, lbName, "FrontendIPConfigurations", frontendIpConfigName) }, Protocol = TransportProtocol.Tcp, @@ -184,22 +184,22 @@ public void LoadBalancerApiTest() // Verify List LoadBalancer var listLoadBalancer = networkResourceProviderClient.LoadBalancers.List(resourceGroupName); - Assert.Equal(1, listLoadBalancer.Value.Count); - Assert.Equal(lbName, listLoadBalancer.Value[0].Name); - Assert.Equal(getLoadBalancer.Etag, listLoadBalancer.Value[0].Etag); + Assert.Equal(1, listLoadBalancer.Count()); + Assert.Equal(lbName, listLoadBalancer.First().Name); + Assert.Equal(getLoadBalancer.Etag, listLoadBalancer.First().Etag); // Verify List LoadBalancer subscription var listLoadBalancerSubscription = networkResourceProviderClient.LoadBalancers.ListAll(); - Assert.Equal(1, listLoadBalancerSubscription.Value.Count); - Assert.Equal(lbName, listLoadBalancerSubscription.Value[0].Name); - Assert.Equal(listLoadBalancerSubscription.Value[0].Etag, listLoadBalancer.Value[0].Etag); + Assert.Equal(1, listLoadBalancerSubscription.Count()); + Assert.Equal(lbName, listLoadBalancerSubscription.First().Name); + Assert.Equal(listLoadBalancerSubscription.First().Etag, listLoadBalancer.First().Etag); // Delete LoadBalancer networkResourceProviderClient.LoadBalancers.Delete(resourceGroupName, lbName); // Verify Delete listLoadBalancer = networkResourceProviderClient.LoadBalancers.List(resourceGroupName); - Assert.Equal(0, listLoadBalancer.Value.Count); + Assert.Equal(0, listLoadBalancer.Count()); // Delete all PublicIpAddresses networkResourceProviderClient.PublicIpAddresses.Delete(resourceGroupName, lbPublicIpName); @@ -269,7 +269,7 @@ public void LoadBalancerApiTestWithDynamicIp() Name = loadBalancingRuleName, FrontendIPConfiguration = new SubResource() { - Id = GetChildLbResourceId(networkResourceProviderClient.Credentials.SubscriptionId, + Id = GetChildLbResourceId(networkResourceProviderClient.SubscriptionId, resourceGroupName, lbName, "FrontendIPConfigurations", frontendIpConfigName) }, Protocol = TransportProtocol.Tcp, @@ -279,12 +279,12 @@ public void LoadBalancerApiTestWithDynamicIp() IdleTimeoutInMinutes = 15, BackendAddressPool = new SubResource() { - Id = GetChildLbResourceId(networkResourceProviderClient.Credentials.SubscriptionId, + Id = GetChildLbResourceId(networkResourceProviderClient.SubscriptionId, resourceGroupName, lbName, "backendAddressPools", backEndAddressPoolName) }, Probe = new SubResource() { - Id = GetChildLbResourceId(networkResourceProviderClient.Credentials.SubscriptionId, + Id = GetChildLbResourceId(networkResourceProviderClient.SubscriptionId, resourceGroupName, lbName, "probes", probeName) } } @@ -308,7 +308,7 @@ public void LoadBalancerApiTestWithDynamicIp() Name = inboundNatRule1Name, FrontendIPConfiguration = new SubResource() { - Id = GetChildLbResourceId(networkResourceProviderClient.Credentials.SubscriptionId, + Id = GetChildLbResourceId(networkResourceProviderClient.SubscriptionId, resourceGroupName, lbName, "FrontendIPConfigurations", frontendIpConfigName) }, Protocol = TransportProtocol.Tcp, @@ -322,7 +322,7 @@ public void LoadBalancerApiTestWithDynamicIp() Name = inboundNatRule2Name, FrontendIPConfiguration = new SubResource() { - Id = GetChildLbResourceId(networkResourceProviderClient.Credentials.SubscriptionId, + Id = GetChildLbResourceId(networkResourceProviderClient.SubscriptionId, resourceGroupName, lbName, "FrontendIPConfigurations", frontendIpConfigName) }, Protocol = TransportProtocol.Tcp, @@ -365,22 +365,22 @@ public void LoadBalancerApiTestWithDynamicIp() // Verify List LoadBalancer var listLoadBalancer = networkResourceProviderClient.LoadBalancers.List(resourceGroupName); - Assert.Equal(1, listLoadBalancer.Value.Count); - Assert.Equal(lbName, listLoadBalancer.Value[0].Name); - Assert.Equal(getLoadBalancer.Etag, listLoadBalancer.Value[0].Etag); + Assert.Equal(1, listLoadBalancer.Count()); + Assert.Equal(lbName, listLoadBalancer.First().Name); + Assert.Equal(getLoadBalancer.Etag, listLoadBalancer.First().Etag); // Verify List LoadBalancer subscription var listLoadBalancerSubscription = networkResourceProviderClient.LoadBalancers.ListAll(); - Assert.Equal(1, listLoadBalancerSubscription.Value.Count); - Assert.Equal(lbName, listLoadBalancerSubscription.Value[0].Name); - Assert.Equal(listLoadBalancerSubscription.Value[0].Etag, listLoadBalancer.Value[0].Etag); + Assert.Equal(1, listLoadBalancerSubscription.Count()); + Assert.Equal(lbName, listLoadBalancerSubscription.First().Name); + Assert.Equal(listLoadBalancerSubscription.First().Etag, listLoadBalancer.First().Etag); // Delete LoadBalancer networkResourceProviderClient.LoadBalancers.Delete(resourceGroupName, lbName); // Verify Delete listLoadBalancer = networkResourceProviderClient.LoadBalancers.List(resourceGroupName); - Assert.Equal(0, listLoadBalancer.Value.Count); + Assert.Equal(0, listLoadBalancer.Count()); // Delete VirtualNetwork networkResourceProviderClient.VirtualNetworks.Delete(resourceGroupName, vnetName); @@ -451,7 +451,7 @@ public void LoadBalancerApiTestWithStaticIp() Name = loadBalancingRuleName, FrontendIPConfiguration = new SubResource() { - Id = GetChildLbResourceId(networkResourceProviderClient.Credentials.SubscriptionId, + Id = GetChildLbResourceId(networkResourceProviderClient.SubscriptionId, resourceGroupName, lbName, "FrontendIPConfigurations", frontendIpConfigName) }, Protocol = TransportProtocol.Tcp, @@ -460,12 +460,12 @@ public void LoadBalancerApiTestWithStaticIp() EnableFloatingIP = false, BackendAddressPool = new SubResource() { - Id = GetChildLbResourceId(networkResourceProviderClient.Credentials.SubscriptionId, + Id = GetChildLbResourceId(networkResourceProviderClient.SubscriptionId, resourceGroupName, lbName, "backendAddressPools", backEndAddressPoolName) }, Probe = new SubResource() { - Id = GetChildLbResourceId(networkResourceProviderClient.Credentials.SubscriptionId, + Id = GetChildLbResourceId(networkResourceProviderClient.SubscriptionId, resourceGroupName, lbName, "probes", probeName) } } @@ -489,7 +489,7 @@ public void LoadBalancerApiTestWithStaticIp() Name = inboundNatRule1Name, FrontendIPConfiguration = new SubResource() { - Id = GetChildLbResourceId(networkResourceProviderClient.Credentials.SubscriptionId, + Id = GetChildLbResourceId(networkResourceProviderClient.SubscriptionId, resourceGroupName, lbName, "FrontendIPConfigurations", frontendIpConfigName) }, Protocol = TransportProtocol.Tcp, @@ -502,7 +502,7 @@ public void LoadBalancerApiTestWithStaticIp() Name = inboundNatRule2Name, FrontendIPConfiguration = new SubResource() { - Id = GetChildLbResourceId(networkResourceProviderClient.Credentials.SubscriptionId, + Id = GetChildLbResourceId(networkResourceProviderClient.SubscriptionId, resourceGroupName, lbName, "FrontendIPConfigurations", frontendIpConfigName) }, Protocol = TransportProtocol.Tcp, @@ -548,22 +548,22 @@ public void LoadBalancerApiTestWithStaticIp() // Verify List LoadBalancer var listLoadBalancer = networkResourceProviderClient.LoadBalancers.List(resourceGroupName); - Assert.Equal(1, listLoadBalancer.Value.Count); - Assert.Equal(lbName, listLoadBalancer.Value[0].Name); - Assert.Equal(getLoadBalancer.Etag, listLoadBalancer.Value[0].Etag); + Assert.Equal(1, listLoadBalancer.Count()); + Assert.Equal(lbName, listLoadBalancer.First().Name); + Assert.Equal(getLoadBalancer.Etag, listLoadBalancer.First().Etag); // Verify List LoadBalancer subscription var listLoadBalancerSubscription = networkResourceProviderClient.LoadBalancers.ListAll(); - Assert.Equal(1, listLoadBalancerSubscription.Value.Count); - Assert.Equal(lbName, listLoadBalancerSubscription.Value[0].Name); - Assert.Equal(listLoadBalancerSubscription.Value[0].Etag, listLoadBalancer.Value[0].Etag); + Assert.Equal(1, listLoadBalancerSubscription.Count()); + Assert.Equal(lbName, listLoadBalancerSubscription.First().Name); + Assert.Equal(listLoadBalancerSubscription.First().Etag, listLoadBalancer.First().Etag); // Delete LoadBalancer networkResourceProviderClient.LoadBalancers.Delete(resourceGroupName, lbName); // Verify Delete listLoadBalancer = networkResourceProviderClient.LoadBalancers.List(resourceGroupName); - Assert.Equal(0, listLoadBalancer.Value.Count); + Assert.Equal(0, listLoadBalancer.Count()); // Delete VirtualNetwork networkResourceProviderClient.VirtualNetworks.Delete(resourceGroupName, vnetName); @@ -634,7 +634,7 @@ public void LoadBalancerApiTestWithDistributionPolicy() Name = loadBalancingRuleName, FrontendIPConfiguration = new SubResource() { - Id = GetChildLbResourceId(networkResourceProviderClient.Credentials.SubscriptionId, + Id = GetChildLbResourceId(networkResourceProviderClient.SubscriptionId, resourceGroupName, lbName, "FrontendIPConfigurations", frontendIpConfigName) }, Protocol = TransportProtocol.Tcp, @@ -643,12 +643,12 @@ public void LoadBalancerApiTestWithDistributionPolicy() EnableFloatingIP = false, BackendAddressPool = new SubResource() { - Id = GetChildLbResourceId(networkResourceProviderClient.Credentials.SubscriptionId, + Id = GetChildLbResourceId(networkResourceProviderClient.SubscriptionId, resourceGroupName, lbName, "backendAddressPools", backEndAddressPoolName) }, Probe = new SubResource() { - Id = GetChildLbResourceId(networkResourceProviderClient.Credentials.SubscriptionId, + Id = GetChildLbResourceId(networkResourceProviderClient.SubscriptionId, resourceGroupName, lbName, "probes", probeName) } } @@ -673,7 +673,7 @@ public void LoadBalancerApiTestWithDistributionPolicy() Name = inboundNatRule1Name, FrontendIPConfiguration = new SubResource() { - Id = GetChildLbResourceId(networkResourceProviderClient.Credentials.SubscriptionId, + Id = GetChildLbResourceId(networkResourceProviderClient.SubscriptionId, resourceGroupName, lbName, "FrontendIPConfigurations", frontendIpConfigName) }, Protocol = TransportProtocol.Tcp, @@ -686,7 +686,7 @@ public void LoadBalancerApiTestWithDistributionPolicy() Name = inboundNatRule2Name, FrontendIPConfiguration = new SubResource() { - Id = GetChildLbResourceId(networkResourceProviderClient.Credentials.SubscriptionId, + Id = GetChildLbResourceId(networkResourceProviderClient.SubscriptionId, resourceGroupName, lbName, "FrontendIPConfigurations", frontendIpConfigName) }, Protocol = TransportProtocol.Tcp, @@ -732,9 +732,9 @@ public void LoadBalancerApiTestWithDistributionPolicy() // Verify List LoadBalancer var listLoadBalancer = networkResourceProviderClient.LoadBalancers.List(resourceGroupName); - Assert.Equal(1, listLoadBalancer.Value.Count); - Assert.Equal(lbName, listLoadBalancer.Value[0].Name); - Assert.Equal(getLoadBalancer.Etag, listLoadBalancer.Value[0].Etag); + Assert.Equal(1, listLoadBalancer.Count()); + Assert.Equal(lbName, listLoadBalancer.First().Name); + Assert.Equal(getLoadBalancer.Etag, listLoadBalancer.First().Etag); // Do another put after changing the distribution policy loadbalancerparamater.LoadBalancingRules[0].LoadDistribution = LoadDistribution.SourceIP; @@ -754,7 +754,7 @@ public void LoadBalancerApiTestWithDistributionPolicy() // Verify Delete listLoadBalancer = networkResourceProviderClient.LoadBalancers.List(resourceGroupName); - Assert.Equal(0, listLoadBalancer.Value.Count); + Assert.Equal(0, listLoadBalancer.Count()); // Delete VirtualNetwork networkResourceProviderClient.VirtualNetworks.Delete(resourceGroupName, vnetName); @@ -810,7 +810,7 @@ public void CreateEmptyLoadBalancer() // Verify Delete var listLoadBalancer = networkResourceProviderClient.LoadBalancers.List(resourceGroupName); - Assert.Null(listLoadBalancer.Value); + Assert.Null(listLoadBalancer); } } @@ -881,7 +881,7 @@ public void UpdateLoadBalancerRule() Name = loadBalancingRuleName, FrontendIPConfiguration = new SubResource() { - Id = GetChildLbResourceId(networkResourceProviderClient.Credentials.SubscriptionId, + Id = GetChildLbResourceId(networkResourceProviderClient.SubscriptionId, resourceGroupName, lbname, "FrontendIPConfigurations", frontendIpConfigName) }, Protocol = TransportProtocol.Tcp, @@ -890,7 +890,7 @@ public void UpdateLoadBalancerRule() EnableFloatingIP = false, BackendAddressPool = new SubResource() { - Id = GetChildLbResourceId(networkResourceProviderClient.Credentials.SubscriptionId, + Id = GetChildLbResourceId(networkResourceProviderClient.SubscriptionId, resourceGroupName, lbname, "backendAddressPools", backEndAddressPoolName) } } @@ -930,7 +930,7 @@ public void UpdateLoadBalancerRule() { Id = GetChildLbResourceId( - networkResourceProviderClient.Credentials.SubscriptionId, + networkResourceProviderClient.SubscriptionId, resourceGroupName, lbname, "probes", @@ -957,7 +957,7 @@ public void UpdateLoadBalancerRule() // Verify Delete var listLoadBalancer = networkResourceProviderClient.LoadBalancers.List(resourceGroupName); - Assert.Equal(0, listLoadBalancer.Value.Count); + Assert.Equal(0, listLoadBalancer.Count()); // Delete VirtualNetwork networkResourceProviderClient.VirtualNetworks.Delete(resourceGroupName, vnetName); @@ -1073,7 +1073,7 @@ public void LoadBalancerApiNicAssociationTest() Name = loadBalancingRuleName, FrontendIPConfiguration = new SubResource() { - Id = GetChildLbResourceId(networkResourceProviderClient.Credentials.SubscriptionId, + Id = GetChildLbResourceId(networkResourceProviderClient.SubscriptionId, resourceGroupName, lbName, "FrontendIPConfigurations", frontendIpConfigName) }, Protocol = TransportProtocol.Tcp, @@ -1083,12 +1083,12 @@ public void LoadBalancerApiNicAssociationTest() IdleTimeoutInMinutes = 15, BackendAddressPool = new SubResource() { - Id = GetChildLbResourceId(networkResourceProviderClient.Credentials.SubscriptionId, + Id = GetChildLbResourceId(networkResourceProviderClient.SubscriptionId, resourceGroupName, lbName, "backendAddressPools", backEndAddressPoolName) }, Probe = new SubResource() { - Id = GetChildLbResourceId(networkResourceProviderClient.Credentials.SubscriptionId, + Id = GetChildLbResourceId(networkResourceProviderClient.SubscriptionId, resourceGroupName, lbName, "probes", probeName) } } @@ -1112,7 +1112,7 @@ public void LoadBalancerApiNicAssociationTest() Name = inboundNatRule1Name, FrontendIPConfiguration = new SubResource() { - Id = GetChildLbResourceId(networkResourceProviderClient.Credentials.SubscriptionId, + Id = GetChildLbResourceId(networkResourceProviderClient.SubscriptionId, resourceGroupName, lbName, "FrontendIPConfigurations", frontendIpConfigName) }, Protocol = TransportProtocol.Tcp, @@ -1126,7 +1126,7 @@ public void LoadBalancerApiNicAssociationTest() Name = inboundNatRule2Name, FrontendIPConfiguration = new SubResource() { - Id = GetChildLbResourceId(networkResourceProviderClient.Credentials.SubscriptionId, + Id = GetChildLbResourceId(networkResourceProviderClient.SubscriptionId, resourceGroupName, lbName, "FrontendIPConfigurations", frontendIpConfigName) }, Protocol = TransportProtocol.Tcp, @@ -1187,7 +1187,7 @@ public void LoadBalancerApiNicAssociationTest() // Verify Delete var listLoadBalancer = networkResourceProviderClient.LoadBalancers.List(resourceGroupName); - Assert.Null(listLoadBalancer.Value); + Assert.Null(listLoadBalancer); // Delete all NetworkInterfaces networkResourceProviderClient.NetworkInterfaces.Delete(resourceGroupName, nic1name); diff --git a/src/ResourceManagement/Network/Network.Tests/Tests/NetworkInterfaceTests.cs b/src/ResourceManagement/Network/Network.Tests/Tests/NetworkInterfaceTests.cs index f76ef412a551c..a51fab6054061 100644 --- a/src/ResourceManagement/Network/Network.Tests/Tests/NetworkInterfaceTests.cs +++ b/src/ResourceManagement/Network/Network.Tests/Tests/NetworkInterfaceTests.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using System.Linq; using System.Net; using Microsoft.Azure; using Microsoft.Azure.Management.Network; @@ -139,23 +140,23 @@ public void NetworkInterfaceApiTest() // Get all Nics var getListNicResponse = networkResourceProviderClient.NetworkInterfaces.List(resourceGroupName); - Assert.Equal(1, getListNicResponse.Value.Count); - Assert.Equal(getNicResponse.Name, getListNicResponse.Value[0].Name); - Assert.Equal(getNicResponse.Etag, getListNicResponse.Value[0].Etag); - Assert.Equal(getNicResponse.IpConfigurations[0].Etag, getListNicResponse.Value[0].IpConfigurations[0].Etag); + Assert.Equal(1, getListNicResponse.Count()); + Assert.Equal(getNicResponse.Name, getListNicResponse.First().Name); + Assert.Equal(getNicResponse.Etag, getListNicResponse.First().Etag); + Assert.Equal(getNicResponse.IpConfigurations[0].Etag, getListNicResponse.First().IpConfigurations[0].Etag); // Get all Nics in subscription var listNicSubscription = networkResourceProviderClient.NetworkInterfaces.ListAll(); - Assert.Equal(1, getListNicResponse.Value.Count); - Assert.Equal(getNicResponse.Name, listNicSubscription.Value[0].Name); - Assert.Equal(getNicResponse.Etag, listNicSubscription.Value[0].Etag); - Assert.Equal(listNicSubscription.Value[0].IpConfigurations[0].Etag, getListNicResponse.Value[0].IpConfigurations[0].Etag); + Assert.Equal(1, getListNicResponse.Count()); + Assert.Equal(getNicResponse.Name, listNicSubscription.First().Name); + Assert.Equal(getNicResponse.Etag, listNicSubscription.First().Etag); + Assert.Equal(listNicSubscription.First().IpConfigurations[0].Etag, getListNicResponse.First().IpConfigurations[0].Etag); // Delete Nic networkResourceProviderClient.NetworkInterfaces.Delete(resourceGroupName, nicName); getListNicResponse = networkResourceProviderClient.NetworkInterfaces.List(resourceGroupName); - Assert.Equal(0, getListNicResponse.Value.Count); + Assert.Equal(0, getListNicResponse.Count()); // Delete PublicIPAddress networkResourceProviderClient.PublicIpAddresses.Delete(resourceGroupName, publicIpName); @@ -276,7 +277,7 @@ public void NetworkInterfaceDnsSettingsTest() networkResourceProviderClient.NetworkInterfaces.Delete(resourceGroupName, nicName); var getListNicResponse = networkResourceProviderClient.NetworkInterfaces.List(resourceGroupName); - Assert.Null(getListNicResponse.Value); + Assert.Null(getListNicResponse); // Delete VirtualNetwork networkResourceProviderClient.VirtualNetworks.Delete(resourceGroupName, vnetName); diff --git a/src/ResourceManagement/Network/Network.Tests/Tests/NetworkSecurityGroupTests.cs b/src/ResourceManagement/Network/Network.Tests/Tests/NetworkSecurityGroupTests.cs index c3fea010424c8..96b9b47f8a9b4 100644 --- a/src/ResourceManagement/Network/Network.Tests/Tests/NetworkSecurityGroupTests.cs +++ b/src/ResourceManagement/Network/Network.Tests/Tests/NetworkSecurityGroupTests.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using System.Net; +using System.Linq; using Microsoft.Azure.Management.Network; using Microsoft.Azure.Management.Network.Models; using Microsoft.Azure.Management.Resources; @@ -70,36 +71,36 @@ public void NetworkSecurityGroupApiTest() // List NSG var listNsgResponse = networkResourceProviderClient.NetworkSecurityGroups.List(resourceGroupName); - Assert.Equal(1, listNsgResponse.Value.Count); - Assert.Equal(networkSecurityGroupName, listNsgResponse.Value[0].Name); - Assert.Equal(6, listNsgResponse.Value[0].DefaultSecurityRules.Count); - Assert.Equal("AllowVnetInBound", listNsgResponse.Value[0].DefaultSecurityRules[0].Name); - Assert.Equal("AllowAzureLoadBalancerInBound", listNsgResponse.Value[0].DefaultSecurityRules[1].Name); - Assert.Equal("DenyAllInBound", listNsgResponse.Value[0].DefaultSecurityRules[2].Name); - Assert.Equal("AllowVnetOutBound", listNsgResponse.Value[0].DefaultSecurityRules[3].Name); - Assert.Equal("AllowInternetOutBound", listNsgResponse.Value[0].DefaultSecurityRules[4].Name); - Assert.Equal("DenyAllOutBound", listNsgResponse.Value[0].DefaultSecurityRules[5].Name); - Assert.Equal(getNsgResponse.Etag, listNsgResponse.Value[0].Etag); + Assert.Equal(1, listNsgResponse.Count()); + Assert.Equal(networkSecurityGroupName, listNsgResponse.First().Name); + Assert.Equal(6, listNsgResponse.First().DefaultSecurityRules.Count); + Assert.Equal("AllowVnetInBound", listNsgResponse.First().DefaultSecurityRules[0].Name); + Assert.Equal("AllowAzureLoadBalancerInBound", listNsgResponse.First().DefaultSecurityRules[1].Name); + Assert.Equal("DenyAllInBound", listNsgResponse.First().DefaultSecurityRules[2].Name); + Assert.Equal("AllowVnetOutBound", listNsgResponse.First().DefaultSecurityRules[3].Name); + Assert.Equal("AllowInternetOutBound", listNsgResponse.First().DefaultSecurityRules[4].Name); + Assert.Equal("DenyAllOutBound", listNsgResponse.First().DefaultSecurityRules[5].Name); + Assert.Equal(getNsgResponse.Etag, listNsgResponse.First().Etag); // List NSG in a subscription var listNsgSubsciptionResponse = networkResourceProviderClient.NetworkSecurityGroups.ListAll(); - Assert.Equal(1, listNsgSubsciptionResponse.Value.Count); - Assert.Equal(networkSecurityGroupName, listNsgSubsciptionResponse.Value[0].Name); - Assert.Equal(6, listNsgSubsciptionResponse.Value[0].DefaultSecurityRules.Count); - Assert.Equal("AllowVnetInBound", listNsgSubsciptionResponse.Value[0].DefaultSecurityRules[0].Name); - Assert.Equal("AllowAzureLoadBalancerInBound", listNsgSubsciptionResponse.Value[0].DefaultSecurityRules[1].Name); - Assert.Equal("DenyAllInBound", listNsgSubsciptionResponse.Value[0].DefaultSecurityRules[2].Name); - Assert.Equal("AllowVnetOutBound", listNsgSubsciptionResponse.Value[0].DefaultSecurityRules[3].Name); - Assert.Equal("AllowInternetOutBound", listNsgSubsciptionResponse.Value[0].DefaultSecurityRules[4].Name); - Assert.Equal("DenyAllOutBound", listNsgSubsciptionResponse.Value[0].DefaultSecurityRules[5].Name); - Assert.Equal(getNsgResponse.Etag, listNsgSubsciptionResponse.Value[0].Etag); + Assert.Equal(1, listNsgSubsciptionResponse.Count()); + Assert.Equal(networkSecurityGroupName, listNsgSubsciptionResponse.First().Name); + Assert.Equal(6, listNsgSubsciptionResponse.First().DefaultSecurityRules.Count); + Assert.Equal("AllowVnetInBound", listNsgSubsciptionResponse.First().DefaultSecurityRules[0].Name); + Assert.Equal("AllowAzureLoadBalancerInBound", listNsgSubsciptionResponse.First().DefaultSecurityRules[1].Name); + Assert.Equal("DenyAllInBound", listNsgSubsciptionResponse.First().DefaultSecurityRules[2].Name); + Assert.Equal("AllowVnetOutBound", listNsgSubsciptionResponse.First().DefaultSecurityRules[3].Name); + Assert.Equal("AllowInternetOutBound", listNsgSubsciptionResponse.First().DefaultSecurityRules[4].Name); + Assert.Equal("DenyAllOutBound", listNsgSubsciptionResponse.First().DefaultSecurityRules[5].Name); + Assert.Equal(getNsgResponse.Etag, listNsgSubsciptionResponse.First().Etag); // Delete NSG networkResourceProviderClient.NetworkSecurityGroups.Delete(resourceGroupName, networkSecurityGroupName); // List NSG listNsgResponse = networkResourceProviderClient.NetworkSecurityGroups.List(resourceGroupName); - Assert.Equal(0, listNsgResponse.Value.Count); + Assert.Equal(0, listNsgResponse.Count()); } } @@ -180,29 +181,29 @@ public void NetworkSecurityGroupWithRulesApiTest() // List NSG var listNsgResponse = networkResourceProviderClient.NetworkSecurityGroups.List(resourceGroupName); - Assert.Equal(1, listNsgResponse.Value.Count); - Assert.Equal(networkSecurityGroupName, listNsgResponse.Value[0].Name); - Assert.Equal(6, listNsgResponse.Value[0].DefaultSecurityRules.Count); - Assert.Equal("AllowVnetInBound", listNsgResponse.Value[0].DefaultSecurityRules[0].Name); - Assert.Equal("AllowAzureLoadBalancerInBound", listNsgResponse.Value[0].DefaultSecurityRules[1].Name); - Assert.Equal("DenyAllInBound", listNsgResponse.Value[0].DefaultSecurityRules[2].Name); - Assert.Equal("AllowVnetOutBound", listNsgResponse.Value[0].DefaultSecurityRules[3].Name); - Assert.Equal("AllowInternetOutBound", listNsgResponse.Value[0].DefaultSecurityRules[4].Name); - Assert.Equal("DenyAllOutBound", listNsgResponse.Value[0].DefaultSecurityRules[5].Name); - Assert.Equal(getNsgResponse.Etag, listNsgResponse.Value[0].Etag); + Assert.Equal(1, listNsgResponse.Count()); + Assert.Equal(networkSecurityGroupName, listNsgResponse.First().Name); + Assert.Equal(6, listNsgResponse.First().DefaultSecurityRules.Count); + Assert.Equal("AllowVnetInBound", listNsgResponse.First().DefaultSecurityRules[0].Name); + Assert.Equal("AllowAzureLoadBalancerInBound", listNsgResponse.First().DefaultSecurityRules[1].Name); + Assert.Equal("DenyAllInBound", listNsgResponse.First().DefaultSecurityRules[2].Name); + Assert.Equal("AllowVnetOutBound", listNsgResponse.First().DefaultSecurityRules[3].Name); + Assert.Equal("AllowInternetOutBound", listNsgResponse.First().DefaultSecurityRules[4].Name); + Assert.Equal("DenyAllOutBound", listNsgResponse.First().DefaultSecurityRules[5].Name); + Assert.Equal(getNsgResponse.Etag, listNsgResponse.First().Etag); // List NSG in a subscription var listNsgSubsciptionResponse = networkResourceProviderClient.NetworkSecurityGroups.ListAll(); - Assert.Equal(1, listNsgSubsciptionResponse.Value.Count); - Assert.Equal(networkSecurityGroupName, listNsgSubsciptionResponse.Value[0].Name); - Assert.Equal(6, listNsgSubsciptionResponse.Value[0].DefaultSecurityRules.Count); - Assert.Equal("AllowVnetInBound", listNsgSubsciptionResponse.Value[0].DefaultSecurityRules[0].Name); - Assert.Equal("AllowAzureLoadBalancerInBound", listNsgSubsciptionResponse.Value[0].DefaultSecurityRules[1].Name); - Assert.Equal("DenyAllInBound", listNsgSubsciptionResponse.Value[0].DefaultSecurityRules[2].Name); - Assert.Equal("AllowVnetOutBound", listNsgSubsciptionResponse.Value[0].DefaultSecurityRules[3].Name); - Assert.Equal("AllowInternetOutBound", listNsgSubsciptionResponse.Value[0].DefaultSecurityRules[4].Name); - Assert.Equal("DenyAllOutBound", listNsgSubsciptionResponse.Value[0].DefaultSecurityRules[5].Name); - Assert.Equal(getNsgResponse.Etag, listNsgSubsciptionResponse.Value[0].Etag); + Assert.Equal(1, listNsgSubsciptionResponse.Count()); + Assert.Equal(networkSecurityGroupName, listNsgSubsciptionResponse.First().Name); + Assert.Equal(6, listNsgSubsciptionResponse.First().DefaultSecurityRules.Count); + Assert.Equal("AllowVnetInBound", listNsgSubsciptionResponse.First().DefaultSecurityRules[0].Name); + Assert.Equal("AllowAzureLoadBalancerInBound", listNsgSubsciptionResponse.First().DefaultSecurityRules[1].Name); + Assert.Equal("DenyAllInBound", listNsgSubsciptionResponse.First().DefaultSecurityRules[2].Name); + Assert.Equal("AllowVnetOutBound", listNsgSubsciptionResponse.First().DefaultSecurityRules[3].Name); + Assert.Equal("AllowInternetOutBound", listNsgSubsciptionResponse.First().DefaultSecurityRules[4].Name); + Assert.Equal("DenyAllOutBound", listNsgSubsciptionResponse.First().DefaultSecurityRules[5].Name); + Assert.Equal(getNsgResponse.Etag, listNsgSubsciptionResponse.First().Etag); // Add a new security rule var SecurityRule = new SecurityRule() @@ -244,7 +245,7 @@ public void NetworkSecurityGroupWithRulesApiTest() // List NSG listNsgResponse = networkResourceProviderClient.NetworkSecurityGroups.List(resourceGroupName); - Assert.Equal(0, listNsgResponse.Value.Count); + Assert.Equal(0, listNsgResponse.Count()); } } } diff --git a/src/ResourceManagement/Network/Network.Tests/Tests/PublicIpAddressTests.cs b/src/ResourceManagement/Network/Network.Tests/Tests/PublicIpAddressTests.cs index a11286460442a..d9fb90cf979e0 100644 --- a/src/ResourceManagement/Network/Network.Tests/Tests/PublicIpAddressTests.cs +++ b/src/ResourceManagement/Network/Network.Tests/Tests/PublicIpAddressTests.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using System.Net; +using System.Linq; using Microsoft.Azure.Management.Network; using Microsoft.Azure.Management.Network.Models; using Microsoft.Azure.Management.Resources; @@ -62,20 +63,20 @@ public void PublicIpAddressApiTest() // Get List of PublicIpAddress var getPublicIpAddressListResponse = networkResourceProviderClient.PublicIpAddresses.List(resourceGroupName); - Assert.Equal(1, getPublicIpAddressListResponse.Value.Count); - ArePublicIpAddressesEqual(getPublicIpAddressResponse, getPublicIpAddressListResponse.Value[0]); + Assert.Equal(1, getPublicIpAddressListResponse.Count()); + ArePublicIpAddressesEqual(getPublicIpAddressResponse, getPublicIpAddressListResponse.First()); // Get List of PublicIpAddress in a subscription var getPublicIpAddressListSubscriptionResponse = networkResourceProviderClient.PublicIpAddresses.ListAll(); - Assert.Equal(1, getPublicIpAddressListSubscriptionResponse.Value.Count); - ArePublicIpAddressesEqual(getPublicIpAddressResponse, getPublicIpAddressListSubscriptionResponse.Value[0]); + Assert.Equal(1, getPublicIpAddressListSubscriptionResponse.Count()); + ArePublicIpAddressesEqual(getPublicIpAddressResponse, getPublicIpAddressListSubscriptionResponse.First()); // Delete PublicIpAddress networkResourceProviderClient.PublicIpAddresses.Delete(resourceGroupName, publicIpName); // Get PublicIpAddress getPublicIpAddressListResponse = networkResourceProviderClient.PublicIpAddresses.List(resourceGroupName); - Assert.Equal(0, getPublicIpAddressListResponse.Value.Count); + Assert.Equal(0, getPublicIpAddressListResponse.Count()); } } @@ -140,20 +141,20 @@ public void PublicIpAddressApiTestWithIdletTimeoutAndReverseFqdn() // Get List of PublicIpAddress var getPublicIpAddressListResponse = networkResourceProviderClient.PublicIpAddresses.List(resourceGroupName); - Assert.Equal(1, getPublicIpAddressListResponse.Value.Count); - ArePublicIpAddressesEqual(getPublicIpAddressResponse, getPublicIpAddressListResponse.Value[0]); + Assert.Equal(1, getPublicIpAddressListResponse.Count()); + ArePublicIpAddressesEqual(getPublicIpAddressResponse, getPublicIpAddressListResponse.First()); // Get List of PublicIpAddress in a subscription var getPublicIpAddressListSubscriptionResponse = networkResourceProviderClient.PublicIpAddresses.ListAll(); - Assert.Equal(1, getPublicIpAddressListSubscriptionResponse.Value.Count); - ArePublicIpAddressesEqual(getPublicIpAddressResponse, getPublicIpAddressListSubscriptionResponse.Value[0]); + Assert.Equal(1, getPublicIpAddressListSubscriptionResponse.Count()); + ArePublicIpAddressesEqual(getPublicIpAddressResponse, getPublicIpAddressListSubscriptionResponse.First()); // Delete PublicIpAddress networkResourceProviderClient.PublicIpAddresses.Delete(resourceGroupName, publicIpName); // Get PublicIpAddress getPublicIpAddressListResponse = networkResourceProviderClient.PublicIpAddresses.List(resourceGroupName); - Assert.Equal(0, getPublicIpAddressListResponse.Value.Count); + Assert.Equal(0, getPublicIpAddressListResponse.Count()); } } diff --git a/src/ResourceManagement/Network/Network.Tests/Tests/SecurityRuleTests.cs b/src/ResourceManagement/Network/Network.Tests/Tests/SecurityRuleTests.cs index 91606e55809cd..b8f1d9b3337c2 100644 --- a/src/ResourceManagement/Network/Network.Tests/Tests/SecurityRuleTests.cs +++ b/src/ResourceManagement/Network/Network.Tests/Tests/SecurityRuleTests.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using System.Net; +using System.Linq; using Microsoft.Azure.Management.Network; using Microsoft.Azure.Management.Network.Models; using Microsoft.Azure.Management.Resources; @@ -117,23 +118,23 @@ public void SecurityRuleWithRulesApiTest() // List all SecurityRules var getsecurityRules = networkResourceProviderClient.SecurityRules.List(resourceGroupName, networkSecurityGroupName); - Assert.Equal(2, getsecurityRules.Value.Count); - this.CompareSecurityRule(getNsgResponse.SecurityRules[0], getsecurityRules.Value[0]); - this.CompareSecurityRule(getNsgResponse.SecurityRules[1], getsecurityRules.Value[1]); + Assert.Equal(2, getsecurityRules.Count()); + this.CompareSecurityRule(getNsgResponse.SecurityRules[0], getsecurityRules.First()); + this.CompareSecurityRule(getNsgResponse.SecurityRules[1], getsecurityRules.ToArray()[1]); // Delete a SecurityRule networkResourceProviderClient.SecurityRules.Delete(resourceGroupName, networkSecurityGroupName, securityRule2); getsecurityRules = networkResourceProviderClient.SecurityRules.List(resourceGroupName, networkSecurityGroupName); - Assert.Equal(1, getsecurityRules.Value.Count); + Assert.Equal(1, getsecurityRules.Count()); // Delete NSG networkResourceProviderClient.NetworkSecurityGroups.Delete(resourceGroupName, networkSecurityGroupName); // List NSG var listNsgResponse = networkResourceProviderClient.NetworkSecurityGroups.List(resourceGroupName); - Assert.Equal(0, listNsgResponse.Value.Count); + Assert.Equal(0, listNsgResponse.Count()); } } diff --git a/src/ResourceManagement/Network/Network.Tests/Tests/SubnetTests.cs b/src/ResourceManagement/Network/Network.Tests/Tests/SubnetTests.cs index 7c79b1877a79d..294354a9d2763 100644 --- a/src/ResourceManagement/Network/Network.Tests/Tests/SubnetTests.cs +++ b/src/ResourceManagement/Network/Network.Tests/Tests/SubnetTests.cs @@ -94,7 +94,7 @@ public void SubnetApiTest() var getSubnetListResponse = networkResourceProviderClient.Subnets.List(resourceGroupName, vnetName); // Verify ListSubnets - Assert.True(AreSubnetsEqual(getVnetResponse.Subnets, getSubnetListResponse.Value)); + Assert.True(AreSubnetsEqual(getVnetResponse.Subnets, getSubnetListResponse)); // Delete the subnet "subnet1" networkResourceProviderClient.Subnets.Delete(resourceGroupName, vnetName, subnet2Name); @@ -102,8 +102,8 @@ public void SubnetApiTest() // Verify that the deletion was successful getSubnetListResponse = networkResourceProviderClient.Subnets.List(resourceGroupName, vnetName); - Assert.Equal(1, getSubnetListResponse.Value.Count); - Assert.Equal(subnet1Name, getSubnetListResponse.Value[0].Name); + Assert.Equal(1, getSubnetListResponse.Count()); + Assert.Equal(subnet1Name, getSubnetListResponse.First().Name); #endregion } diff --git a/src/ResourceManagement/Network/Network.Tests/Tests/VirtualNetworkTests.cs b/src/ResourceManagement/Network/Network.Tests/Tests/VirtualNetworkTests.cs index ba6ce3c0fbb74..35e973dd4af68 100644 --- a/src/ResourceManagement/Network/Network.Tests/Tests/VirtualNetworkTests.cs +++ b/src/ResourceManagement/Network/Network.Tests/Tests/VirtualNetworkTests.cs @@ -13,6 +13,9 @@ // limitations under the License. // +using System.Collections.Generic; +using System.Linq; +using System.Net; using Microsoft.Azure.Management.Network; using Microsoft.Azure.Management.Network.Models; using Microsoft.Azure.Management.Resources; @@ -20,9 +23,7 @@ using Microsoft.Azure.Test; using Networks.Tests.Helpers; using ResourceGroups.Tests; -using System.Collections.Generic; -using System.Linq; -using System.Net; + using Xunit; namespace Networks.Tests @@ -103,15 +104,15 @@ public void VirtualNetworkApiTest() // Get all Vnets var getAllVnets = networkResourceProviderClient.VirtualNetworks.List(resourceGroupName); - Assert.Equal(vnetName, getAllVnets.Value[0].Name); - Assert.Equal("Succeeded", getAllVnets.Value[0].ProvisioningState); - Assert.Equal("10.0.0.0/16", getAllVnets.Value[0].AddressSpace.AddressPrefixes[0]); - Assert.Equal(subnet1Name, getAllVnets.Value[0].Subnets[0].Name); - Assert.Equal(subnet2Name, getAllVnets.Value[0].Subnets[1].Name); + Assert.Equal(vnetName, getAllVnets.First().Name); + Assert.Equal("Succeeded", getAllVnets.First().ProvisioningState); + Assert.Equal("10.0.0.0/16", getAllVnets.First().AddressSpace.AddressPrefixes[0]); + Assert.Equal(subnet1Name, getAllVnets.First().Subnets[0].Name); + Assert.Equal(subnet2Name, getAllVnets.First().Subnets[1].Name); // Get all Vnets in a subscription var getAllVnetInSubscription = networkResourceProviderClient.VirtualNetworks.ListAll(); - var vnpgateway = getAllVnetInSubscription.Value.FirstOrDefault(n => n.Name == vnetName); + var vnpgateway = getAllVnetInSubscription.FirstOrDefault(n => n.Name == vnetName); Assert.NotNull(vnpgateway); Assert.Equal("Succeeded", vnpgateway.ProvisioningState); Assert.Equal("10.0.0.0/16", vnpgateway.AddressSpace.AddressPrefixes[0]); @@ -123,7 +124,7 @@ public void VirtualNetworkApiTest() // Get all Vnets getAllVnets = networkResourceProviderClient.VirtualNetworks.List(resourceGroupName); - Assert.Null(getAllVnets.Value); + Assert.Null(getAllVnets); } } } diff --git a/src/ResourceManagement/Network/NetworkManagement/Generated/ApplicationGatewaysOperations.cs b/src/ResourceManagement/Network/NetworkManagement/Generated/ApplicationGatewaysOperations.cs index f59f2f0c69c3b..629ba1e68a19d 100644 --- a/src/ResourceManagement/Network/NetworkManagement/Generated/ApplicationGatewaysOperations.cs +++ b/src/ResourceManagement/Network/NetworkManagement/Generated/ApplicationGatewaysOperations.cs @@ -11,6 +11,7 @@ namespace Microsoft.Azure.Management.Network using System.Threading.Tasks; using Microsoft.Rest; using Newtonsoft.Json; + using System.Linq; using Microsoft.Azure; using Models; @@ -43,10 +44,10 @@ internal ApplicationGatewaysOperations(NetworkResourceProviderClient client) /// The name of the applicationgateway. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string applicationGatewayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { @@ -176,6 +177,10 @@ internal ApplicationGatewaysOperations(NetworkResourceProviderClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } if (shouldTrace) { ServiceClientTracing.Exit(invocationId, result); @@ -310,6 +315,10 @@ internal ApplicationGatewaysOperations(NetworkResourceProviderClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { @@ -336,10 +345,10 @@ internal ApplicationGatewaysOperations(NetworkResourceProviderClient client) /// Parameters supplied to the create/delete ApplicationGateway operation /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string applicationGatewayName, ApplicationGateway parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { @@ -493,6 +502,10 @@ internal ApplicationGatewaysOperations(NetworkResourceProviderClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "Created")) { @@ -525,7 +538,7 @@ internal ApplicationGatewaysOperations(NetworkResourceProviderClient client) /// /// Cancellation token. /// - public async Task> ListWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -627,14 +640,18 @@ internal ApplicationGatewaysOperations(NetworkResourceProviderClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { @@ -653,7 +670,7 @@ internal ApplicationGatewaysOperations(NetworkResourceProviderClient client) /// /// Cancellation token. /// - public async Task> ListAllWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListAllWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (this.Client.ApiVersion == null) { @@ -749,14 +766,18 @@ internal ApplicationGatewaysOperations(NetworkResourceProviderClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { @@ -776,10 +797,10 @@ internal ApplicationGatewaysOperations(NetworkResourceProviderClient client) /// The name of the application gateway. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// public async Task StartWithHttpMessagesAsync(string resourceGroupName, string applicationGatewayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { @@ -909,6 +930,10 @@ internal ApplicationGatewaysOperations(NetworkResourceProviderClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } if (shouldTrace) { ServiceClientTracing.Exit(invocationId, result); @@ -927,10 +952,10 @@ internal ApplicationGatewaysOperations(NetworkResourceProviderClient client) /// The name of the application gateway. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// public async Task StopWithHttpMessagesAsync(string resourceGroupName, string applicationGatewayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { @@ -1060,6 +1085,10 @@ internal ApplicationGatewaysOperations(NetworkResourceProviderClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } if (shouldTrace) { ServiceClientTracing.Exit(invocationId, result); @@ -1071,7 +1100,7 @@ internal ApplicationGatewaysOperations(NetworkResourceProviderClient client) /// The List ApplicationGateway opertion retrieves all the applicationgateways /// in a resource group. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// @@ -1080,11 +1109,11 @@ internal ApplicationGatewaysOperations(NetworkResourceProviderClient client) /// /// Cancellation token. /// - public async Task> ListNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (nextLink == null) + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextLink"); + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing bool shouldTrace = ServiceClientTracing.IsEnabled; @@ -1093,13 +1122,13 @@ internal ApplicationGatewaysOperations(NetworkResourceProviderClient client) { invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("nextLink", nextLink); + tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(invocationId, this, "ListNext", tracingParameters); } // Construct URL string url = "{nextLink}"; - url = url.Replace("{nextLink}", nextLink); + url = url.Replace("{nextLink}", nextPageLink); List queryParameters = new List(); if (queryParameters.Count > 0) { @@ -1168,14 +1197,18 @@ internal ApplicationGatewaysOperations(NetworkResourceProviderClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { @@ -1188,7 +1221,7 @@ internal ApplicationGatewaysOperations(NetworkResourceProviderClient client) /// The List applicationgateway opertion retrieves all the applicationgateways /// in a subscription. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// @@ -1197,11 +1230,11 @@ internal ApplicationGatewaysOperations(NetworkResourceProviderClient client) /// /// Cancellation token. /// - public async Task> ListAllNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListAllNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (nextLink == null) + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextLink"); + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing bool shouldTrace = ServiceClientTracing.IsEnabled; @@ -1210,13 +1243,13 @@ internal ApplicationGatewaysOperations(NetworkResourceProviderClient client) { invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("nextLink", nextLink); + tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(invocationId, this, "ListAllNext", tracingParameters); } // Construct URL string url = "{nextLink}"; - url = url.Replace("{nextLink}", nextLink); + url = url.Replace("{nextLink}", nextPageLink); List queryParameters = new List(); if (queryParameters.Count > 0) { @@ -1285,14 +1318,18 @@ internal ApplicationGatewaysOperations(NetworkResourceProviderClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { diff --git a/src/ResourceManagement/Network/NetworkManagement/Generated/ApplicationGatewaysOperationsExtensions.cs b/src/ResourceManagement/Network/NetworkManagement/Generated/ApplicationGatewaysOperationsExtensions.cs index 3a8fd191f8bc2..2066bba803e52 100644 --- a/src/ResourceManagement/Network/NetworkManagement/Generated/ApplicationGatewaysOperationsExtensions.cs +++ b/src/ResourceManagement/Network/NetworkManagement/Generated/ApplicationGatewaysOperationsExtensions.cs @@ -16,7 +16,7 @@ public static partial class ApplicationGatewaysOperationsExtensions /// applicationgateway. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -34,7 +34,7 @@ public static void Delete(this IApplicationGatewaysOperations operations, string /// applicationgateway. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -55,7 +55,7 @@ public static void Delete(this IApplicationGatewaysOperations operations, string /// applicationgateway. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -73,7 +73,7 @@ public static void BeginDelete(this IApplicationGatewaysOperations operations, s /// applicationgateway. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -94,7 +94,7 @@ public static void BeginDelete(this IApplicationGatewaysOperations operations, s /// specified applicationgateway. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -112,7 +112,7 @@ public static ApplicationGateway Get(this IApplicationGatewaysOperations operati /// specified applicationgateway. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -133,7 +133,7 @@ public static ApplicationGateway Get(this IApplicationGatewaysOperations operati /// The Put ApplicationGateway operation creates/updates a ApplicationGateway /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -153,7 +153,7 @@ public static ApplicationGateway CreateOrUpdate(this IApplicationGatewaysOperati /// The Put ApplicationGateway operation creates/updates a ApplicationGateway /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -177,7 +177,7 @@ public static ApplicationGateway CreateOrUpdate(this IApplicationGatewaysOperati /// The Put ApplicationGateway operation creates/updates a ApplicationGateway /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -197,7 +197,7 @@ public static ApplicationGateway BeginCreateOrUpdate(this IApplicationGatewaysOp /// The Put ApplicationGateway operation creates/updates a ApplicationGateway /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -222,12 +222,12 @@ public static ApplicationGateway BeginCreateOrUpdate(this IApplicationGatewaysOp /// in a resource group. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. /// - public static ApplicationGatewayListResult List(this IApplicationGatewaysOperations operations, string resourceGroupName) + public static Page List(this IApplicationGatewaysOperations operations, string resourceGroupName) { return Task.Factory.StartNew(s => ((IApplicationGatewaysOperations)s).ListAsync(resourceGroupName), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } @@ -237,7 +237,7 @@ public static ApplicationGatewayListResult List(this IApplicationGatewaysOperati /// in a resource group. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -245,9 +245,9 @@ public static ApplicationGatewayListResult List(this IApplicationGatewaysOperati /// /// Cancellation token. /// - public static async Task ListAsync( this IApplicationGatewaysOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListAsync( this IApplicationGatewaysOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false); return result.Body; } @@ -256,9 +256,9 @@ public static ApplicationGatewayListResult List(this IApplicationGatewaysOperati /// in a subscription. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - public static ApplicationGatewayListResult ListAll(this IApplicationGatewaysOperations operations) + public static Page ListAll(this IApplicationGatewaysOperations operations) { return Task.Factory.StartNew(s => ((IApplicationGatewaysOperations)s).ListAllAsync(), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } @@ -268,14 +268,14 @@ public static ApplicationGatewayListResult ListAll(this IApplicationGatewaysOper /// in a subscription. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// Cancellation token. /// - public static async Task ListAllAsync( this IApplicationGatewaysOperations operations, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListAllAsync( this IApplicationGatewaysOperations operations, CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListAllWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListAllWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false); return result.Body; } @@ -284,7 +284,7 @@ public static ApplicationGatewayListResult ListAll(this IApplicationGatewaysOper /// specified resource group through Network resource provider. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -302,7 +302,7 @@ public static void Start(this IApplicationGatewaysOperations operations, string /// specified resource group through Network resource provider. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -323,7 +323,7 @@ public static void Start(this IApplicationGatewaysOperations operations, string /// specified resource group through Network resource provider. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -341,7 +341,7 @@ public static void BeginStart(this IApplicationGatewaysOperations operations, st /// specified resource group through Network resource provider. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -362,7 +362,7 @@ public static void BeginStart(this IApplicationGatewaysOperations operations, st /// specified resource group through Network resource provider. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -380,7 +380,7 @@ public static void Stop(this IApplicationGatewaysOperations operations, string r /// specified resource group through Network resource provider. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -401,7 +401,7 @@ public static void Stop(this IApplicationGatewaysOperations operations, string r /// specified resource group through Network resource provider. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -419,7 +419,7 @@ public static void BeginStop(this IApplicationGatewaysOperations operations, str /// specified resource group through Network resource provider. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -440,14 +440,14 @@ public static void BeginStop(this IApplicationGatewaysOperations operations, str /// in a resource group. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// - public static ApplicationGatewayListResult ListNext(this IApplicationGatewaysOperations operations, string nextLink) + public static Page ListNext(this IApplicationGatewaysOperations operations, string nextPageLink) { - return Task.Factory.StartNew(s => ((IApplicationGatewaysOperations)s).ListNextAsync(nextLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + return Task.Factory.StartNew(s => ((IApplicationGatewaysOperations)s).ListNextAsync(nextPageLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } /// @@ -455,17 +455,17 @@ public static ApplicationGatewayListResult ListNext(this IApplicationGatewaysOpe /// in a resource group. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// /// Cancellation token. /// - public static async Task ListNextAsync( this IApplicationGatewaysOperations operations, string nextLink, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListNextAsync( this IApplicationGatewaysOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListNextWithHttpMessagesAsync(nextLink, null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false); return result.Body; } @@ -474,14 +474,14 @@ public static ApplicationGatewayListResult ListNext(this IApplicationGatewaysOpe /// in a subscription. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// - public static ApplicationGatewayListResult ListAllNext(this IApplicationGatewaysOperations operations, string nextLink) + public static Page ListAllNext(this IApplicationGatewaysOperations operations, string nextPageLink) { - return Task.Factory.StartNew(s => ((IApplicationGatewaysOperations)s).ListAllNextAsync(nextLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + return Task.Factory.StartNew(s => ((IApplicationGatewaysOperations)s).ListAllNextAsync(nextPageLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } /// @@ -489,17 +489,17 @@ public static ApplicationGatewayListResult ListAllNext(this IApplicationGateways /// in a subscription. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// /// Cancellation token. /// - public static async Task ListAllNextAsync( this IApplicationGatewaysOperations operations, string nextLink, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListAllNextAsync( this IApplicationGatewaysOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListAllNextWithHttpMessagesAsync(nextLink, null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListAllNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false); return result.Body; } diff --git a/src/ResourceManagement/Network/NetworkManagement/Generated/IApplicationGatewaysOperations.cs b/src/ResourceManagement/Network/NetworkManagement/Generated/IApplicationGatewaysOperations.cs index 34e271c758d75..8c873ae158c9f 100644 --- a/src/ResourceManagement/Network/NetworkManagement/Generated/IApplicationGatewaysOperations.cs +++ b/src/ResourceManagement/Network/NetworkManagement/Generated/IApplicationGatewaysOperations.cs @@ -6,6 +6,7 @@ namespace Microsoft.Azure.Management.Network using System.Threading; using System.Threading.Tasks; using Microsoft.Rest; + using System.Linq; using Microsoft.Azure; using Models; @@ -24,10 +25,10 @@ public partial interface IApplicationGatewaysOperations /// The name of the applicationgateway. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task DeleteWithHttpMessagesAsync(string resourceGroupName, string applicationGatewayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -41,10 +42,10 @@ public partial interface IApplicationGatewaysOperations /// The name of the applicationgateway. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string applicationGatewayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -58,10 +59,10 @@ public partial interface IApplicationGatewaysOperations /// The name of the applicationgateway. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> GetWithHttpMessagesAsync(string resourceGroupName, string applicationGatewayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -79,10 +80,10 @@ public partial interface IApplicationGatewaysOperations /// operation /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string applicationGatewayName, ApplicationGateway parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -100,10 +101,10 @@ public partial interface IApplicationGatewaysOperations /// operation /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string applicationGatewayName, ApplicationGateway parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -114,23 +115,23 @@ public partial interface IApplicationGatewaysOperations /// The name of the resource group. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// The List applicationgateway opertion retrieves all the /// applicationgateways in a subscription. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListAllWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListAllWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// The Start ApplicationGateway operation starts application /// gatewayin the specified resource group through Network resource @@ -143,10 +144,10 @@ public partial interface IApplicationGatewaysOperations /// The name of the application gateway. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task StartWithHttpMessagesAsync(string resourceGroupName, string applicationGatewayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -161,10 +162,10 @@ public partial interface IApplicationGatewaysOperations /// The name of the application gateway. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task BeginStartWithHttpMessagesAsync(string resourceGroupName, string applicationGatewayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -178,10 +179,10 @@ public partial interface IApplicationGatewaysOperations /// The name of the application gateway. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task StopWithHttpMessagesAsync(string resourceGroupName, string applicationGatewayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -195,39 +196,39 @@ public partial interface IApplicationGatewaysOperations /// The name of the application gateway. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task BeginStopWithHttpMessagesAsync(string resourceGroupName, string applicationGatewayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// The List ApplicationGateway opertion retrieves all the /// applicationgateways in a resource group. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// The List applicationgateway opertion retrieves all the /// applicationgateways in a subscription. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListAllNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListAllNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/src/ResourceManagement/Network/NetworkManagement/Generated/ILoadBalancersOperations.cs b/src/ResourceManagement/Network/NetworkManagement/Generated/ILoadBalancersOperations.cs index 7dcdc51750158..5e5e0a08cb5d1 100644 --- a/src/ResourceManagement/Network/NetworkManagement/Generated/ILoadBalancersOperations.cs +++ b/src/ResourceManagement/Network/NetworkManagement/Generated/ILoadBalancersOperations.cs @@ -6,6 +6,7 @@ namespace Microsoft.Azure.Management.Network using System.Threading; using System.Threading.Tasks; using Microsoft.Rest; + using System.Linq; using Microsoft.Azure; using Models; @@ -24,10 +25,10 @@ public partial interface ILoadBalancersOperations /// The name of the loadBalancer. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task DeleteWithHttpMessagesAsync(string resourceGroupName, string loadBalancerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -41,10 +42,10 @@ public partial interface ILoadBalancersOperations /// The name of the loadBalancer. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string loadBalancerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -58,10 +59,10 @@ public partial interface ILoadBalancersOperations /// The name of the loadBalancer. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> GetWithHttpMessagesAsync(string resourceGroupName, string loadBalancerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -77,10 +78,10 @@ public partial interface ILoadBalancersOperations /// Parameters supplied to the create/delete LoadBalancer operation /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string loadBalancerName, LoadBalancer parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -96,10 +97,10 @@ public partial interface ILoadBalancersOperations /// Parameters supplied to the create/delete LoadBalancer operation /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string loadBalancerName, LoadBalancer parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -107,12 +108,12 @@ public partial interface ILoadBalancersOperations /// a subscription. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListAllWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListAllWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// The List loadBalancer opertion retrieves all the loadbalancers in /// a resource group. @@ -121,39 +122,39 @@ public partial interface ILoadBalancersOperations /// The name of the resource group. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// The List loadBalancer opertion retrieves all the loadbalancers in /// a subscription. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListAllNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListAllNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// The List loadBalancer opertion retrieves all the loadbalancers in /// a resource group. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/src/ResourceManagement/Network/NetworkManagement/Generated/ILocalNetworkGatewaysOperations.cs b/src/ResourceManagement/Network/NetworkManagement/Generated/ILocalNetworkGatewaysOperations.cs index 7f7f8cbe18d3a..a192998a85687 100644 --- a/src/ResourceManagement/Network/NetworkManagement/Generated/ILocalNetworkGatewaysOperations.cs +++ b/src/ResourceManagement/Network/NetworkManagement/Generated/ILocalNetworkGatewaysOperations.cs @@ -6,6 +6,7 @@ namespace Microsoft.Azure.Management.Network using System.Threading; using System.Threading.Tasks; using Microsoft.Rest; + using System.Linq; using Microsoft.Azure; using Models; @@ -29,10 +30,10 @@ public partial interface ILocalNetworkGatewaysOperations /// Gateway operation through Network resource provider. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string localNetworkGatewayName, LocalNetworkGateway parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -51,10 +52,10 @@ public partial interface ILocalNetworkGatewaysOperations /// Gateway operation through Network resource provider. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string localNetworkGatewayName, LocalNetworkGateway parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -69,10 +70,10 @@ public partial interface ILocalNetworkGatewaysOperations /// The name of the local network gateway. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> GetWithHttpMessagesAsync(string resourceGroupName, string localNetworkGatewayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -86,10 +87,10 @@ public partial interface ILocalNetworkGatewaysOperations /// The name of the local network gateway. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task DeleteWithHttpMessagesAsync(string resourceGroupName, string localNetworkGatewayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -103,10 +104,10 @@ public partial interface ILocalNetworkGatewaysOperations /// The name of the local network gateway. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string localNetworkGatewayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -117,25 +118,25 @@ public partial interface ILocalNetworkGatewaysOperations /// The name of the resource group. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// The List LocalNetworkGateways opertion retrieves all the local /// network gateways stored. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/src/ResourceManagement/Network/NetworkManagement/Generated/INetworkInterfacesOperations.cs b/src/ResourceManagement/Network/NetworkManagement/Generated/INetworkInterfacesOperations.cs index 7a8608c82a0e5..4236074dbeab4 100644 --- a/src/ResourceManagement/Network/NetworkManagement/Generated/INetworkInterfacesOperations.cs +++ b/src/ResourceManagement/Network/NetworkManagement/Generated/INetworkInterfacesOperations.cs @@ -6,6 +6,7 @@ namespace Microsoft.Azure.Management.Network using System.Threading; using System.Threading.Tasks; using Microsoft.Rest; + using System.Linq; using Microsoft.Azure; using Models; @@ -24,10 +25,10 @@ public partial interface INetworkInterfacesOperations /// The name of the network interface. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task DeleteWithHttpMessagesAsync(string resourceGroupName, string networkInterfaceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -41,10 +42,10 @@ public partial interface INetworkInterfacesOperations /// The name of the network interface. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string networkInterfaceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -58,10 +59,10 @@ public partial interface INetworkInterfacesOperations /// The name of the network interface. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> GetWithHttpMessagesAsync(string resourceGroupName, string networkInterfaceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -78,10 +79,10 @@ public partial interface INetworkInterfacesOperations /// Parameters supplied to the create/update NetworkInterface operation /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string networkInterfaceName, NetworkInterface parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -98,10 +99,10 @@ public partial interface INetworkInterfacesOperations /// Parameters supplied to the create/update NetworkInterface operation /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string networkInterfaceName, NetworkInterface parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -109,12 +110,12 @@ public partial interface INetworkInterfacesOperations /// networkInterfaces in a subscription. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListAllWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListAllWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// The List networkInterfaces opertion retrieves all the /// networkInterfaces in a resource group. @@ -123,39 +124,39 @@ public partial interface INetworkInterfacesOperations /// The name of the resource group. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// The List networkInterfaces opertion retrieves all the /// networkInterfaces in a subscription. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListAllNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListAllNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// The List networkInterfaces opertion retrieves all the /// networkInterfaces in a resource group. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/src/ResourceManagement/Network/NetworkManagement/Generated/INetworkResourceProviderClient.cs b/src/ResourceManagement/Network/NetworkManagement/Generated/INetworkResourceProviderClient.cs index 0bf1d4e80893b..b85015d1051a1 100644 --- a/src/ResourceManagement/Network/NetworkManagement/Generated/INetworkResourceProviderClient.cs +++ b/src/ResourceManagement/Network/NetworkManagement/Generated/INetworkResourceProviderClient.cs @@ -7,6 +7,7 @@ namespace Microsoft.Azure.Management.Network using System.Threading.Tasks; using Newtonsoft.Json; using Microsoft.Rest; + using System.Linq; using Microsoft.Azure; using Models; @@ -30,10 +31,9 @@ public partial interface INetworkResourceProviderClient JsonSerializerSettings DeserializationSettings { get; } /// - /// Subscription credentials which uniquely identify Microsoft Azure - /// subscription. + /// Management credentials for Azure. /// - SubscriptionCloudCredentials Credentials { get; } + ServiceClientCredentials Credentials { get; } /// /// Gets subscription credentials which uniquely identify Microsoft @@ -94,10 +94,10 @@ public partial interface INetworkResourceProviderClient /// regular expression: ^[a-z][a-z0-9-]{1,61}[a-z0-9]$. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> CheckDnsNameAvailabilityWithHttpMessagesAsync(string location, string domainNameLabel = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); diff --git a/src/ResourceManagement/Network/NetworkManagement/Generated/INetworkSecurityGroupsOperations.cs b/src/ResourceManagement/Network/NetworkManagement/Generated/INetworkSecurityGroupsOperations.cs index 481db3b74c963..8a141a15a79ae 100644 --- a/src/ResourceManagement/Network/NetworkManagement/Generated/INetworkSecurityGroupsOperations.cs +++ b/src/ResourceManagement/Network/NetworkManagement/Generated/INetworkSecurityGroupsOperations.cs @@ -6,6 +6,7 @@ namespace Microsoft.Azure.Management.Network using System.Threading; using System.Threading.Tasks; using Microsoft.Rest; + using System.Linq; using Microsoft.Azure; using Models; @@ -24,10 +25,10 @@ public partial interface INetworkSecurityGroupsOperations /// The name of the network security group. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task DeleteWithHttpMessagesAsync(string resourceGroupName, string networkSecurityGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -41,10 +42,10 @@ public partial interface INetworkSecurityGroupsOperations /// The name of the network security group. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string networkSecurityGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -58,10 +59,10 @@ public partial interface INetworkSecurityGroupsOperations /// The name of the network security group. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> GetWithHttpMessagesAsync(string resourceGroupName, string networkSecurityGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -79,10 +80,10 @@ public partial interface INetworkSecurityGroupsOperations /// operation /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string networkSecurityGroupName, NetworkSecurityGroup parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -100,10 +101,10 @@ public partial interface INetworkSecurityGroupsOperations /// operation /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string networkSecurityGroupName, NetworkSecurityGroup parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -111,12 +112,12 @@ public partial interface INetworkSecurityGroupsOperations /// in a subscription /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListAllWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListAllWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// The list NetworkSecurityGroups returns all network security groups /// in a resource group @@ -125,39 +126,39 @@ public partial interface INetworkSecurityGroupsOperations /// The name of the resource group. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// The list NetworkSecurityGroups returns all network security groups /// in a subscription /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListAllNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListAllNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// The list NetworkSecurityGroups returns all network security groups /// in a resource group /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/src/ResourceManagement/Network/NetworkManagement/Generated/IPublicIpAddressesOperations.cs b/src/ResourceManagement/Network/NetworkManagement/Generated/IPublicIpAddressesOperations.cs index e1a4c96d401d6..bd73fb1434fe2 100644 --- a/src/ResourceManagement/Network/NetworkManagement/Generated/IPublicIpAddressesOperations.cs +++ b/src/ResourceManagement/Network/NetworkManagement/Generated/IPublicIpAddressesOperations.cs @@ -6,6 +6,7 @@ namespace Microsoft.Azure.Management.Network using System.Threading; using System.Threading.Tasks; using Microsoft.Rest; + using System.Linq; using Microsoft.Azure; using Models; @@ -24,10 +25,10 @@ public partial interface IPublicIpAddressesOperations /// The name of the subnet. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task DeleteWithHttpMessagesAsync(string resourceGroupName, string publicIpAddressName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -41,10 +42,10 @@ public partial interface IPublicIpAddressesOperations /// The name of the subnet. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string publicIpAddressName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -58,10 +59,10 @@ public partial interface IPublicIpAddressesOperations /// The name of the subnet. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> GetWithHttpMessagesAsync(string resourceGroupName, string publicIpAddressName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -78,10 +79,10 @@ public partial interface IPublicIpAddressesOperations /// Parameters supplied to the create/update PublicIPAddress operation /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string publicIpAddressName, PublicIpAddress parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -98,10 +99,10 @@ public partial interface IPublicIpAddressesOperations /// Parameters supplied to the create/update PublicIPAddress operation /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string publicIpAddressName, PublicIpAddress parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -109,12 +110,12 @@ public partial interface IPublicIpAddressesOperations /// publicIpAddresses in a subscription. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListAllWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListAllWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// The List publicIpAddress opertion retrieves all the /// publicIpAddresses in a resource group. @@ -123,39 +124,39 @@ public partial interface IPublicIpAddressesOperations /// The name of the resource group. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// The List publicIpAddress opertion retrieves all the /// publicIpAddresses in a subscription. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListAllNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListAllNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// The List publicIpAddress opertion retrieves all the /// publicIpAddresses in a resource group. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/src/ResourceManagement/Network/NetworkManagement/Generated/ISecurityRulesOperations.cs b/src/ResourceManagement/Network/NetworkManagement/Generated/ISecurityRulesOperations.cs index f8baba76a03bb..3362d775970a5 100644 --- a/src/ResourceManagement/Network/NetworkManagement/Generated/ISecurityRulesOperations.cs +++ b/src/ResourceManagement/Network/NetworkManagement/Generated/ISecurityRulesOperations.cs @@ -6,6 +6,7 @@ namespace Microsoft.Azure.Management.Network using System.Threading; using System.Threading.Tasks; using Microsoft.Rest; + using System.Linq; using Microsoft.Azure; using Models; @@ -27,10 +28,10 @@ public partial interface ISecurityRulesOperations /// The name of the security rule. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task DeleteWithHttpMessagesAsync(string resourceGroupName, string networkSecurityGroupName, string securityRuleName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -47,10 +48,10 @@ public partial interface ISecurityRulesOperations /// The name of the security rule. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string networkSecurityGroupName, string securityRuleName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -67,10 +68,10 @@ public partial interface ISecurityRulesOperations /// The name of the security rule. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> GetWithHttpMessagesAsync(string resourceGroupName, string networkSecurityGroupName, string securityRuleName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -91,10 +92,10 @@ public partial interface ISecurityRulesOperations /// operation /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string networkSecurityGroupName, string securityRuleName, SecurityRule securityRuleParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -115,10 +116,10 @@ public partial interface ISecurityRulesOperations /// operation /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string networkSecurityGroupName, string securityRuleName, SecurityRule securityRuleParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -132,25 +133,25 @@ public partial interface ISecurityRulesOperations /// The name of the network security group. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListWithHttpMessagesAsync(string resourceGroupName, string networkSecurityGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListWithHttpMessagesAsync(string resourceGroupName, string networkSecurityGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// The List network security rule opertion retrieves all the security /// rules in a network security group. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/src/ResourceManagement/Network/NetworkManagement/Generated/ISubnetsOperations.cs b/src/ResourceManagement/Network/NetworkManagement/Generated/ISubnetsOperations.cs index ab39c76c26b2e..a65c02dbcb1b6 100644 --- a/src/ResourceManagement/Network/NetworkManagement/Generated/ISubnetsOperations.cs +++ b/src/ResourceManagement/Network/NetworkManagement/Generated/ISubnetsOperations.cs @@ -6,6 +6,7 @@ namespace Microsoft.Azure.Management.Network using System.Threading; using System.Threading.Tasks; using Microsoft.Rest; + using System.Linq; using Microsoft.Azure; using Models; @@ -26,10 +27,10 @@ public partial interface ISubnetsOperations /// The name of the subnet. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task DeleteWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkName, string subnetName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -45,10 +46,10 @@ public partial interface ISubnetsOperations /// The name of the subnet. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkName, string subnetName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -65,10 +66,10 @@ public partial interface ISubnetsOperations /// The name of the subnet. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> GetWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkName, string subnetName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -88,10 +89,10 @@ public partial interface ISubnetsOperations /// Parameters supplied to the create/update Subnet operation /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkName, string subnetName, Subnet subnetParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -111,10 +112,10 @@ public partial interface ISubnetsOperations /// Parameters supplied to the create/update Subnet operation /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkName, string subnetName, Subnet subnetParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -128,25 +129,25 @@ public partial interface ISubnetsOperations /// The name of the virtual network. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// The List subnets opertion retrieves all the subnets in a virtual /// network. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/src/ResourceManagement/Network/NetworkManagement/Generated/IUsagesOperations.cs b/src/ResourceManagement/Network/NetworkManagement/Generated/IUsagesOperations.cs index 1df4fe53d2610..24876d7aff51b 100644 --- a/src/ResourceManagement/Network/NetworkManagement/Generated/IUsagesOperations.cs +++ b/src/ResourceManagement/Network/NetworkManagement/Generated/IUsagesOperations.cs @@ -6,6 +6,7 @@ namespace Microsoft.Azure.Management.Network using System.Threading; using System.Threading.Tasks; using Microsoft.Rest; + using System.Linq; using Microsoft.Azure; using Models; @@ -20,10 +21,10 @@ public partial interface IUsagesOperations /// The location upon which resource usage is queried. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> ListWithHttpMessagesAsync(string location, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } diff --git a/src/ResourceManagement/Network/NetworkManagement/Generated/IVirtualNetworkGatewayConnectionsOperations.cs b/src/ResourceManagement/Network/NetworkManagement/Generated/IVirtualNetworkGatewayConnectionsOperations.cs index 35c356679c418..ad67acd8f8a59 100644 --- a/src/ResourceManagement/Network/NetworkManagement/Generated/IVirtualNetworkGatewayConnectionsOperations.cs +++ b/src/ResourceManagement/Network/NetworkManagement/Generated/IVirtualNetworkGatewayConnectionsOperations.cs @@ -6,6 +6,7 @@ namespace Microsoft.Azure.Management.Network using System.Threading; using System.Threading.Tasks; using Microsoft.Rest; + using System.Linq; using Microsoft.Azure; using Models; @@ -29,10 +30,10 @@ public partial interface IVirtualNetworkGatewayConnectionsOperations /// Gateway connection operation through Network resource provider. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayConnectionName, VirtualNetworkGatewayConnection parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -51,10 +52,10 @@ public partial interface IVirtualNetworkGatewayConnectionsOperations /// Gateway connection operation through Network resource provider. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayConnectionName, VirtualNetworkGatewayConnection parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -69,10 +70,10 @@ public partial interface IVirtualNetworkGatewayConnectionsOperations /// The name of the virtual network gateway connection. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> GetWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -87,10 +88,10 @@ public partial interface IVirtualNetworkGatewayConnectionsOperations /// The name of the virtual network gateway connection. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task DeleteWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -105,10 +106,10 @@ public partial interface IVirtualNetworkGatewayConnectionsOperations /// The name of the virtual network gateway connection. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -123,10 +124,10 @@ public partial interface IVirtualNetworkGatewayConnectionsOperations /// The virtual network gateway connection shared key name. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> GetSharedKeyWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -146,10 +147,10 @@ public partial interface IVirtualNetworkGatewayConnectionsOperations /// conection Shared key operation throughNetwork resource provider. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> SetSharedKeyWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayConnectionName, ConnectionSharedKey parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -169,10 +170,10 @@ public partial interface IVirtualNetworkGatewayConnectionsOperations /// conection Shared key operation throughNetwork resource provider. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> BeginSetSharedKeyWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayConnectionName, ConnectionSharedKey parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -183,12 +184,12 @@ public partial interface IVirtualNetworkGatewayConnectionsOperations /// The name of the resource group. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// The VirtualNetworkGatewayConnectionResetSharedKey operation resets /// the virtual network gateway connection shared key for passed @@ -206,10 +207,10 @@ public partial interface IVirtualNetworkGatewayConnectionsOperations /// connection shared key operation through Network resource provider. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> ResetSharedKeyWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayConnectionName, ConnectionResetSharedKey parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -229,25 +230,25 @@ public partial interface IVirtualNetworkGatewayConnectionsOperations /// connection shared key operation through Network resource provider. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> BeginResetSharedKeyWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayConnectionName, ConnectionResetSharedKey parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// The List VirtualNetworkGatewayConnections operation retrieves all /// the virtual network gateways connections created. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/src/ResourceManagement/Network/NetworkManagement/Generated/IVirtualNetworkGatewaysOperations.cs b/src/ResourceManagement/Network/NetworkManagement/Generated/IVirtualNetworkGatewaysOperations.cs index 05c5dc6a36c12..f80375018425c 100644 --- a/src/ResourceManagement/Network/NetworkManagement/Generated/IVirtualNetworkGatewaysOperations.cs +++ b/src/ResourceManagement/Network/NetworkManagement/Generated/IVirtualNetworkGatewaysOperations.cs @@ -6,6 +6,7 @@ namespace Microsoft.Azure.Management.Network using System.Threading; using System.Threading.Tasks; using Microsoft.Rest; + using System.Linq; using Microsoft.Azure; using Models; @@ -29,10 +30,10 @@ public partial interface IVirtualNetworkGatewaysOperations /// Gateway operation through Network resource provider. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, VirtualNetworkGateway parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -51,10 +52,10 @@ public partial interface IVirtualNetworkGatewaysOperations /// Gateway operation through Network resource provider. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, VirtualNetworkGateway parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -69,10 +70,10 @@ public partial interface IVirtualNetworkGatewaysOperations /// The name of the virtual network gateway. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> GetWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -86,10 +87,10 @@ public partial interface IVirtualNetworkGatewaysOperations /// The name of the virtual network gateway. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task DeleteWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -103,10 +104,10 @@ public partial interface IVirtualNetworkGatewaysOperations /// The name of the virtual network gateway. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -117,12 +118,12 @@ public partial interface IVirtualNetworkGatewaysOperations /// The name of the resource group. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// The Reset VirtualNetworkGateway operation resets the primary of /// the virtual network gatewayin the specified resource group @@ -139,10 +140,10 @@ public partial interface IVirtualNetworkGatewaysOperations /// operation through Network resource provider. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> ResetWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, VirtualNetworkGateway parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -161,25 +162,25 @@ public partial interface IVirtualNetworkGatewaysOperations /// operation through Network resource provider. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> BeginResetWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, VirtualNetworkGateway parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// The List VirtualNetworkGateways opertion retrieves all the virtual /// network gateways stored. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/src/ResourceManagement/Network/NetworkManagement/Generated/IVirtualNetworksOperations.cs b/src/ResourceManagement/Network/NetworkManagement/Generated/IVirtualNetworksOperations.cs index 3197a759a0c8f..7d8903165f20f 100644 --- a/src/ResourceManagement/Network/NetworkManagement/Generated/IVirtualNetworksOperations.cs +++ b/src/ResourceManagement/Network/NetworkManagement/Generated/IVirtualNetworksOperations.cs @@ -6,6 +6,7 @@ namespace Microsoft.Azure.Management.Network using System.Threading; using System.Threading.Tasks; using Microsoft.Rest; + using System.Linq; using Microsoft.Azure; using Models; @@ -24,10 +25,10 @@ public partial interface IVirtualNetworksOperations /// The name of the virtual network. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task DeleteWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -41,10 +42,10 @@ public partial interface IVirtualNetworksOperations /// The name of the virtual network. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -58,10 +59,10 @@ public partial interface IVirtualNetworksOperations /// The name of the virtual network. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> GetWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -78,10 +79,10 @@ public partial interface IVirtualNetworksOperations /// Parameters supplied to the create/update Virtual Network operation /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkName, VirtualNetwork parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -98,10 +99,10 @@ public partial interface IVirtualNetworksOperations /// Parameters supplied to the create/update Virtual Network operation /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkName, VirtualNetwork parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -109,12 +110,12 @@ public partial interface IVirtualNetworksOperations /// subscription /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListAllWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListAllWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// The list VirtualNetwork returns all Virtual Networks in a resource /// group @@ -123,39 +124,39 @@ public partial interface IVirtualNetworksOperations /// The name of the resource group. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// The list VirtualNetwork returns all Virtual Networks in a /// subscription /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListAllNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListAllNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// The list VirtualNetwork returns all Virtual Networks in a resource /// group /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/src/ResourceManagement/Network/NetworkManagement/Generated/LoadBalancersOperations.cs b/src/ResourceManagement/Network/NetworkManagement/Generated/LoadBalancersOperations.cs index 1d912570c633d..8d0b110d4da32 100644 --- a/src/ResourceManagement/Network/NetworkManagement/Generated/LoadBalancersOperations.cs +++ b/src/ResourceManagement/Network/NetworkManagement/Generated/LoadBalancersOperations.cs @@ -11,6 +11,7 @@ namespace Microsoft.Azure.Management.Network using System.Threading.Tasks; using Microsoft.Rest; using Newtonsoft.Json; + using System.Linq; using Microsoft.Azure; using Models; @@ -42,10 +43,10 @@ internal LoadBalancersOperations(NetworkResourceProviderClient client) /// The name of the loadBalancer. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string loadBalancerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { @@ -174,6 +175,10 @@ internal LoadBalancersOperations(NetworkResourceProviderClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } if (shouldTrace) { ServiceClientTracing.Exit(invocationId, result); @@ -308,6 +313,10 @@ internal LoadBalancersOperations(NetworkResourceProviderClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { @@ -334,10 +343,10 @@ internal LoadBalancersOperations(NetworkResourceProviderClient client) /// Parameters supplied to the create/delete LoadBalancer operation /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string loadBalancerName, LoadBalancer parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { @@ -491,6 +500,10 @@ internal LoadBalancersOperations(NetworkResourceProviderClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "Created")) { @@ -520,7 +533,7 @@ internal LoadBalancersOperations(NetworkResourceProviderClient client) /// /// Cancellation token. /// - public async Task> ListAllWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListAllWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (this.Client.ApiVersion == null) { @@ -616,14 +629,18 @@ internal LoadBalancersOperations(NetworkResourceProviderClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { @@ -645,7 +662,7 @@ internal LoadBalancersOperations(NetworkResourceProviderClient client) /// /// Cancellation token. /// - public async Task> ListWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -747,14 +764,18 @@ internal LoadBalancersOperations(NetworkResourceProviderClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { @@ -767,7 +788,7 @@ internal LoadBalancersOperations(NetworkResourceProviderClient client) /// The List loadBalancer opertion retrieves all the loadbalancers in a /// subscription. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// @@ -776,11 +797,11 @@ internal LoadBalancersOperations(NetworkResourceProviderClient client) /// /// Cancellation token. /// - public async Task> ListAllNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListAllNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (nextLink == null) + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextLink"); + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing bool shouldTrace = ServiceClientTracing.IsEnabled; @@ -789,13 +810,13 @@ internal LoadBalancersOperations(NetworkResourceProviderClient client) { invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("nextLink", nextLink); + tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(invocationId, this, "ListAllNext", tracingParameters); } // Construct URL string url = "{nextLink}"; - url = url.Replace("{nextLink}", nextLink); + url = url.Replace("{nextLink}", nextPageLink); List queryParameters = new List(); if (queryParameters.Count > 0) { @@ -864,14 +885,18 @@ internal LoadBalancersOperations(NetworkResourceProviderClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { @@ -884,7 +909,7 @@ internal LoadBalancersOperations(NetworkResourceProviderClient client) /// The List loadBalancer opertion retrieves all the loadbalancers in a /// resource group. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// @@ -893,11 +918,11 @@ internal LoadBalancersOperations(NetworkResourceProviderClient client) /// /// Cancellation token. /// - public async Task> ListNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (nextLink == null) + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextLink"); + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing bool shouldTrace = ServiceClientTracing.IsEnabled; @@ -906,13 +931,13 @@ internal LoadBalancersOperations(NetworkResourceProviderClient client) { invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("nextLink", nextLink); + tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(invocationId, this, "ListNext", tracingParameters); } // Construct URL string url = "{nextLink}"; - url = url.Replace("{nextLink}", nextLink); + url = url.Replace("{nextLink}", nextPageLink); List queryParameters = new List(); if (queryParameters.Count > 0) { @@ -981,14 +1006,18 @@ internal LoadBalancersOperations(NetworkResourceProviderClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { diff --git a/src/ResourceManagement/Network/NetworkManagement/Generated/LoadBalancersOperationsExtensions.cs b/src/ResourceManagement/Network/NetworkManagement/Generated/LoadBalancersOperationsExtensions.cs index 3ac87b98cf28b..1150d324519f5 100644 --- a/src/ResourceManagement/Network/NetworkManagement/Generated/LoadBalancersOperationsExtensions.cs +++ b/src/ResourceManagement/Network/NetworkManagement/Generated/LoadBalancersOperationsExtensions.cs @@ -15,7 +15,7 @@ public static partial class LoadBalancersOperationsExtensions /// The delete loadbalancer operation deletes the specified loadbalancer. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -32,7 +32,7 @@ public static void Delete(this ILoadBalancersOperations operations, string resou /// The delete loadbalancer operation deletes the specified loadbalancer. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -52,7 +52,7 @@ public static void Delete(this ILoadBalancersOperations operations, string resou /// The delete loadbalancer operation deletes the specified loadbalancer. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -69,7 +69,7 @@ public static void BeginDelete(this ILoadBalancersOperations operations, string /// The delete loadbalancer operation deletes the specified loadbalancer. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -90,7 +90,7 @@ public static void BeginDelete(this ILoadBalancersOperations operations, string /// specified network interface. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -108,7 +108,7 @@ public static LoadBalancer Get(this ILoadBalancersOperations operations, string /// specified network interface. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -129,7 +129,7 @@ public static LoadBalancer Get(this ILoadBalancersOperations operations, string /// The Put LoadBalancer operation creates/updates a LoadBalancer /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -149,7 +149,7 @@ public static LoadBalancer CreateOrUpdate(this ILoadBalancersOperations operatio /// The Put LoadBalancer operation creates/updates a LoadBalancer /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -173,7 +173,7 @@ public static LoadBalancer CreateOrUpdate(this ILoadBalancersOperations operatio /// The Put LoadBalancer operation creates/updates a LoadBalancer /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -193,7 +193,7 @@ public static LoadBalancer BeginCreateOrUpdate(this ILoadBalancersOperations ope /// The Put LoadBalancer operation creates/updates a LoadBalancer /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -218,9 +218,9 @@ public static LoadBalancer BeginCreateOrUpdate(this ILoadBalancersOperations ope /// subscription. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - public static LoadBalancerListResult ListAll(this ILoadBalancersOperations operations) + public static Page ListAll(this ILoadBalancersOperations operations) { return Task.Factory.StartNew(s => ((ILoadBalancersOperations)s).ListAllAsync(), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } @@ -230,14 +230,14 @@ public static LoadBalancerListResult ListAll(this ILoadBalancersOperations opera /// subscription. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// Cancellation token. /// - public static async Task ListAllAsync( this ILoadBalancersOperations operations, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListAllAsync( this ILoadBalancersOperations operations, CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListAllWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListAllWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false); return result.Body; } @@ -246,12 +246,12 @@ public static LoadBalancerListResult ListAll(this ILoadBalancersOperations opera /// resource group. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. /// - public static LoadBalancerListResult List(this ILoadBalancersOperations operations, string resourceGroupName) + public static Page List(this ILoadBalancersOperations operations, string resourceGroupName) { return Task.Factory.StartNew(s => ((ILoadBalancersOperations)s).ListAsync(resourceGroupName), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } @@ -261,7 +261,7 @@ public static LoadBalancerListResult List(this ILoadBalancersOperations operatio /// resource group. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -269,9 +269,9 @@ public static LoadBalancerListResult List(this ILoadBalancersOperations operatio /// /// Cancellation token. /// - public static async Task ListAsync( this ILoadBalancersOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListAsync( this ILoadBalancersOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false); return result.Body; } @@ -280,14 +280,14 @@ public static LoadBalancerListResult List(this ILoadBalancersOperations operatio /// subscription. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// - public static LoadBalancerListResult ListAllNext(this ILoadBalancersOperations operations, string nextLink) + public static Page ListAllNext(this ILoadBalancersOperations operations, string nextPageLink) { - return Task.Factory.StartNew(s => ((ILoadBalancersOperations)s).ListAllNextAsync(nextLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + return Task.Factory.StartNew(s => ((ILoadBalancersOperations)s).ListAllNextAsync(nextPageLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } /// @@ -295,17 +295,17 @@ public static LoadBalancerListResult ListAllNext(this ILoadBalancersOperations o /// subscription. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// /// Cancellation token. /// - public static async Task ListAllNextAsync( this ILoadBalancersOperations operations, string nextLink, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListAllNextAsync( this ILoadBalancersOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListAllNextWithHttpMessagesAsync(nextLink, null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListAllNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false); return result.Body; } @@ -314,14 +314,14 @@ public static LoadBalancerListResult ListAllNext(this ILoadBalancersOperations o /// resource group. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// - public static LoadBalancerListResult ListNext(this ILoadBalancersOperations operations, string nextLink) + public static Page ListNext(this ILoadBalancersOperations operations, string nextPageLink) { - return Task.Factory.StartNew(s => ((ILoadBalancersOperations)s).ListNextAsync(nextLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + return Task.Factory.StartNew(s => ((ILoadBalancersOperations)s).ListNextAsync(nextPageLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } /// @@ -329,17 +329,17 @@ public static LoadBalancerListResult ListNext(this ILoadBalancersOperations oper /// resource group. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// /// Cancellation token. /// - public static async Task ListNextAsync( this ILoadBalancersOperations operations, string nextLink, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListNextAsync( this ILoadBalancersOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListNextWithHttpMessagesAsync(nextLink, null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false); return result.Body; } diff --git a/src/ResourceManagement/Network/NetworkManagement/Generated/LocalNetworkGatewaysOperations.cs b/src/ResourceManagement/Network/NetworkManagement/Generated/LocalNetworkGatewaysOperations.cs index b04c73a7b4ee4..01b17b7e1adf7 100644 --- a/src/ResourceManagement/Network/NetworkManagement/Generated/LocalNetworkGatewaysOperations.cs +++ b/src/ResourceManagement/Network/NetworkManagement/Generated/LocalNetworkGatewaysOperations.cs @@ -11,6 +11,7 @@ namespace Microsoft.Azure.Management.Network using System.Threading.Tasks; using Microsoft.Rest; using Newtonsoft.Json; + using System.Linq; using Microsoft.Azure; using Models; @@ -47,10 +48,10 @@ internal LocalNetworkGatewaysOperations(NetworkResourceProviderClient client) /// operation through Network resource provider. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string localNetworkGatewayName, LocalNetworkGateway parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { @@ -206,6 +207,10 @@ internal LocalNetworkGatewaysOperations(NetworkResourceProviderClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "Created")) { @@ -352,6 +357,10 @@ internal LocalNetworkGatewaysOperations(NetworkResourceProviderClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { @@ -376,10 +385,10 @@ internal LocalNetworkGatewaysOperations(NetworkResourceProviderClient client) /// The name of the local network gateway. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string localNetworkGatewayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { @@ -509,6 +518,10 @@ internal LocalNetworkGatewaysOperations(NetworkResourceProviderClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } if (shouldTrace) { ServiceClientTracing.Exit(invocationId, result); @@ -529,7 +542,7 @@ internal LocalNetworkGatewaysOperations(NetworkResourceProviderClient client) /// /// Cancellation token. /// - public async Task> ListWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -631,14 +644,18 @@ internal LocalNetworkGatewaysOperations(NetworkResourceProviderClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { @@ -651,7 +668,7 @@ internal LocalNetworkGatewaysOperations(NetworkResourceProviderClient client) /// The List LocalNetworkGateways opertion retrieves all the local network /// gateways stored. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// @@ -660,11 +677,11 @@ internal LocalNetworkGatewaysOperations(NetworkResourceProviderClient client) /// /// Cancellation token. /// - public async Task> ListNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (nextLink == null) + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextLink"); + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing bool shouldTrace = ServiceClientTracing.IsEnabled; @@ -673,13 +690,13 @@ internal LocalNetworkGatewaysOperations(NetworkResourceProviderClient client) { invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("nextLink", nextLink); + tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(invocationId, this, "ListNext", tracingParameters); } // Construct URL string url = "{nextLink}"; - url = url.Replace("{nextLink}", nextLink); + url = url.Replace("{nextLink}", nextPageLink); List queryParameters = new List(); if (queryParameters.Count > 0) { @@ -748,14 +765,18 @@ internal LocalNetworkGatewaysOperations(NetworkResourceProviderClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { diff --git a/src/ResourceManagement/Network/NetworkManagement/Generated/LocalNetworkGatewaysOperationsExtensions.cs b/src/ResourceManagement/Network/NetworkManagement/Generated/LocalNetworkGatewaysOperationsExtensions.cs index 26e9631ea3f91..d698a0acd2ec2 100644 --- a/src/ResourceManagement/Network/NetworkManagement/Generated/LocalNetworkGatewaysOperationsExtensions.cs +++ b/src/ResourceManagement/Network/NetworkManagement/Generated/LocalNetworkGatewaysOperationsExtensions.cs @@ -16,7 +16,7 @@ public static partial class LocalNetworkGatewaysOperationsExtensions /// gateway in the specified resource group through Network resource provider. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -38,7 +38,7 @@ public static LocalNetworkGateway CreateOrUpdate(this ILocalNetworkGatewaysOpera /// gateway in the specified resource group through Network resource provider. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -64,7 +64,7 @@ public static LocalNetworkGateway CreateOrUpdate(this ILocalNetworkGatewaysOpera /// gateway in the specified resource group through Network resource provider. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -86,7 +86,7 @@ public static LocalNetworkGateway BeginCreateOrUpdate(this ILocalNetworkGateways /// gateway in the specified resource group through Network resource provider. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -112,7 +112,7 @@ public static LocalNetworkGateway BeginCreateOrUpdate(this ILocalNetworkGateways /// specified local network gateway through Network resource provider. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -130,7 +130,7 @@ public static LocalNetworkGateway Get(this ILocalNetworkGatewaysOperations opera /// specified local network gateway through Network resource provider. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -152,7 +152,7 @@ public static LocalNetworkGateway Get(this ILocalNetworkGatewaysOperations opera /// network Gateway through Network resource provider. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -170,7 +170,7 @@ public static void Delete(this ILocalNetworkGatewaysOperations operations, strin /// network Gateway through Network resource provider. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -191,7 +191,7 @@ public static void Delete(this ILocalNetworkGatewaysOperations operations, strin /// network Gateway through Network resource provider. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -209,7 +209,7 @@ public static void BeginDelete(this ILocalNetworkGatewaysOperations operations, /// network Gateway through Network resource provider. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -230,12 +230,12 @@ public static void BeginDelete(this ILocalNetworkGatewaysOperations operations, /// gateways stored. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. /// - public static LocalNetworkGatewayListResult List(this ILocalNetworkGatewaysOperations operations, string resourceGroupName) + public static Page List(this ILocalNetworkGatewaysOperations operations, string resourceGroupName) { return Task.Factory.StartNew(s => ((ILocalNetworkGatewaysOperations)s).ListAsync(resourceGroupName), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } @@ -245,7 +245,7 @@ public static LocalNetworkGatewayListResult List(this ILocalNetworkGatewaysOpera /// gateways stored. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -253,9 +253,9 @@ public static LocalNetworkGatewayListResult List(this ILocalNetworkGatewaysOpera /// /// Cancellation token. /// - public static async Task ListAsync( this ILocalNetworkGatewaysOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListAsync( this ILocalNetworkGatewaysOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false); return result.Body; } @@ -264,14 +264,14 @@ public static LocalNetworkGatewayListResult List(this ILocalNetworkGatewaysOpera /// gateways stored. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// - public static LocalNetworkGatewayListResult ListNext(this ILocalNetworkGatewaysOperations operations, string nextLink) + public static Page ListNext(this ILocalNetworkGatewaysOperations operations, string nextPageLink) { - return Task.Factory.StartNew(s => ((ILocalNetworkGatewaysOperations)s).ListNextAsync(nextLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + return Task.Factory.StartNew(s => ((ILocalNetworkGatewaysOperations)s).ListNextAsync(nextPageLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } /// @@ -279,17 +279,17 @@ public static LocalNetworkGatewayListResult ListNext(this ILocalNetworkGatewaysO /// gateways stored. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// /// Cancellation token. /// - public static async Task ListNextAsync( this ILocalNetworkGatewaysOperations operations, string nextLink, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListNextAsync( this ILocalNetworkGatewaysOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListNextWithHttpMessagesAsync(nextLink, null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false); return result.Body; } diff --git a/src/ResourceManagement/Network/NetworkManagement/Generated/Models/ApplicationGatewayCookieBasedAffinity.cs b/src/ResourceManagement/Network/NetworkManagement/Generated/Models/ApplicationGatewayCookieBasedAffinity.cs index a0114db32adde..40caf491fc35c 100644 --- a/src/ResourceManagement/Network/NetworkManagement/Generated/Models/ApplicationGatewayCookieBasedAffinity.cs +++ b/src/ResourceManagement/Network/NetworkManagement/Generated/Models/ApplicationGatewayCookieBasedAffinity.cs @@ -5,7 +5,7 @@ namespace Microsoft.Azure.Management.Network.Models using System.Runtime.Serialization; /// - /// Defines values for ApplicationGatewayCookieBasedAffinity + /// Defines values for ApplicationGatewayCookieBasedAffinity. /// [JsonConverter(typeof(StringEnumConverter))] public enum ApplicationGatewayCookieBasedAffinity diff --git a/src/ResourceManagement/Network/NetworkManagement/Generated/Models/ApplicationGatewayOperationalState.cs b/src/ResourceManagement/Network/NetworkManagement/Generated/Models/ApplicationGatewayOperationalState.cs index b94a659269e63..7d8d059da7513 100644 --- a/src/ResourceManagement/Network/NetworkManagement/Generated/Models/ApplicationGatewayOperationalState.cs +++ b/src/ResourceManagement/Network/NetworkManagement/Generated/Models/ApplicationGatewayOperationalState.cs @@ -5,7 +5,7 @@ namespace Microsoft.Azure.Management.Network.Models using System.Runtime.Serialization; /// - /// Defines values for ApplicationGatewayOperationalState + /// Defines values for ApplicationGatewayOperationalState. /// [JsonConverter(typeof(StringEnumConverter))] public enum ApplicationGatewayOperationalState diff --git a/src/ResourceManagement/Network/NetworkManagement/Generated/Models/ApplicationGatewayProtocol.cs b/src/ResourceManagement/Network/NetworkManagement/Generated/Models/ApplicationGatewayProtocol.cs index 808fa91064aa9..4ac0b3cbe2e84 100644 --- a/src/ResourceManagement/Network/NetworkManagement/Generated/Models/ApplicationGatewayProtocol.cs +++ b/src/ResourceManagement/Network/NetworkManagement/Generated/Models/ApplicationGatewayProtocol.cs @@ -5,7 +5,7 @@ namespace Microsoft.Azure.Management.Network.Models using System.Runtime.Serialization; /// - /// Defines values for ApplicationGatewayProtocol + /// Defines values for ApplicationGatewayProtocol. /// [JsonConverter(typeof(StringEnumConverter))] public enum ApplicationGatewayProtocol diff --git a/src/ResourceManagement/Network/NetworkManagement/Generated/Models/ApplicationGatewayRequestRoutingRuleType.cs b/src/ResourceManagement/Network/NetworkManagement/Generated/Models/ApplicationGatewayRequestRoutingRuleType.cs index d9b2846479143..ab4ebae49f319 100644 --- a/src/ResourceManagement/Network/NetworkManagement/Generated/Models/ApplicationGatewayRequestRoutingRuleType.cs +++ b/src/ResourceManagement/Network/NetworkManagement/Generated/Models/ApplicationGatewayRequestRoutingRuleType.cs @@ -5,7 +5,7 @@ namespace Microsoft.Azure.Management.Network.Models using System.Runtime.Serialization; /// - /// Defines values for ApplicationGatewayRequestRoutingRuleType + /// Defines values for ApplicationGatewayRequestRoutingRuleType. /// [JsonConverter(typeof(StringEnumConverter))] public enum ApplicationGatewayRequestRoutingRuleType diff --git a/src/ResourceManagement/Network/NetworkManagement/Generated/Models/ApplicationGatewaySkuName.cs b/src/ResourceManagement/Network/NetworkManagement/Generated/Models/ApplicationGatewaySkuName.cs index f15b51a1aff83..4d81cb4b2c64b 100644 --- a/src/ResourceManagement/Network/NetworkManagement/Generated/Models/ApplicationGatewaySkuName.cs +++ b/src/ResourceManagement/Network/NetworkManagement/Generated/Models/ApplicationGatewaySkuName.cs @@ -5,7 +5,7 @@ namespace Microsoft.Azure.Management.Network.Models using System.Runtime.Serialization; /// - /// Defines values for ApplicationGatewaySkuName + /// Defines values for ApplicationGatewaySkuName. /// [JsonConverter(typeof(StringEnumConverter))] public enum ApplicationGatewaySkuName diff --git a/src/ResourceManagement/Network/NetworkManagement/Generated/Models/ApplicationGatewayTier.cs b/src/ResourceManagement/Network/NetworkManagement/Generated/Models/ApplicationGatewayTier.cs index 65ae1ce2f6642..e9b1e6a0631f1 100644 --- a/src/ResourceManagement/Network/NetworkManagement/Generated/Models/ApplicationGatewayTier.cs +++ b/src/ResourceManagement/Network/NetworkManagement/Generated/Models/ApplicationGatewayTier.cs @@ -5,7 +5,7 @@ namespace Microsoft.Azure.Management.Network.Models using System.Runtime.Serialization; /// - /// Defines values for ApplicationGatewayTier + /// Defines values for ApplicationGatewayTier. /// [JsonConverter(typeof(StringEnumConverter))] public enum ApplicationGatewayTier diff --git a/src/ResourceManagement/Network/NetworkManagement/Generated/Models/IpAllocationMethod.cs b/src/ResourceManagement/Network/NetworkManagement/Generated/Models/IpAllocationMethod.cs index 73d7ad08e2849..d345d39470d24 100644 --- a/src/ResourceManagement/Network/NetworkManagement/Generated/Models/IpAllocationMethod.cs +++ b/src/ResourceManagement/Network/NetworkManagement/Generated/Models/IpAllocationMethod.cs @@ -5,7 +5,7 @@ namespace Microsoft.Azure.Management.Network.Models using System.Runtime.Serialization; /// - /// Defines values for IpAllocationMethod + /// Defines values for IpAllocationMethod. /// [JsonConverter(typeof(StringEnumConverter))] public enum IpAllocationMethod diff --git a/src/ResourceManagement/Network/NetworkManagement/Generated/Models/LoadDistribution.cs b/src/ResourceManagement/Network/NetworkManagement/Generated/Models/LoadDistribution.cs index 489b700fe4095..597b883dc88ac 100644 --- a/src/ResourceManagement/Network/NetworkManagement/Generated/Models/LoadDistribution.cs +++ b/src/ResourceManagement/Network/NetworkManagement/Generated/Models/LoadDistribution.cs @@ -5,7 +5,7 @@ namespace Microsoft.Azure.Management.Network.Models using System.Runtime.Serialization; /// - /// Defines values for LoadDistribution + /// Defines values for LoadDistribution. /// [JsonConverter(typeof(StringEnumConverter))] public enum LoadDistribution diff --git a/src/ResourceManagement/Network/NetworkManagement/Generated/Models/OperationStatus.cs b/src/ResourceManagement/Network/NetworkManagement/Generated/Models/OperationStatus.cs index ecc47fa8197a4..94ec03fd956ef 100644 --- a/src/ResourceManagement/Network/NetworkManagement/Generated/Models/OperationStatus.cs +++ b/src/ResourceManagement/Network/NetworkManagement/Generated/Models/OperationStatus.cs @@ -5,7 +5,7 @@ namespace Microsoft.Azure.Management.Network.Models using System.Runtime.Serialization; /// - /// Defines values for OperationStatus + /// Defines values for OperationStatus. /// [JsonConverter(typeof(StringEnumConverter))] public enum OperationStatus diff --git a/src/ResourceManagement/Network/NetworkManagement/Generated/Models/ProbeProtocol.cs b/src/ResourceManagement/Network/NetworkManagement/Generated/Models/ProbeProtocol.cs index e1adff3cee771..43cbeb706f032 100644 --- a/src/ResourceManagement/Network/NetworkManagement/Generated/Models/ProbeProtocol.cs +++ b/src/ResourceManagement/Network/NetworkManagement/Generated/Models/ProbeProtocol.cs @@ -5,7 +5,7 @@ namespace Microsoft.Azure.Management.Network.Models using System.Runtime.Serialization; /// - /// Defines values for ProbeProtocol + /// Defines values for ProbeProtocol. /// [JsonConverter(typeof(StringEnumConverter))] public enum ProbeProtocol diff --git a/src/ResourceManagement/Network/NetworkManagement/Generated/Models/SecurityRuleAccess.cs b/src/ResourceManagement/Network/NetworkManagement/Generated/Models/SecurityRuleAccess.cs index fc3bcbed6fe00..d0a0b23cc8213 100644 --- a/src/ResourceManagement/Network/NetworkManagement/Generated/Models/SecurityRuleAccess.cs +++ b/src/ResourceManagement/Network/NetworkManagement/Generated/Models/SecurityRuleAccess.cs @@ -5,7 +5,7 @@ namespace Microsoft.Azure.Management.Network.Models using System.Runtime.Serialization; /// - /// Defines values for SecurityRuleAccess + /// Defines values for SecurityRuleAccess. /// [JsonConverter(typeof(StringEnumConverter))] public enum SecurityRuleAccess diff --git a/src/ResourceManagement/Network/NetworkManagement/Generated/Models/SecurityRuleDirection.cs b/src/ResourceManagement/Network/NetworkManagement/Generated/Models/SecurityRuleDirection.cs index 46eac9c1127d9..1eb733f36e6a3 100644 --- a/src/ResourceManagement/Network/NetworkManagement/Generated/Models/SecurityRuleDirection.cs +++ b/src/ResourceManagement/Network/NetworkManagement/Generated/Models/SecurityRuleDirection.cs @@ -5,7 +5,7 @@ namespace Microsoft.Azure.Management.Network.Models using System.Runtime.Serialization; /// - /// Defines values for SecurityRuleDirection + /// Defines values for SecurityRuleDirection. /// [JsonConverter(typeof(StringEnumConverter))] public enum SecurityRuleDirection diff --git a/src/ResourceManagement/Network/NetworkManagement/Generated/Models/SecurityRuleProtocol.cs b/src/ResourceManagement/Network/NetworkManagement/Generated/Models/SecurityRuleProtocol.cs index d0d51988ab78b..81b260d17db39 100644 --- a/src/ResourceManagement/Network/NetworkManagement/Generated/Models/SecurityRuleProtocol.cs +++ b/src/ResourceManagement/Network/NetworkManagement/Generated/Models/SecurityRuleProtocol.cs @@ -5,7 +5,7 @@ namespace Microsoft.Azure.Management.Network.Models using System.Runtime.Serialization; /// - /// Defines values for SecurityRuleProtocol + /// Defines values for SecurityRuleProtocol. /// [JsonConverter(typeof(StringEnumConverter))] public enum SecurityRuleProtocol diff --git a/src/ResourceManagement/Network/NetworkManagement/Generated/Models/TransportProtocol.cs b/src/ResourceManagement/Network/NetworkManagement/Generated/Models/TransportProtocol.cs index b4ad862c7694c..20d0bbc03b391 100644 --- a/src/ResourceManagement/Network/NetworkManagement/Generated/Models/TransportProtocol.cs +++ b/src/ResourceManagement/Network/NetworkManagement/Generated/Models/TransportProtocol.cs @@ -5,7 +5,7 @@ namespace Microsoft.Azure.Management.Network.Models using System.Runtime.Serialization; /// - /// Defines values for TransportProtocol + /// Defines values for TransportProtocol. /// [JsonConverter(typeof(StringEnumConverter))] public enum TransportProtocol diff --git a/src/ResourceManagement/Network/NetworkManagement/Generated/Models/UsageUnit.cs b/src/ResourceManagement/Network/NetworkManagement/Generated/Models/UsageUnit.cs index 030485314a0df..e7181960f17bd 100644 --- a/src/ResourceManagement/Network/NetworkManagement/Generated/Models/UsageUnit.cs +++ b/src/ResourceManagement/Network/NetworkManagement/Generated/Models/UsageUnit.cs @@ -5,7 +5,7 @@ namespace Microsoft.Azure.Management.Network.Models using System.Runtime.Serialization; /// - /// Defines values for UsageUnit + /// Defines values for UsageUnit. /// [JsonConverter(typeof(StringEnumConverter))] public enum UsageUnit diff --git a/src/ResourceManagement/Network/NetworkManagement/Generated/Models/VirtualNetworkGatewayConnectionType.cs b/src/ResourceManagement/Network/NetworkManagement/Generated/Models/VirtualNetworkGatewayConnectionType.cs index 0a3e471a0486b..c276d4e2c10d7 100644 --- a/src/ResourceManagement/Network/NetworkManagement/Generated/Models/VirtualNetworkGatewayConnectionType.cs +++ b/src/ResourceManagement/Network/NetworkManagement/Generated/Models/VirtualNetworkGatewayConnectionType.cs @@ -5,7 +5,7 @@ namespace Microsoft.Azure.Management.Network.Models using System.Runtime.Serialization; /// - /// Defines values for VirtualNetworkGatewayConnectionType + /// Defines values for VirtualNetworkGatewayConnectionType. /// [JsonConverter(typeof(StringEnumConverter))] public enum VirtualNetworkGatewayConnectionType diff --git a/src/ResourceManagement/Network/NetworkManagement/Generated/Models/VirtualNetworkGatewayType.cs b/src/ResourceManagement/Network/NetworkManagement/Generated/Models/VirtualNetworkGatewayType.cs index 0ad73889cc9b4..8e07f0a45ddbf 100644 --- a/src/ResourceManagement/Network/NetworkManagement/Generated/Models/VirtualNetworkGatewayType.cs +++ b/src/ResourceManagement/Network/NetworkManagement/Generated/Models/VirtualNetworkGatewayType.cs @@ -5,7 +5,7 @@ namespace Microsoft.Azure.Management.Network.Models using System.Runtime.Serialization; /// - /// Defines values for VirtualNetworkGatewayType + /// Defines values for VirtualNetworkGatewayType. /// [JsonConverter(typeof(StringEnumConverter))] public enum VirtualNetworkGatewayType diff --git a/src/ResourceManagement/Network/NetworkManagement/Generated/Models/VpnType.cs b/src/ResourceManagement/Network/NetworkManagement/Generated/Models/VpnType.cs index 011a81c13ce37..268bc3f3e7584 100644 --- a/src/ResourceManagement/Network/NetworkManagement/Generated/Models/VpnType.cs +++ b/src/ResourceManagement/Network/NetworkManagement/Generated/Models/VpnType.cs @@ -5,7 +5,7 @@ namespace Microsoft.Azure.Management.Network.Models using System.Runtime.Serialization; /// - /// Defines values for VpnType + /// Defines values for VpnType. /// [JsonConverter(typeof(StringEnumConverter))] public enum VpnType diff --git a/src/ResourceManagement/Network/NetworkManagement/Generated/NetworkInterfacesOperations.cs b/src/ResourceManagement/Network/NetworkManagement/Generated/NetworkInterfacesOperations.cs index 14d22124c1d0b..372bf90930c19 100644 --- a/src/ResourceManagement/Network/NetworkManagement/Generated/NetworkInterfacesOperations.cs +++ b/src/ResourceManagement/Network/NetworkManagement/Generated/NetworkInterfacesOperations.cs @@ -11,6 +11,7 @@ namespace Microsoft.Azure.Management.Network using System.Threading.Tasks; using Microsoft.Rest; using Newtonsoft.Json; + using System.Linq; using Microsoft.Azure; using Models; @@ -42,10 +43,10 @@ internal NetworkInterfacesOperations(NetworkResourceProviderClient client) /// The name of the network interface. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string networkInterfaceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { @@ -174,6 +175,10 @@ internal NetworkInterfacesOperations(NetworkResourceProviderClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } if (shouldTrace) { ServiceClientTracing.Exit(invocationId, result); @@ -308,6 +313,10 @@ internal NetworkInterfacesOperations(NetworkResourceProviderClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { @@ -334,10 +343,10 @@ internal NetworkInterfacesOperations(NetworkResourceProviderClient client) /// Parameters supplied to the create/update NetworkInterface operation /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string networkInterfaceName, NetworkInterface parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { @@ -491,6 +500,10 @@ internal NetworkInterfacesOperations(NetworkResourceProviderClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "Created")) { @@ -520,7 +533,7 @@ internal NetworkInterfacesOperations(NetworkResourceProviderClient client) /// /// Cancellation token. /// - public async Task> ListAllWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListAllWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (this.Client.ApiVersion == null) { @@ -616,14 +629,18 @@ internal NetworkInterfacesOperations(NetworkResourceProviderClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { @@ -645,7 +662,7 @@ internal NetworkInterfacesOperations(NetworkResourceProviderClient client) /// /// Cancellation token. /// - public async Task> ListWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -747,14 +764,18 @@ internal NetworkInterfacesOperations(NetworkResourceProviderClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { @@ -767,7 +788,7 @@ internal NetworkInterfacesOperations(NetworkResourceProviderClient client) /// The List networkInterfaces opertion retrieves all the networkInterfaces in /// a subscription. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// @@ -776,11 +797,11 @@ internal NetworkInterfacesOperations(NetworkResourceProviderClient client) /// /// Cancellation token. /// - public async Task> ListAllNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListAllNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (nextLink == null) + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextLink"); + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing bool shouldTrace = ServiceClientTracing.IsEnabled; @@ -789,13 +810,13 @@ internal NetworkInterfacesOperations(NetworkResourceProviderClient client) { invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("nextLink", nextLink); + tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(invocationId, this, "ListAllNext", tracingParameters); } // Construct URL string url = "{nextLink}"; - url = url.Replace("{nextLink}", nextLink); + url = url.Replace("{nextLink}", nextPageLink); List queryParameters = new List(); if (queryParameters.Count > 0) { @@ -864,14 +885,18 @@ internal NetworkInterfacesOperations(NetworkResourceProviderClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { @@ -884,7 +909,7 @@ internal NetworkInterfacesOperations(NetworkResourceProviderClient client) /// The List networkInterfaces opertion retrieves all the networkInterfaces in /// a resource group. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// @@ -893,11 +918,11 @@ internal NetworkInterfacesOperations(NetworkResourceProviderClient client) /// /// Cancellation token. /// - public async Task> ListNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (nextLink == null) + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextLink"); + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing bool shouldTrace = ServiceClientTracing.IsEnabled; @@ -906,13 +931,13 @@ internal NetworkInterfacesOperations(NetworkResourceProviderClient client) { invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("nextLink", nextLink); + tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(invocationId, this, "ListNext", tracingParameters); } // Construct URL string url = "{nextLink}"; - url = url.Replace("{nextLink}", nextLink); + url = url.Replace("{nextLink}", nextPageLink); List queryParameters = new List(); if (queryParameters.Count > 0) { @@ -981,14 +1006,18 @@ internal NetworkInterfacesOperations(NetworkResourceProviderClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { diff --git a/src/ResourceManagement/Network/NetworkManagement/Generated/NetworkInterfacesOperationsExtensions.cs b/src/ResourceManagement/Network/NetworkManagement/Generated/NetworkInterfacesOperationsExtensions.cs index 91765b59ed06b..a105ea030423b 100644 --- a/src/ResourceManagement/Network/NetworkManagement/Generated/NetworkInterfacesOperationsExtensions.cs +++ b/src/ResourceManagement/Network/NetworkManagement/Generated/NetworkInterfacesOperationsExtensions.cs @@ -15,7 +15,7 @@ public static partial class NetworkInterfacesOperationsExtensions /// The delete netwokInterface operation deletes the specified netwokInterface. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -32,7 +32,7 @@ public static void Delete(this INetworkInterfacesOperations operations, string r /// The delete netwokInterface operation deletes the specified netwokInterface. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -52,7 +52,7 @@ public static void Delete(this INetworkInterfacesOperations operations, string r /// The delete netwokInterface operation deletes the specified netwokInterface. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -69,7 +69,7 @@ public static void BeginDelete(this INetworkInterfacesOperations operations, str /// The delete netwokInterface operation deletes the specified netwokInterface. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -90,7 +90,7 @@ public static void BeginDelete(this INetworkInterfacesOperations operations, str /// specified network interface. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -108,7 +108,7 @@ public static NetworkInterface Get(this INetworkInterfacesOperations operations, /// specified network interface. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -129,7 +129,7 @@ public static NetworkInterface Get(this INetworkInterfacesOperations operations, /// The Put NetworkInterface operation creates/updates a networkInterface /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -149,7 +149,7 @@ public static NetworkInterface CreateOrUpdate(this INetworkInterfacesOperations /// The Put NetworkInterface operation creates/updates a networkInterface /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -173,7 +173,7 @@ public static NetworkInterface CreateOrUpdate(this INetworkInterfacesOperations /// The Put NetworkInterface operation creates/updates a networkInterface /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -193,7 +193,7 @@ public static NetworkInterface BeginCreateOrUpdate(this INetworkInterfacesOperat /// The Put NetworkInterface operation creates/updates a networkInterface /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -218,9 +218,9 @@ public static NetworkInterface BeginCreateOrUpdate(this INetworkInterfacesOperat /// a subscription. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - public static NetworkInterfaceListResult ListAll(this INetworkInterfacesOperations operations) + public static Page ListAll(this INetworkInterfacesOperations operations) { return Task.Factory.StartNew(s => ((INetworkInterfacesOperations)s).ListAllAsync(), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } @@ -230,14 +230,14 @@ public static NetworkInterfaceListResult ListAll(this INetworkInterfacesOperatio /// a subscription. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// Cancellation token. /// - public static async Task ListAllAsync( this INetworkInterfacesOperations operations, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListAllAsync( this INetworkInterfacesOperations operations, CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListAllWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListAllWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false); return result.Body; } @@ -246,12 +246,12 @@ public static NetworkInterfaceListResult ListAll(this INetworkInterfacesOperatio /// a resource group. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. /// - public static NetworkInterfaceListResult List(this INetworkInterfacesOperations operations, string resourceGroupName) + public static Page List(this INetworkInterfacesOperations operations, string resourceGroupName) { return Task.Factory.StartNew(s => ((INetworkInterfacesOperations)s).ListAsync(resourceGroupName), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } @@ -261,7 +261,7 @@ public static NetworkInterfaceListResult List(this INetworkInterfacesOperations /// a resource group. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -269,9 +269,9 @@ public static NetworkInterfaceListResult List(this INetworkInterfacesOperations /// /// Cancellation token. /// - public static async Task ListAsync( this INetworkInterfacesOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListAsync( this INetworkInterfacesOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false); return result.Body; } @@ -280,14 +280,14 @@ public static NetworkInterfaceListResult List(this INetworkInterfacesOperations /// a subscription. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// - public static NetworkInterfaceListResult ListAllNext(this INetworkInterfacesOperations operations, string nextLink) + public static Page ListAllNext(this INetworkInterfacesOperations operations, string nextPageLink) { - return Task.Factory.StartNew(s => ((INetworkInterfacesOperations)s).ListAllNextAsync(nextLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + return Task.Factory.StartNew(s => ((INetworkInterfacesOperations)s).ListAllNextAsync(nextPageLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } /// @@ -295,17 +295,17 @@ public static NetworkInterfaceListResult ListAllNext(this INetworkInterfacesOper /// a subscription. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// /// Cancellation token. /// - public static async Task ListAllNextAsync( this INetworkInterfacesOperations operations, string nextLink, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListAllNextAsync( this INetworkInterfacesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListAllNextWithHttpMessagesAsync(nextLink, null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListAllNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false); return result.Body; } @@ -314,14 +314,14 @@ public static NetworkInterfaceListResult ListAllNext(this INetworkInterfacesOper /// a resource group. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// - public static NetworkInterfaceListResult ListNext(this INetworkInterfacesOperations operations, string nextLink) + public static Page ListNext(this INetworkInterfacesOperations operations, string nextPageLink) { - return Task.Factory.StartNew(s => ((INetworkInterfacesOperations)s).ListNextAsync(nextLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + return Task.Factory.StartNew(s => ((INetworkInterfacesOperations)s).ListNextAsync(nextPageLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } /// @@ -329,17 +329,17 @@ public static NetworkInterfaceListResult ListNext(this INetworkInterfacesOperati /// a resource group. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// /// Cancellation token. /// - public static async Task ListNextAsync( this INetworkInterfacesOperations operations, string nextLink, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListNextAsync( this INetworkInterfacesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListNextWithHttpMessagesAsync(nextLink, null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false); return result.Body; } diff --git a/src/ResourceManagement/Network/NetworkManagement/Generated/NetworkResourceProviderClient.cs b/src/ResourceManagement/Network/NetworkManagement/Generated/NetworkResourceProviderClient.cs index d06e8c89a0398..3fd7430c357be 100644 --- a/src/ResourceManagement/Network/NetworkManagement/Generated/NetworkResourceProviderClient.cs +++ b/src/ResourceManagement/Network/NetworkManagement/Generated/NetworkResourceProviderClient.cs @@ -13,6 +13,7 @@ namespace Microsoft.Azure.Management.Network using Microsoft.Rest; using Microsoft.Rest.Serialization; using Newtonsoft.Json; + using System.Linq; using Microsoft.Azure; using Models; @@ -36,10 +37,9 @@ public partial class NetworkResourceProviderClient : ServiceClient - /// Subscription credentials which uniquely identify Microsoft Azure - /// subscription. + /// Management credentials for Azure. /// - public SubscriptionCloudCredentials Credentials { get; private set; } + public ServiceClientCredentials Credentials { get; private set; } /// /// Gets subscription credentials which uniquely identify Microsoft @@ -145,13 +145,13 @@ public NetworkResourceProviderClient(Uri baseUri, params DelegatingHandler[] han /// Initializes a new instance of the NetworkResourceProviderClient class. /// /// - /// Required. Subscription credentials which uniquely identify Microsoft Azure subscription. + /// Required. Management credentials for Azure. /// /// /// Optional. The set of delegating handlers to insert in the http /// client pipeline. /// - public NetworkResourceProviderClient(SubscriptionCloudCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) + public NetworkResourceProviderClient(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) { if (credentials == null) { @@ -167,13 +167,13 @@ public NetworkResourceProviderClient(SubscriptionCloudCredentials credentials, p /// Optional. The base URI of the service. /// /// - /// Required. Subscription credentials which uniquely identify Microsoft Azure subscription. + /// Required. Management credentials for Azure. /// /// /// Optional. The set of delegating handlers to insert in the http /// client pipeline. /// - public NetworkResourceProviderClient(Uri baseUri, SubscriptionCloudCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) + public NetworkResourceProviderClient(Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) { @@ -207,10 +207,6 @@ private void Initialize() this.BaseUri = new Uri("https://management.azure.com"); this.ApiVersion = "2015-05-01-preview"; this.AcceptLanguage = "en-US"; - if (this.Credentials != null) - { - this.Credentials.InitializeServiceClient(this); - } SerializationSettings = new JsonSerializerSettings { Formatting = Formatting.Indented, @@ -357,6 +353,10 @@ private void Initialize() var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { diff --git a/src/ResourceManagement/Network/NetworkManagement/Generated/NetworkResourceProviderClientExtensions.cs b/src/ResourceManagement/Network/NetworkManagement/Generated/NetworkResourceProviderClientExtensions.cs index 0481b9ef9b870..39f73e25fe2af 100644 --- a/src/ResourceManagement/Network/NetworkManagement/Generated/NetworkResourceProviderClientExtensions.cs +++ b/src/ResourceManagement/Network/NetworkManagement/Generated/NetworkResourceProviderClientExtensions.cs @@ -15,7 +15,7 @@ public static partial class NetworkResourceProviderClientExtensions /// Checks whether a domain name in the cloudapp.net zone is available for use. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The location of the domain name @@ -33,7 +33,7 @@ public static partial class NetworkResourceProviderClientExtensions /// Checks whether a domain name in the cloudapp.net zone is available for use. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The location of the domain name diff --git a/src/ResourceManagement/Network/NetworkManagement/Generated/NetworkSecurityGroupsOperations.cs b/src/ResourceManagement/Network/NetworkManagement/Generated/NetworkSecurityGroupsOperations.cs index 7c6e7eac3eec4..6ba76ba5b9ea6 100644 --- a/src/ResourceManagement/Network/NetworkManagement/Generated/NetworkSecurityGroupsOperations.cs +++ b/src/ResourceManagement/Network/NetworkManagement/Generated/NetworkSecurityGroupsOperations.cs @@ -11,6 +11,7 @@ namespace Microsoft.Azure.Management.Network using System.Threading.Tasks; using Microsoft.Rest; using Newtonsoft.Json; + using System.Linq; using Microsoft.Azure; using Models; @@ -43,10 +44,10 @@ internal NetworkSecurityGroupsOperations(NetworkResourceProviderClient client) /// The name of the network security group. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string networkSecurityGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { @@ -176,6 +177,10 @@ internal NetworkSecurityGroupsOperations(NetworkResourceProviderClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } if (shouldTrace) { ServiceClientTracing.Exit(invocationId, result); @@ -310,6 +315,10 @@ internal NetworkSecurityGroupsOperations(NetworkResourceProviderClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { @@ -337,10 +346,10 @@ internal NetworkSecurityGroupsOperations(NetworkResourceProviderClient client) /// Parameters supplied to the create/update Network Security Group operation /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string networkSecurityGroupName, NetworkSecurityGroup parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { @@ -495,6 +504,10 @@ internal NetworkSecurityGroupsOperations(NetworkResourceProviderClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "Created")) { @@ -524,7 +537,7 @@ internal NetworkSecurityGroupsOperations(NetworkResourceProviderClient client) /// /// Cancellation token. /// - public async Task> ListAllWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListAllWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (this.Client.ApiVersion == null) { @@ -620,14 +633,18 @@ internal NetworkSecurityGroupsOperations(NetworkResourceProviderClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { @@ -649,7 +666,7 @@ internal NetworkSecurityGroupsOperations(NetworkResourceProviderClient client) /// /// Cancellation token. /// - public async Task> ListWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -751,14 +768,18 @@ internal NetworkSecurityGroupsOperations(NetworkResourceProviderClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { @@ -771,7 +792,7 @@ internal NetworkSecurityGroupsOperations(NetworkResourceProviderClient client) /// The list NetworkSecurityGroups returns all network security groups in a /// subscription /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// @@ -780,11 +801,11 @@ internal NetworkSecurityGroupsOperations(NetworkResourceProviderClient client) /// /// Cancellation token. /// - public async Task> ListAllNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListAllNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (nextLink == null) + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextLink"); + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing bool shouldTrace = ServiceClientTracing.IsEnabled; @@ -793,13 +814,13 @@ internal NetworkSecurityGroupsOperations(NetworkResourceProviderClient client) { invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("nextLink", nextLink); + tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(invocationId, this, "ListAllNext", tracingParameters); } // Construct URL string url = "{nextLink}"; - url = url.Replace("{nextLink}", nextLink); + url = url.Replace("{nextLink}", nextPageLink); List queryParameters = new List(); if (queryParameters.Count > 0) { @@ -868,14 +889,18 @@ internal NetworkSecurityGroupsOperations(NetworkResourceProviderClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { @@ -888,7 +913,7 @@ internal NetworkSecurityGroupsOperations(NetworkResourceProviderClient client) /// The list NetworkSecurityGroups returns all network security groups in a /// resource group /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// @@ -897,11 +922,11 @@ internal NetworkSecurityGroupsOperations(NetworkResourceProviderClient client) /// /// Cancellation token. /// - public async Task> ListNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (nextLink == null) + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextLink"); + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing bool shouldTrace = ServiceClientTracing.IsEnabled; @@ -910,13 +935,13 @@ internal NetworkSecurityGroupsOperations(NetworkResourceProviderClient client) { invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("nextLink", nextLink); + tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(invocationId, this, "ListNext", tracingParameters); } // Construct URL string url = "{nextLink}"; - url = url.Replace("{nextLink}", nextLink); + url = url.Replace("{nextLink}", nextPageLink); List queryParameters = new List(); if (queryParameters.Count > 0) { @@ -985,14 +1010,18 @@ internal NetworkSecurityGroupsOperations(NetworkResourceProviderClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { diff --git a/src/ResourceManagement/Network/NetworkManagement/Generated/NetworkSecurityGroupsOperationsExtensions.cs b/src/ResourceManagement/Network/NetworkManagement/Generated/NetworkSecurityGroupsOperationsExtensions.cs index e9dc96bd17c52..d42b4853cd93b 100644 --- a/src/ResourceManagement/Network/NetworkManagement/Generated/NetworkSecurityGroupsOperationsExtensions.cs +++ b/src/ResourceManagement/Network/NetworkManagement/Generated/NetworkSecurityGroupsOperationsExtensions.cs @@ -16,7 +16,7 @@ public static partial class NetworkSecurityGroupsOperationsExtensions /// security group /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -34,7 +34,7 @@ public static void Delete(this INetworkSecurityGroupsOperations operations, stri /// security group /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -55,7 +55,7 @@ public static void Delete(this INetworkSecurityGroupsOperations operations, stri /// security group /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -73,7 +73,7 @@ public static void BeginDelete(this INetworkSecurityGroupsOperations operations, /// security group /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -94,7 +94,7 @@ public static void BeginDelete(this INetworkSecurityGroupsOperations operations, /// specified network security group. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -112,7 +112,7 @@ public static NetworkSecurityGroup Get(this INetworkSecurityGroupsOperations ope /// specified network security group. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -134,7 +134,7 @@ public static NetworkSecurityGroup Get(this INetworkSecurityGroupsOperations ope /// groupin the specified resource group. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -155,7 +155,7 @@ public static NetworkSecurityGroup CreateOrUpdate(this INetworkSecurityGroupsOpe /// groupin the specified resource group. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -180,7 +180,7 @@ public static NetworkSecurityGroup CreateOrUpdate(this INetworkSecurityGroupsOpe /// groupin the specified resource group. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -201,7 +201,7 @@ public static NetworkSecurityGroup BeginCreateOrUpdate(this INetworkSecurityGrou /// groupin the specified resource group. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -226,9 +226,9 @@ public static NetworkSecurityGroup BeginCreateOrUpdate(this INetworkSecurityGrou /// subscription /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - public static NetworkSecurityGroupListResult ListAll(this INetworkSecurityGroupsOperations operations) + public static Page ListAll(this INetworkSecurityGroupsOperations operations) { return Task.Factory.StartNew(s => ((INetworkSecurityGroupsOperations)s).ListAllAsync(), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } @@ -238,14 +238,14 @@ public static NetworkSecurityGroupListResult ListAll(this INetworkSecurityGroups /// subscription /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// Cancellation token. /// - public static async Task ListAllAsync( this INetworkSecurityGroupsOperations operations, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListAllAsync( this INetworkSecurityGroupsOperations operations, CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListAllWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListAllWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false); return result.Body; } @@ -254,12 +254,12 @@ public static NetworkSecurityGroupListResult ListAll(this INetworkSecurityGroups /// resource group /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. /// - public static NetworkSecurityGroupListResult List(this INetworkSecurityGroupsOperations operations, string resourceGroupName) + public static Page List(this INetworkSecurityGroupsOperations operations, string resourceGroupName) { return Task.Factory.StartNew(s => ((INetworkSecurityGroupsOperations)s).ListAsync(resourceGroupName), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } @@ -269,7 +269,7 @@ public static NetworkSecurityGroupListResult List(this INetworkSecurityGroupsOpe /// resource group /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -277,9 +277,9 @@ public static NetworkSecurityGroupListResult List(this INetworkSecurityGroupsOpe /// /// Cancellation token. /// - public static async Task ListAsync( this INetworkSecurityGroupsOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListAsync( this INetworkSecurityGroupsOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false); return result.Body; } @@ -288,14 +288,14 @@ public static NetworkSecurityGroupListResult List(this INetworkSecurityGroupsOpe /// subscription /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// - public static NetworkSecurityGroupListResult ListAllNext(this INetworkSecurityGroupsOperations operations, string nextLink) + public static Page ListAllNext(this INetworkSecurityGroupsOperations operations, string nextPageLink) { - return Task.Factory.StartNew(s => ((INetworkSecurityGroupsOperations)s).ListAllNextAsync(nextLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + return Task.Factory.StartNew(s => ((INetworkSecurityGroupsOperations)s).ListAllNextAsync(nextPageLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } /// @@ -303,17 +303,17 @@ public static NetworkSecurityGroupListResult ListAllNext(this INetworkSecurityGr /// subscription /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// /// Cancellation token. /// - public static async Task ListAllNextAsync( this INetworkSecurityGroupsOperations operations, string nextLink, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListAllNextAsync( this INetworkSecurityGroupsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListAllNextWithHttpMessagesAsync(nextLink, null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListAllNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false); return result.Body; } @@ -322,14 +322,14 @@ public static NetworkSecurityGroupListResult ListAllNext(this INetworkSecurityGr /// resource group /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// - public static NetworkSecurityGroupListResult ListNext(this INetworkSecurityGroupsOperations operations, string nextLink) + public static Page ListNext(this INetworkSecurityGroupsOperations operations, string nextPageLink) { - return Task.Factory.StartNew(s => ((INetworkSecurityGroupsOperations)s).ListNextAsync(nextLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + return Task.Factory.StartNew(s => ((INetworkSecurityGroupsOperations)s).ListNextAsync(nextPageLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } /// @@ -337,17 +337,17 @@ public static NetworkSecurityGroupListResult ListNext(this INetworkSecurityGroup /// resource group /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// /// Cancellation token. /// - public static async Task ListNextAsync( this INetworkSecurityGroupsOperations operations, string nextLink, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListNextAsync( this INetworkSecurityGroupsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListNextWithHttpMessagesAsync(nextLink, null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false); return result.Body; } diff --git a/src/ResourceManagement/Network/NetworkManagement/Generated/PublicIpAddressesOperations.cs b/src/ResourceManagement/Network/NetworkManagement/Generated/PublicIpAddressesOperations.cs index d7012624aad80..9fe5678a99b96 100644 --- a/src/ResourceManagement/Network/NetworkManagement/Generated/PublicIpAddressesOperations.cs +++ b/src/ResourceManagement/Network/NetworkManagement/Generated/PublicIpAddressesOperations.cs @@ -11,6 +11,7 @@ namespace Microsoft.Azure.Management.Network using System.Threading.Tasks; using Microsoft.Rest; using Newtonsoft.Json; + using System.Linq; using Microsoft.Azure; using Models; @@ -42,10 +43,10 @@ internal PublicIpAddressesOperations(NetworkResourceProviderClient client) /// The name of the subnet. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string publicIpAddressName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { @@ -174,6 +175,10 @@ internal PublicIpAddressesOperations(NetworkResourceProviderClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } if (shouldTrace) { ServiceClientTracing.Exit(invocationId, result); @@ -308,6 +313,10 @@ internal PublicIpAddressesOperations(NetworkResourceProviderClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { @@ -335,10 +344,10 @@ internal PublicIpAddressesOperations(NetworkResourceProviderClient client) /// Parameters supplied to the create/update PublicIPAddress operation /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string publicIpAddressName, PublicIpAddress parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { @@ -493,6 +502,10 @@ internal PublicIpAddressesOperations(NetworkResourceProviderClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { @@ -522,7 +535,7 @@ internal PublicIpAddressesOperations(NetworkResourceProviderClient client) /// /// Cancellation token. /// - public async Task> ListAllWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListAllWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (this.Client.ApiVersion == null) { @@ -618,14 +631,18 @@ internal PublicIpAddressesOperations(NetworkResourceProviderClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { @@ -647,7 +664,7 @@ internal PublicIpAddressesOperations(NetworkResourceProviderClient client) /// /// Cancellation token. /// - public async Task> ListWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -749,14 +766,18 @@ internal PublicIpAddressesOperations(NetworkResourceProviderClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { @@ -769,7 +790,7 @@ internal PublicIpAddressesOperations(NetworkResourceProviderClient client) /// The List publicIpAddress opertion retrieves all the publicIpAddresses in a /// subscription. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// @@ -778,11 +799,11 @@ internal PublicIpAddressesOperations(NetworkResourceProviderClient client) /// /// Cancellation token. /// - public async Task> ListAllNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListAllNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (nextLink == null) + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextLink"); + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing bool shouldTrace = ServiceClientTracing.IsEnabled; @@ -791,13 +812,13 @@ internal PublicIpAddressesOperations(NetworkResourceProviderClient client) { invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("nextLink", nextLink); + tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(invocationId, this, "ListAllNext", tracingParameters); } // Construct URL string url = "{nextLink}"; - url = url.Replace("{nextLink}", nextLink); + url = url.Replace("{nextLink}", nextPageLink); List queryParameters = new List(); if (queryParameters.Count > 0) { @@ -866,14 +887,18 @@ internal PublicIpAddressesOperations(NetworkResourceProviderClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { @@ -886,7 +911,7 @@ internal PublicIpAddressesOperations(NetworkResourceProviderClient client) /// The List publicIpAddress opertion retrieves all the publicIpAddresses in a /// resource group. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// @@ -895,11 +920,11 @@ internal PublicIpAddressesOperations(NetworkResourceProviderClient client) /// /// Cancellation token. /// - public async Task> ListNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (nextLink == null) + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextLink"); + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing bool shouldTrace = ServiceClientTracing.IsEnabled; @@ -908,13 +933,13 @@ internal PublicIpAddressesOperations(NetworkResourceProviderClient client) { invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("nextLink", nextLink); + tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(invocationId, this, "ListNext", tracingParameters); } // Construct URL string url = "{nextLink}"; - url = url.Replace("{nextLink}", nextLink); + url = url.Replace("{nextLink}", nextPageLink); List queryParameters = new List(); if (queryParameters.Count > 0) { @@ -983,14 +1008,18 @@ internal PublicIpAddressesOperations(NetworkResourceProviderClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { diff --git a/src/ResourceManagement/Network/NetworkManagement/Generated/PublicIpAddressesOperationsExtensions.cs b/src/ResourceManagement/Network/NetworkManagement/Generated/PublicIpAddressesOperationsExtensions.cs index 6ebfa8b807926..ab0201d3706b8 100644 --- a/src/ResourceManagement/Network/NetworkManagement/Generated/PublicIpAddressesOperationsExtensions.cs +++ b/src/ResourceManagement/Network/NetworkManagement/Generated/PublicIpAddressesOperationsExtensions.cs @@ -15,7 +15,7 @@ public static partial class PublicIpAddressesOperationsExtensions /// The delete publicIpAddress operation deletes the specified publicIpAddress. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -32,7 +32,7 @@ public static void Delete(this IPublicIpAddressesOperations operations, string r /// The delete publicIpAddress operation deletes the specified publicIpAddress. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -52,7 +52,7 @@ public static void Delete(this IPublicIpAddressesOperations operations, string r /// The delete publicIpAddress operation deletes the specified publicIpAddress. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -69,7 +69,7 @@ public static void BeginDelete(this IPublicIpAddressesOperations operations, str /// The delete publicIpAddress operation deletes the specified publicIpAddress. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -90,7 +90,7 @@ public static void BeginDelete(this IPublicIpAddressesOperations operations, str /// specified pubicIpAddress /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -108,7 +108,7 @@ public static PublicIpAddress Get(this IPublicIpAddressesOperations operations, /// specified pubicIpAddress /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -130,7 +130,7 @@ public static PublicIpAddress Get(this IPublicIpAddressesOperations operations, /// PublicIP address /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -151,7 +151,7 @@ public static PublicIpAddress CreateOrUpdate(this IPublicIpAddressesOperations o /// PublicIP address /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -176,7 +176,7 @@ public static PublicIpAddress CreateOrUpdate(this IPublicIpAddressesOperations o /// PublicIP address /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -197,7 +197,7 @@ public static PublicIpAddress BeginCreateOrUpdate(this IPublicIpAddressesOperati /// PublicIP address /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -222,9 +222,9 @@ public static PublicIpAddress BeginCreateOrUpdate(this IPublicIpAddressesOperati /// subscription. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - public static PublicIpAddressListResult ListAll(this IPublicIpAddressesOperations operations) + public static Page ListAll(this IPublicIpAddressesOperations operations) { return Task.Factory.StartNew(s => ((IPublicIpAddressesOperations)s).ListAllAsync(), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } @@ -234,14 +234,14 @@ public static PublicIpAddressListResult ListAll(this IPublicIpAddressesOperation /// subscription. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// Cancellation token. /// - public static async Task ListAllAsync( this IPublicIpAddressesOperations operations, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListAllAsync( this IPublicIpAddressesOperations operations, CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListAllWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListAllWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false); return result.Body; } @@ -250,12 +250,12 @@ public static PublicIpAddressListResult ListAll(this IPublicIpAddressesOperation /// resource group. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. /// - public static PublicIpAddressListResult List(this IPublicIpAddressesOperations operations, string resourceGroupName) + public static Page List(this IPublicIpAddressesOperations operations, string resourceGroupName) { return Task.Factory.StartNew(s => ((IPublicIpAddressesOperations)s).ListAsync(resourceGroupName), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } @@ -265,7 +265,7 @@ public static PublicIpAddressListResult List(this IPublicIpAddressesOperations o /// resource group. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -273,9 +273,9 @@ public static PublicIpAddressListResult List(this IPublicIpAddressesOperations o /// /// Cancellation token. /// - public static async Task ListAsync( this IPublicIpAddressesOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListAsync( this IPublicIpAddressesOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false); return result.Body; } @@ -284,14 +284,14 @@ public static PublicIpAddressListResult List(this IPublicIpAddressesOperations o /// subscription. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// - public static PublicIpAddressListResult ListAllNext(this IPublicIpAddressesOperations operations, string nextLink) + public static Page ListAllNext(this IPublicIpAddressesOperations operations, string nextPageLink) { - return Task.Factory.StartNew(s => ((IPublicIpAddressesOperations)s).ListAllNextAsync(nextLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + return Task.Factory.StartNew(s => ((IPublicIpAddressesOperations)s).ListAllNextAsync(nextPageLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } /// @@ -299,17 +299,17 @@ public static PublicIpAddressListResult ListAllNext(this IPublicIpAddressesOpera /// subscription. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// /// Cancellation token. /// - public static async Task ListAllNextAsync( this IPublicIpAddressesOperations operations, string nextLink, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListAllNextAsync( this IPublicIpAddressesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListAllNextWithHttpMessagesAsync(nextLink, null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListAllNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false); return result.Body; } @@ -318,14 +318,14 @@ public static PublicIpAddressListResult ListAllNext(this IPublicIpAddressesOpera /// resource group. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// - public static PublicIpAddressListResult ListNext(this IPublicIpAddressesOperations operations, string nextLink) + public static Page ListNext(this IPublicIpAddressesOperations operations, string nextPageLink) { - return Task.Factory.StartNew(s => ((IPublicIpAddressesOperations)s).ListNextAsync(nextLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + return Task.Factory.StartNew(s => ((IPublicIpAddressesOperations)s).ListNextAsync(nextPageLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } /// @@ -333,17 +333,17 @@ public static PublicIpAddressListResult ListNext(this IPublicIpAddressesOperatio /// resource group. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// /// Cancellation token. /// - public static async Task ListNextAsync( this IPublicIpAddressesOperations operations, string nextLink, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListNextAsync( this IPublicIpAddressesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListNextWithHttpMessagesAsync(nextLink, null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false); return result.Body; } diff --git a/src/ResourceManagement/Network/NetworkManagement/Generated/SecurityRulesOperations.cs b/src/ResourceManagement/Network/NetworkManagement/Generated/SecurityRulesOperations.cs index 8db42608e4ff4..e578de4bf2890 100644 --- a/src/ResourceManagement/Network/NetworkManagement/Generated/SecurityRulesOperations.cs +++ b/src/ResourceManagement/Network/NetworkManagement/Generated/SecurityRulesOperations.cs @@ -11,6 +11,7 @@ namespace Microsoft.Azure.Management.Network using System.Threading.Tasks; using Microsoft.Rest; using Newtonsoft.Json; + using System.Linq; using Microsoft.Azure; using Models; @@ -46,10 +47,10 @@ internal SecurityRulesOperations(NetworkResourceProviderClient client) /// The name of the security rule. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string networkSecurityGroupName, string securityRuleName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { @@ -188,6 +189,10 @@ internal SecurityRulesOperations(NetworkResourceProviderClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } if (shouldTrace) { ServiceClientTracing.Exit(invocationId, result); @@ -331,6 +336,10 @@ internal SecurityRulesOperations(NetworkResourceProviderClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { @@ -361,10 +370,10 @@ internal SecurityRulesOperations(NetworkResourceProviderClient client) /// Parameters supplied to the create/update network security rule operation /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string networkSecurityGroupName, string securityRuleName, SecurityRule securityRuleParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { @@ -524,6 +533,10 @@ internal SecurityRulesOperations(NetworkResourceProviderClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { @@ -559,7 +572,7 @@ internal SecurityRulesOperations(NetworkResourceProviderClient client) /// /// Cancellation token. /// - public async Task> ListWithHttpMessagesAsync(string resourceGroupName, string networkSecurityGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListWithHttpMessagesAsync(string resourceGroupName, string networkSecurityGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -667,14 +680,18 @@ internal SecurityRulesOperations(NetworkResourceProviderClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { @@ -687,7 +704,7 @@ internal SecurityRulesOperations(NetworkResourceProviderClient client) /// The List network security rule opertion retrieves all the security rules /// in a network security group. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// @@ -696,11 +713,11 @@ internal SecurityRulesOperations(NetworkResourceProviderClient client) /// /// Cancellation token. /// - public async Task> ListNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (nextLink == null) + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextLink"); + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing bool shouldTrace = ServiceClientTracing.IsEnabled; @@ -709,13 +726,13 @@ internal SecurityRulesOperations(NetworkResourceProviderClient client) { invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("nextLink", nextLink); + tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(invocationId, this, "ListNext", tracingParameters); } // Construct URL string url = "{nextLink}"; - url = url.Replace("{nextLink}", nextLink); + url = url.Replace("{nextLink}", nextPageLink); List queryParameters = new List(); if (queryParameters.Count > 0) { @@ -784,14 +801,18 @@ internal SecurityRulesOperations(NetworkResourceProviderClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { diff --git a/src/ResourceManagement/Network/NetworkManagement/Generated/SecurityRulesOperationsExtensions.cs b/src/ResourceManagement/Network/NetworkManagement/Generated/SecurityRulesOperationsExtensions.cs index 8b6b9f63ac6ae..37a639cb31738 100644 --- a/src/ResourceManagement/Network/NetworkManagement/Generated/SecurityRulesOperationsExtensions.cs +++ b/src/ResourceManagement/Network/NetworkManagement/Generated/SecurityRulesOperationsExtensions.cs @@ -16,7 +16,7 @@ public static partial class SecurityRulesOperationsExtensions /// security rule. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -37,7 +37,7 @@ public static void Delete(this ISecurityRulesOperations operations, string resou /// security rule. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -61,7 +61,7 @@ public static void Delete(this ISecurityRulesOperations operations, string resou /// security rule. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -82,7 +82,7 @@ public static void BeginDelete(this ISecurityRulesOperations operations, string /// security rule. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -106,7 +106,7 @@ public static void BeginDelete(this ISecurityRulesOperations operations, string /// specified network security rule. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -127,7 +127,7 @@ public static SecurityRule Get(this ISecurityRulesOperations operations, string /// specified network security rule. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -152,7 +152,7 @@ public static SecurityRule Get(this ISecurityRulesOperations operations, string /// the specified network security group /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -176,7 +176,7 @@ public static SecurityRule CreateOrUpdate(this ISecurityRulesOperations operatio /// the specified network security group /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -204,7 +204,7 @@ public static SecurityRule CreateOrUpdate(this ISecurityRulesOperations operatio /// the specified network security group /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -228,7 +228,7 @@ public static SecurityRule BeginCreateOrUpdate(this ISecurityRulesOperations ope /// the specified network security group /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -256,7 +256,7 @@ public static SecurityRule BeginCreateOrUpdate(this ISecurityRulesOperations ope /// in a network security group. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -264,7 +264,7 @@ public static SecurityRule BeginCreateOrUpdate(this ISecurityRulesOperations ope /// /// The name of the network security group. /// - public static SecurityRuleListResult List(this ISecurityRulesOperations operations, string resourceGroupName, string networkSecurityGroupName) + public static Page List(this ISecurityRulesOperations operations, string resourceGroupName, string networkSecurityGroupName) { return Task.Factory.StartNew(s => ((ISecurityRulesOperations)s).ListAsync(resourceGroupName, networkSecurityGroupName), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } @@ -274,7 +274,7 @@ public static SecurityRuleListResult List(this ISecurityRulesOperations operatio /// in a network security group. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -285,9 +285,9 @@ public static SecurityRuleListResult List(this ISecurityRulesOperations operatio /// /// Cancellation token. /// - public static async Task ListAsync( this ISecurityRulesOperations operations, string resourceGroupName, string networkSecurityGroupName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListAsync( this ISecurityRulesOperations operations, string resourceGroupName, string networkSecurityGroupName, CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListWithHttpMessagesAsync(resourceGroupName, networkSecurityGroupName, null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListWithHttpMessagesAsync(resourceGroupName, networkSecurityGroupName, null, cancellationToken).ConfigureAwait(false); return result.Body; } @@ -296,14 +296,14 @@ public static SecurityRuleListResult List(this ISecurityRulesOperations operatio /// in a network security group. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// - public static SecurityRuleListResult ListNext(this ISecurityRulesOperations operations, string nextLink) + public static Page ListNext(this ISecurityRulesOperations operations, string nextPageLink) { - return Task.Factory.StartNew(s => ((ISecurityRulesOperations)s).ListNextAsync(nextLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + return Task.Factory.StartNew(s => ((ISecurityRulesOperations)s).ListNextAsync(nextPageLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } /// @@ -311,17 +311,17 @@ public static SecurityRuleListResult ListNext(this ISecurityRulesOperations oper /// in a network security group. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// /// Cancellation token. /// - public static async Task ListNextAsync( this ISecurityRulesOperations operations, string nextLink, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListNextAsync( this ISecurityRulesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListNextWithHttpMessagesAsync(nextLink, null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false); return result.Body; } diff --git a/src/ResourceManagement/Network/NetworkManagement/Generated/SubnetsOperations.cs b/src/ResourceManagement/Network/NetworkManagement/Generated/SubnetsOperations.cs index ba3c81719c9e9..4df1d2a6a5b48 100644 --- a/src/ResourceManagement/Network/NetworkManagement/Generated/SubnetsOperations.cs +++ b/src/ResourceManagement/Network/NetworkManagement/Generated/SubnetsOperations.cs @@ -11,6 +11,7 @@ namespace Microsoft.Azure.Management.Network using System.Threading.Tasks; using Microsoft.Rest; using Newtonsoft.Json; + using System.Linq; using Microsoft.Azure; using Models; @@ -45,10 +46,10 @@ internal SubnetsOperations(NetworkResourceProviderClient client) /// The name of the subnet. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkName, string subnetName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { @@ -186,6 +187,10 @@ internal SubnetsOperations(NetworkResourceProviderClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } if (shouldTrace) { ServiceClientTracing.Exit(invocationId, result); @@ -328,6 +333,10 @@ internal SubnetsOperations(NetworkResourceProviderClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { @@ -358,10 +367,10 @@ internal SubnetsOperations(NetworkResourceProviderClient client) /// Parameters supplied to the create/update Subnet operation /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkName, string subnetName, Subnet subnetParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { @@ -521,6 +530,10 @@ internal SubnetsOperations(NetworkResourceProviderClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { @@ -555,7 +568,7 @@ internal SubnetsOperations(NetworkResourceProviderClient client) /// /// Cancellation token. /// - public async Task> ListWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -663,14 +676,18 @@ internal SubnetsOperations(NetworkResourceProviderClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { @@ -682,7 +699,7 @@ internal SubnetsOperations(NetworkResourceProviderClient client) /// /// The List subnets opertion retrieves all the subnets in a virtual network. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// @@ -691,11 +708,11 @@ internal SubnetsOperations(NetworkResourceProviderClient client) /// /// Cancellation token. /// - public async Task> ListNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (nextLink == null) + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextLink"); + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing bool shouldTrace = ServiceClientTracing.IsEnabled; @@ -704,13 +721,13 @@ internal SubnetsOperations(NetworkResourceProviderClient client) { invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("nextLink", nextLink); + tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(invocationId, this, "ListNext", tracingParameters); } // Construct URL string url = "{nextLink}"; - url = url.Replace("{nextLink}", nextLink); + url = url.Replace("{nextLink}", nextPageLink); List queryParameters = new List(); if (queryParameters.Count > 0) { @@ -779,14 +796,18 @@ internal SubnetsOperations(NetworkResourceProviderClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { diff --git a/src/ResourceManagement/Network/NetworkManagement/Generated/SubnetsOperationsExtensions.cs b/src/ResourceManagement/Network/NetworkManagement/Generated/SubnetsOperationsExtensions.cs index 60557336f1b11..80643cb760c18 100644 --- a/src/ResourceManagement/Network/NetworkManagement/Generated/SubnetsOperationsExtensions.cs +++ b/src/ResourceManagement/Network/NetworkManagement/Generated/SubnetsOperationsExtensions.cs @@ -15,7 +15,7 @@ public static partial class SubnetsOperationsExtensions /// The delete subnet operation deletes the specified subnet. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -35,7 +35,7 @@ public static void Delete(this ISubnetsOperations operations, string resourceGro /// The delete subnet operation deletes the specified subnet. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -58,7 +58,7 @@ public static void Delete(this ISubnetsOperations operations, string resourceGro /// The delete subnet operation deletes the specified subnet. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -78,7 +78,7 @@ public static void BeginDelete(this ISubnetsOperations operations, string resour /// The delete subnet operation deletes the specified subnet. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -101,7 +101,7 @@ public static void BeginDelete(this ISubnetsOperations operations, string resour /// The Get subnet operation retreives information about the specified subnet. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -121,7 +121,7 @@ public static Subnet Get(this ISubnetsOperations operations, string resourceGrou /// The Get subnet operation retreives information about the specified subnet. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -146,7 +146,7 @@ public static Subnet Get(this ISubnetsOperations operations, string resourceGrou /// network /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -170,7 +170,7 @@ public static Subnet CreateOrUpdate(this ISubnetsOperations operations, string r /// network /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -198,7 +198,7 @@ public static Subnet CreateOrUpdate(this ISubnetsOperations operations, string r /// network /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -222,7 +222,7 @@ public static Subnet BeginCreateOrUpdate(this ISubnetsOperations operations, str /// network /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -249,7 +249,7 @@ public static Subnet BeginCreateOrUpdate(this ISubnetsOperations operations, str /// The List subnets opertion retrieves all the subnets in a virtual network. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -257,7 +257,7 @@ public static Subnet BeginCreateOrUpdate(this ISubnetsOperations operations, str /// /// The name of the virtual network. /// - public static SubnetListResult List(this ISubnetsOperations operations, string resourceGroupName, string virtualNetworkName) + public static Page List(this ISubnetsOperations operations, string resourceGroupName, string virtualNetworkName) { return Task.Factory.StartNew(s => ((ISubnetsOperations)s).ListAsync(resourceGroupName, virtualNetworkName), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } @@ -266,7 +266,7 @@ public static SubnetListResult List(this ISubnetsOperations operations, string r /// The List subnets opertion retrieves all the subnets in a virtual network. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -277,9 +277,9 @@ public static SubnetListResult List(this ISubnetsOperations operations, string r /// /// Cancellation token. /// - public static async Task ListAsync( this ISubnetsOperations operations, string resourceGroupName, string virtualNetworkName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListAsync( this ISubnetsOperations operations, string resourceGroupName, string virtualNetworkName, CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListWithHttpMessagesAsync(resourceGroupName, virtualNetworkName, null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListWithHttpMessagesAsync(resourceGroupName, virtualNetworkName, null, cancellationToken).ConfigureAwait(false); return result.Body; } @@ -287,31 +287,31 @@ public static SubnetListResult List(this ISubnetsOperations operations, string r /// The List subnets opertion retrieves all the subnets in a virtual network. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// - public static SubnetListResult ListNext(this ISubnetsOperations operations, string nextLink) + public static Page ListNext(this ISubnetsOperations operations, string nextPageLink) { - return Task.Factory.StartNew(s => ((ISubnetsOperations)s).ListNextAsync(nextLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + return Task.Factory.StartNew(s => ((ISubnetsOperations)s).ListNextAsync(nextPageLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } /// /// The List subnets opertion retrieves all the subnets in a virtual network. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// /// Cancellation token. /// - public static async Task ListNextAsync( this ISubnetsOperations operations, string nextLink, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListNextAsync( this ISubnetsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListNextWithHttpMessagesAsync(nextLink, null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false); return result.Body; } diff --git a/src/ResourceManagement/Network/NetworkManagement/Generated/UsagesOperations.cs b/src/ResourceManagement/Network/NetworkManagement/Generated/UsagesOperations.cs index e885b1d61d961..1c90903386a64 100644 --- a/src/ResourceManagement/Network/NetworkManagement/Generated/UsagesOperations.cs +++ b/src/ResourceManagement/Network/NetworkManagement/Generated/UsagesOperations.cs @@ -11,6 +11,7 @@ namespace Microsoft.Azure.Management.Network using System.Threading.Tasks; using Microsoft.Rest; using Newtonsoft.Json; + using System.Linq; using Microsoft.Azure; using Models; @@ -149,6 +150,10 @@ internal UsagesOperations(NetworkResourceProviderClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { diff --git a/src/ResourceManagement/Network/NetworkManagement/Generated/UsagesOperationsExtensions.cs b/src/ResourceManagement/Network/NetworkManagement/Generated/UsagesOperationsExtensions.cs index 5fc5353480fda..4f9f5de789105 100644 --- a/src/ResourceManagement/Network/NetworkManagement/Generated/UsagesOperationsExtensions.cs +++ b/src/ResourceManagement/Network/NetworkManagement/Generated/UsagesOperationsExtensions.cs @@ -15,7 +15,7 @@ public static partial class UsagesOperationsExtensions /// Lists compute usages for a subscription. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The location upon which resource usage is queried. @@ -29,7 +29,7 @@ public static UsagesListResult List(this IUsagesOperations operations, string lo /// Lists compute usages for a subscription. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The location upon which resource usage is queried. diff --git a/src/ResourceManagement/Network/NetworkManagement/Generated/VirtualNetworkGatewayConnectionsOperations.cs b/src/ResourceManagement/Network/NetworkManagement/Generated/VirtualNetworkGatewayConnectionsOperations.cs index 0b14071bac6d1..8565e14f9da12 100644 --- a/src/ResourceManagement/Network/NetworkManagement/Generated/VirtualNetworkGatewayConnectionsOperations.cs +++ b/src/ResourceManagement/Network/NetworkManagement/Generated/VirtualNetworkGatewayConnectionsOperations.cs @@ -11,6 +11,7 @@ namespace Microsoft.Azure.Management.Network using System.Threading.Tasks; using Microsoft.Rest; using Newtonsoft.Json; + using System.Linq; using Microsoft.Azure; using Models; @@ -48,10 +49,10 @@ internal VirtualNetworkGatewayConnectionsOperations(NetworkResourceProviderClien /// connection operation through Network resource provider. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayConnectionName, VirtualNetworkGatewayConnection parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { @@ -208,6 +209,10 @@ internal VirtualNetworkGatewayConnectionsOperations(NetworkResourceProviderClien var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { @@ -355,6 +360,10 @@ internal VirtualNetworkGatewayConnectionsOperations(NetworkResourceProviderClien var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { @@ -379,10 +388,10 @@ internal VirtualNetworkGatewayConnectionsOperations(NetworkResourceProviderClien /// The name of the virtual network gateway connection. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { @@ -512,6 +521,10 @@ internal VirtualNetworkGatewayConnectionsOperations(NetworkResourceProviderClien var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } if (shouldTrace) { ServiceClientTracing.Exit(invocationId, result); @@ -647,6 +660,10 @@ internal VirtualNetworkGatewayConnectionsOperations(NetworkResourceProviderClien var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { @@ -677,10 +694,10 @@ internal VirtualNetworkGatewayConnectionsOperations(NetworkResourceProviderClien /// Shared key operation throughNetwork resource provider. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// public async Task> SetSharedKeyWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayConnectionName, ConnectionSharedKey parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { @@ -834,6 +851,10 @@ internal VirtualNetworkGatewayConnectionsOperations(NetworkResourceProviderClien var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { @@ -866,7 +887,7 @@ internal VirtualNetworkGatewayConnectionsOperations(NetworkResourceProviderClien /// /// Cancellation token. /// - public async Task> ListWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -968,14 +989,18 @@ internal VirtualNetworkGatewayConnectionsOperations(NetworkResourceProviderClien throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { @@ -1001,10 +1026,10 @@ internal VirtualNetworkGatewayConnectionsOperations(NetworkResourceProviderClien /// shared key operation through Network resource provider. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// public async Task> ResetSharedKeyWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayConnectionName, ConnectionResetSharedKey parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { @@ -1156,6 +1181,10 @@ internal VirtualNetworkGatewayConnectionsOperations(NetworkResourceProviderClien var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { @@ -1173,7 +1202,7 @@ internal VirtualNetworkGatewayConnectionsOperations(NetworkResourceProviderClien /// The List VirtualNetworkGatewayConnections operation retrieves all the /// virtual network gateways connections created. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// @@ -1182,11 +1211,11 @@ internal VirtualNetworkGatewayConnectionsOperations(NetworkResourceProviderClien /// /// Cancellation token. /// - public async Task> ListNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (nextLink == null) + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextLink"); + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing bool shouldTrace = ServiceClientTracing.IsEnabled; @@ -1195,13 +1224,13 @@ internal VirtualNetworkGatewayConnectionsOperations(NetworkResourceProviderClien { invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("nextLink", nextLink); + tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(invocationId, this, "ListNext", tracingParameters); } // Construct URL string url = "{nextLink}"; - url = url.Replace("{nextLink}", nextLink); + url = url.Replace("{nextLink}", nextPageLink); List queryParameters = new List(); if (queryParameters.Count > 0) { @@ -1270,14 +1299,18 @@ internal VirtualNetworkGatewayConnectionsOperations(NetworkResourceProviderClien throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { diff --git a/src/ResourceManagement/Network/NetworkManagement/Generated/VirtualNetworkGatewayConnectionsOperationsExtensions.cs b/src/ResourceManagement/Network/NetworkManagement/Generated/VirtualNetworkGatewayConnectionsOperationsExtensions.cs index c64480fc1ebef..a78557bfe3f20 100644 --- a/src/ResourceManagement/Network/NetworkManagement/Generated/VirtualNetworkGatewayConnectionsOperationsExtensions.cs +++ b/src/ResourceManagement/Network/NetworkManagement/Generated/VirtualNetworkGatewayConnectionsOperationsExtensions.cs @@ -17,7 +17,7 @@ public static partial class VirtualNetworkGatewayConnectionsOperationsExtensions /// through Network resource provider. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -40,7 +40,7 @@ public static VirtualNetworkGatewayConnection CreateOrUpdate(this IVirtualNetwor /// through Network resource provider. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -67,7 +67,7 @@ public static VirtualNetworkGatewayConnection CreateOrUpdate(this IVirtualNetwor /// through Network resource provider. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -90,7 +90,7 @@ public static VirtualNetworkGatewayConnection BeginCreateOrUpdate(this IVirtualN /// through Network resource provider. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -117,7 +117,7 @@ public static VirtualNetworkGatewayConnection BeginCreateOrUpdate(this IVirtualN /// resource provider. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -136,7 +136,7 @@ public static VirtualNetworkGatewayConnection Get(this IVirtualNetworkGatewayCon /// resource provider. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -158,7 +158,7 @@ public static VirtualNetworkGatewayConnection Get(this IVirtualNetworkGatewayCon /// virtual network Gateway connection through Network resource provider. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -176,7 +176,7 @@ public static void Delete(this IVirtualNetworkGatewayConnectionsOperations opera /// virtual network Gateway connection through Network resource provider. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -197,7 +197,7 @@ public static void Delete(this IVirtualNetworkGatewayConnectionsOperations opera /// virtual network Gateway connection through Network resource provider. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -215,7 +215,7 @@ public static void BeginDelete(this IVirtualNetworkGatewayConnectionsOperations /// virtual network Gateway connection through Network resource provider. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -237,7 +237,7 @@ public static void BeginDelete(this IVirtualNetworkGatewayConnectionsOperations /// key through Network resource provider. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -256,7 +256,7 @@ public static ConnectionSharedKey GetSharedKey(this IVirtualNetworkGatewayConnec /// key through Network resource provider. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -280,7 +280,7 @@ public static ConnectionSharedKey GetSharedKey(this IVirtualNetworkGatewayConnec /// resource provider. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -304,7 +304,7 @@ public static ConnectionSharedKey SetSharedKey(this IVirtualNetworkGatewayConnec /// resource provider. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -332,7 +332,7 @@ public static ConnectionSharedKey SetSharedKey(this IVirtualNetworkGatewayConnec /// resource provider. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -356,7 +356,7 @@ public static ConnectionSharedKey BeginSetSharedKey(this IVirtualNetworkGatewayC /// resource provider. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -382,12 +382,12 @@ public static ConnectionSharedKey BeginSetSharedKey(this IVirtualNetworkGatewayC /// virtual network gateways connections created. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. /// - public static VirtualNetworkGatewayConnectionListResult List(this IVirtualNetworkGatewayConnectionsOperations operations, string resourceGroupName) + public static Page List(this IVirtualNetworkGatewayConnectionsOperations operations, string resourceGroupName) { return Task.Factory.StartNew(s => ((IVirtualNetworkGatewayConnectionsOperations)s).ListAsync(resourceGroupName), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } @@ -397,7 +397,7 @@ public static VirtualNetworkGatewayConnectionListResult List(this IVirtualNetwor /// virtual network gateways connections created. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -405,9 +405,9 @@ public static VirtualNetworkGatewayConnectionListResult List(this IVirtualNetwor /// /// Cancellation token. /// - public static async Task ListAsync( this IVirtualNetworkGatewayConnectionsOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListAsync( this IVirtualNetworkGatewayConnectionsOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false); return result.Body; } @@ -418,7 +418,7 @@ public static VirtualNetworkGatewayConnectionListResult List(this IVirtualNetwor /// resource provider. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -442,7 +442,7 @@ public static ConnectionResetSharedKey ResetSharedKey(this IVirtualNetworkGatewa /// resource provider. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -470,7 +470,7 @@ public static ConnectionResetSharedKey ResetSharedKey(this IVirtualNetworkGatewa /// resource provider. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -494,7 +494,7 @@ public static ConnectionResetSharedKey BeginResetSharedKey(this IVirtualNetworkG /// resource provider. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -520,14 +520,14 @@ public static ConnectionResetSharedKey BeginResetSharedKey(this IVirtualNetworkG /// virtual network gateways connections created. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// - public static VirtualNetworkGatewayConnectionListResult ListNext(this IVirtualNetworkGatewayConnectionsOperations operations, string nextLink) + public static Page ListNext(this IVirtualNetworkGatewayConnectionsOperations operations, string nextPageLink) { - return Task.Factory.StartNew(s => ((IVirtualNetworkGatewayConnectionsOperations)s).ListNextAsync(nextLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + return Task.Factory.StartNew(s => ((IVirtualNetworkGatewayConnectionsOperations)s).ListNextAsync(nextPageLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } /// @@ -535,17 +535,17 @@ public static VirtualNetworkGatewayConnectionListResult ListNext(this IVirtualNe /// virtual network gateways connections created. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// /// Cancellation token. /// - public static async Task ListNextAsync( this IVirtualNetworkGatewayConnectionsOperations operations, string nextLink, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListNextAsync( this IVirtualNetworkGatewayConnectionsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListNextWithHttpMessagesAsync(nextLink, null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false); return result.Body; } diff --git a/src/ResourceManagement/Network/NetworkManagement/Generated/VirtualNetworkGatewaysOperations.cs b/src/ResourceManagement/Network/NetworkManagement/Generated/VirtualNetworkGatewaysOperations.cs index 16a59c88892f7..a8e23dcee09f2 100644 --- a/src/ResourceManagement/Network/NetworkManagement/Generated/VirtualNetworkGatewaysOperations.cs +++ b/src/ResourceManagement/Network/NetworkManagement/Generated/VirtualNetworkGatewaysOperations.cs @@ -11,6 +11,7 @@ namespace Microsoft.Azure.Management.Network using System.Threading.Tasks; using Microsoft.Rest; using Newtonsoft.Json; + using System.Linq; using Microsoft.Azure; using Models; @@ -47,10 +48,10 @@ internal VirtualNetworkGatewaysOperations(NetworkResourceProviderClient client) /// operation through Network resource provider. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, VirtualNetworkGateway parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { @@ -206,6 +207,10 @@ internal VirtualNetworkGatewaysOperations(NetworkResourceProviderClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "Created")) { @@ -352,6 +357,10 @@ internal VirtualNetworkGatewaysOperations(NetworkResourceProviderClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { @@ -376,10 +385,10 @@ internal VirtualNetworkGatewaysOperations(NetworkResourceProviderClient client) /// The name of the virtual network gateway. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { @@ -509,6 +518,10 @@ internal VirtualNetworkGatewaysOperations(NetworkResourceProviderClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } if (shouldTrace) { ServiceClientTracing.Exit(invocationId, result); @@ -529,7 +542,7 @@ internal VirtualNetworkGatewaysOperations(NetworkResourceProviderClient client) /// /// Cancellation token. /// - public async Task> ListWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -631,14 +644,18 @@ internal VirtualNetworkGatewaysOperations(NetworkResourceProviderClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { @@ -663,10 +680,10 @@ internal VirtualNetworkGatewaysOperations(NetworkResourceProviderClient client) /// through Network resource provider. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// public async Task> ResetWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkGatewayName, VirtualNetworkGateway parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { @@ -821,6 +838,10 @@ internal VirtualNetworkGatewaysOperations(NetworkResourceProviderClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { @@ -838,7 +859,7 @@ internal VirtualNetworkGatewaysOperations(NetworkResourceProviderClient client) /// The List VirtualNetworkGateways opertion retrieves all the virtual network /// gateways stored. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// @@ -847,11 +868,11 @@ internal VirtualNetworkGatewaysOperations(NetworkResourceProviderClient client) /// /// Cancellation token. /// - public async Task> ListNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (nextLink == null) + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextLink"); + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing bool shouldTrace = ServiceClientTracing.IsEnabled; @@ -860,13 +881,13 @@ internal VirtualNetworkGatewaysOperations(NetworkResourceProviderClient client) { invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("nextLink", nextLink); + tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(invocationId, this, "ListNext", tracingParameters); } // Construct URL string url = "{nextLink}"; - url = url.Replace("{nextLink}", nextLink); + url = url.Replace("{nextLink}", nextPageLink); List queryParameters = new List(); if (queryParameters.Count > 0) { @@ -935,14 +956,18 @@ internal VirtualNetworkGatewaysOperations(NetworkResourceProviderClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { diff --git a/src/ResourceManagement/Network/NetworkManagement/Generated/VirtualNetworkGatewaysOperationsExtensions.cs b/src/ResourceManagement/Network/NetworkManagement/Generated/VirtualNetworkGatewaysOperationsExtensions.cs index 66499567258d4..b24d66a9d607c 100644 --- a/src/ResourceManagement/Network/NetworkManagement/Generated/VirtualNetworkGatewaysOperationsExtensions.cs +++ b/src/ResourceManagement/Network/NetworkManagement/Generated/VirtualNetworkGatewaysOperationsExtensions.cs @@ -16,7 +16,7 @@ public static partial class VirtualNetworkGatewaysOperationsExtensions /// gateway in the specified resource group through Network resource provider. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -38,7 +38,7 @@ public static VirtualNetworkGateway CreateOrUpdate(this IVirtualNetworkGatewaysO /// gateway in the specified resource group through Network resource provider. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -64,7 +64,7 @@ public static VirtualNetworkGateway CreateOrUpdate(this IVirtualNetworkGatewaysO /// gateway in the specified resource group through Network resource provider. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -86,7 +86,7 @@ public static VirtualNetworkGateway BeginCreateOrUpdate(this IVirtualNetworkGate /// gateway in the specified resource group through Network resource provider. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -112,7 +112,7 @@ public static VirtualNetworkGateway BeginCreateOrUpdate(this IVirtualNetworkGate /// specified virtual network gateway through Network resource provider. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -130,7 +130,7 @@ public static VirtualNetworkGateway Get(this IVirtualNetworkGatewaysOperations o /// specified virtual network gateway through Network resource provider. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -152,7 +152,7 @@ public static VirtualNetworkGateway Get(this IVirtualNetworkGatewaysOperations o /// network Gateway through Network resource provider. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -170,7 +170,7 @@ public static void Delete(this IVirtualNetworkGatewaysOperations operations, str /// network Gateway through Network resource provider. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -191,7 +191,7 @@ public static void Delete(this IVirtualNetworkGatewaysOperations operations, str /// network Gateway through Network resource provider. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -209,7 +209,7 @@ public static void BeginDelete(this IVirtualNetworkGatewaysOperations operations /// network Gateway through Network resource provider. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -230,12 +230,12 @@ public static void BeginDelete(this IVirtualNetworkGatewaysOperations operations /// gateways stored. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. /// - public static VirtualNetworkGatewayListResult List(this IVirtualNetworkGatewaysOperations operations, string resourceGroupName) + public static Page List(this IVirtualNetworkGatewaysOperations operations, string resourceGroupName) { return Task.Factory.StartNew(s => ((IVirtualNetworkGatewaysOperations)s).ListAsync(resourceGroupName), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } @@ -245,7 +245,7 @@ public static VirtualNetworkGatewayListResult List(this IVirtualNetworkGatewaysO /// gateways stored. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -253,9 +253,9 @@ public static VirtualNetworkGatewayListResult List(this IVirtualNetworkGatewaysO /// /// Cancellation token. /// - public static async Task ListAsync( this IVirtualNetworkGatewaysOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListAsync( this IVirtualNetworkGatewaysOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false); return result.Body; } @@ -265,7 +265,7 @@ public static VirtualNetworkGatewayListResult List(this IVirtualNetworkGatewaysO /// resource provider. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -288,7 +288,7 @@ public static VirtualNetworkGateway Reset(this IVirtualNetworkGatewaysOperations /// resource provider. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -315,7 +315,7 @@ public static VirtualNetworkGateway Reset(this IVirtualNetworkGatewaysOperations /// resource provider. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -338,7 +338,7 @@ public static VirtualNetworkGateway BeginReset(this IVirtualNetworkGatewaysOpera /// resource provider. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -364,14 +364,14 @@ public static VirtualNetworkGateway BeginReset(this IVirtualNetworkGatewaysOpera /// gateways stored. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// - public static VirtualNetworkGatewayListResult ListNext(this IVirtualNetworkGatewaysOperations operations, string nextLink) + public static Page ListNext(this IVirtualNetworkGatewaysOperations operations, string nextPageLink) { - return Task.Factory.StartNew(s => ((IVirtualNetworkGatewaysOperations)s).ListNextAsync(nextLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + return Task.Factory.StartNew(s => ((IVirtualNetworkGatewaysOperations)s).ListNextAsync(nextPageLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } /// @@ -379,17 +379,17 @@ public static VirtualNetworkGatewayListResult ListNext(this IVirtualNetworkGatew /// gateways stored. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// /// Cancellation token. /// - public static async Task ListNextAsync( this IVirtualNetworkGatewaysOperations operations, string nextLink, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListNextAsync( this IVirtualNetworkGatewaysOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListNextWithHttpMessagesAsync(nextLink, null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false); return result.Body; } diff --git a/src/ResourceManagement/Network/NetworkManagement/Generated/VirtualNetworksOperations.cs b/src/ResourceManagement/Network/NetworkManagement/Generated/VirtualNetworksOperations.cs index 31be2cab97adf..461bbaecc2490 100644 --- a/src/ResourceManagement/Network/NetworkManagement/Generated/VirtualNetworksOperations.cs +++ b/src/ResourceManagement/Network/NetworkManagement/Generated/VirtualNetworksOperations.cs @@ -11,6 +11,7 @@ namespace Microsoft.Azure.Management.Network using System.Threading.Tasks; using Microsoft.Rest; using Newtonsoft.Json; + using System.Linq; using Microsoft.Azure; using Models; @@ -42,10 +43,10 @@ internal VirtualNetworksOperations(NetworkResourceProviderClient client) /// The name of the virtual network. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { @@ -174,6 +175,10 @@ internal VirtualNetworksOperations(NetworkResourceProviderClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } if (shouldTrace) { ServiceClientTracing.Exit(invocationId, result); @@ -308,6 +313,10 @@ internal VirtualNetworksOperations(NetworkResourceProviderClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { @@ -335,10 +344,10 @@ internal VirtualNetworksOperations(NetworkResourceProviderClient client) /// Parameters supplied to the create/update Virtual Network operation /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string virtualNetworkName, VirtualNetwork parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { @@ -493,6 +502,10 @@ internal VirtualNetworksOperations(NetworkResourceProviderClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { @@ -521,7 +534,7 @@ internal VirtualNetworksOperations(NetworkResourceProviderClient client) /// /// Cancellation token. /// - public async Task> ListAllWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListAllWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (this.Client.ApiVersion == null) { @@ -617,14 +630,18 @@ internal VirtualNetworksOperations(NetworkResourceProviderClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { @@ -645,7 +662,7 @@ internal VirtualNetworksOperations(NetworkResourceProviderClient client) /// /// Cancellation token. /// - public async Task> ListWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -747,14 +764,18 @@ internal VirtualNetworksOperations(NetworkResourceProviderClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { @@ -766,7 +787,7 @@ internal VirtualNetworksOperations(NetworkResourceProviderClient client) /// /// The list VirtualNetwork returns all Virtual Networks in a subscription /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// @@ -775,11 +796,11 @@ internal VirtualNetworksOperations(NetworkResourceProviderClient client) /// /// Cancellation token. /// - public async Task> ListAllNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListAllNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (nextLink == null) + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextLink"); + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing bool shouldTrace = ServiceClientTracing.IsEnabled; @@ -788,13 +809,13 @@ internal VirtualNetworksOperations(NetworkResourceProviderClient client) { invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("nextLink", nextLink); + tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(invocationId, this, "ListAllNext", tracingParameters); } // Construct URL string url = "{nextLink}"; - url = url.Replace("{nextLink}", nextLink); + url = url.Replace("{nextLink}", nextPageLink); List queryParameters = new List(); if (queryParameters.Count > 0) { @@ -863,14 +884,18 @@ internal VirtualNetworksOperations(NetworkResourceProviderClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { @@ -882,7 +907,7 @@ internal VirtualNetworksOperations(NetworkResourceProviderClient client) /// /// The list VirtualNetwork returns all Virtual Networks in a resource group /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// @@ -891,11 +916,11 @@ internal VirtualNetworksOperations(NetworkResourceProviderClient client) /// /// Cancellation token. /// - public async Task> ListNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (nextLink == null) + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextLink"); + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing bool shouldTrace = ServiceClientTracing.IsEnabled; @@ -904,13 +929,13 @@ internal VirtualNetworksOperations(NetworkResourceProviderClient client) { invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("nextLink", nextLink); + tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(invocationId, this, "ListNext", tracingParameters); } // Construct URL string url = "{nextLink}"; - url = url.Replace("{nextLink}", nextLink); + url = url.Replace("{nextLink}", nextPageLink); List queryParameters = new List(); if (queryParameters.Count > 0) { @@ -979,14 +1004,18 @@ internal VirtualNetworksOperations(NetworkResourceProviderClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { diff --git a/src/ResourceManagement/Network/NetworkManagement/Generated/VirtualNetworksOperationsExtensions.cs b/src/ResourceManagement/Network/NetworkManagement/Generated/VirtualNetworksOperationsExtensions.cs index 8b6336fd51bc4..bd0968d9667d4 100644 --- a/src/ResourceManagement/Network/NetworkManagement/Generated/VirtualNetworksOperationsExtensions.cs +++ b/src/ResourceManagement/Network/NetworkManagement/Generated/VirtualNetworksOperationsExtensions.cs @@ -15,7 +15,7 @@ public static partial class VirtualNetworksOperationsExtensions /// The Delete VirtualNetwork operation deletes the specifed virtual network /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -32,7 +32,7 @@ public static void Delete(this IVirtualNetworksOperations operations, string res /// The Delete VirtualNetwork operation deletes the specifed virtual network /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -52,7 +52,7 @@ public static void Delete(this IVirtualNetworksOperations operations, string res /// The Delete VirtualNetwork operation deletes the specifed virtual network /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -69,7 +69,7 @@ public static void BeginDelete(this IVirtualNetworksOperations operations, strin /// The Delete VirtualNetwork operation deletes the specifed virtual network /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -90,7 +90,7 @@ public static void BeginDelete(this IVirtualNetworksOperations operations, strin /// virtual network. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -108,7 +108,7 @@ public static VirtualNetwork Get(this IVirtualNetworksOperations operations, str /// virtual network. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -130,7 +130,7 @@ public static VirtualNetwork Get(this IVirtualNetworksOperations operations, str /// specified resource group. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -151,7 +151,7 @@ public static VirtualNetwork CreateOrUpdate(this IVirtualNetworksOperations oper /// specified resource group. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -176,7 +176,7 @@ public static VirtualNetwork CreateOrUpdate(this IVirtualNetworksOperations oper /// specified resource group. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -197,7 +197,7 @@ public static VirtualNetwork BeginCreateOrUpdate(this IVirtualNetworksOperations /// specified resource group. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -221,9 +221,9 @@ public static VirtualNetwork BeginCreateOrUpdate(this IVirtualNetworksOperations /// The list VirtualNetwork returns all Virtual Networks in a subscription /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - public static VirtualNetworkListResult ListAll(this IVirtualNetworksOperations operations) + public static Page ListAll(this IVirtualNetworksOperations operations) { return Task.Factory.StartNew(s => ((IVirtualNetworksOperations)s).ListAllAsync(), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } @@ -232,14 +232,14 @@ public static VirtualNetworkListResult ListAll(this IVirtualNetworksOperations o /// The list VirtualNetwork returns all Virtual Networks in a subscription /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// Cancellation token. /// - public static async Task ListAllAsync( this IVirtualNetworksOperations operations, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListAllAsync( this IVirtualNetworksOperations operations, CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListAllWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListAllWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false); return result.Body; } @@ -247,12 +247,12 @@ public static VirtualNetworkListResult ListAll(this IVirtualNetworksOperations o /// The list VirtualNetwork returns all Virtual Networks in a resource group /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. /// - public static VirtualNetworkListResult List(this IVirtualNetworksOperations operations, string resourceGroupName) + public static Page List(this IVirtualNetworksOperations operations, string resourceGroupName) { return Task.Factory.StartNew(s => ((IVirtualNetworksOperations)s).ListAsync(resourceGroupName), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } @@ -261,7 +261,7 @@ public static VirtualNetworkListResult List(this IVirtualNetworksOperations oper /// The list VirtualNetwork returns all Virtual Networks in a resource group /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -269,9 +269,9 @@ public static VirtualNetworkListResult List(this IVirtualNetworksOperations oper /// /// Cancellation token. /// - public static async Task ListAsync( this IVirtualNetworksOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListAsync( this IVirtualNetworksOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false); return result.Body; } @@ -279,31 +279,31 @@ public static VirtualNetworkListResult List(this IVirtualNetworksOperations oper /// The list VirtualNetwork returns all Virtual Networks in a subscription /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// - public static VirtualNetworkListResult ListAllNext(this IVirtualNetworksOperations operations, string nextLink) + public static Page ListAllNext(this IVirtualNetworksOperations operations, string nextPageLink) { - return Task.Factory.StartNew(s => ((IVirtualNetworksOperations)s).ListAllNextAsync(nextLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + return Task.Factory.StartNew(s => ((IVirtualNetworksOperations)s).ListAllNextAsync(nextPageLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } /// /// The list VirtualNetwork returns all Virtual Networks in a subscription /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// /// Cancellation token. /// - public static async Task ListAllNextAsync( this IVirtualNetworksOperations operations, string nextLink, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListAllNextAsync( this IVirtualNetworksOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListAllNextWithHttpMessagesAsync(nextLink, null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListAllNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false); return result.Body; } @@ -311,31 +311,31 @@ public static VirtualNetworkListResult ListAllNext(this IVirtualNetworksOperatio /// The list VirtualNetwork returns all Virtual Networks in a resource group /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// - public static VirtualNetworkListResult ListNext(this IVirtualNetworksOperations operations, string nextLink) + public static Page ListNext(this IVirtualNetworksOperations operations, string nextPageLink) { - return Task.Factory.StartNew(s => ((IVirtualNetworksOperations)s).ListNextAsync(nextLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + return Task.Factory.StartNew(s => ((IVirtualNetworksOperations)s).ListNextAsync(nextPageLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } /// /// The list VirtualNetwork returns all Virtual Networks in a resource group /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// /// Cancellation token. /// - public static async Task ListNextAsync( this IVirtualNetworksOperations operations, string nextLink, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListNextAsync( this IVirtualNetworksOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListNextWithHttpMessagesAsync(nextLink, null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false); return result.Body; } diff --git a/src/ResourceManagement/Network/NetworkManagement/NetworkManagement.csproj b/src/ResourceManagement/Network/NetworkManagement/NetworkManagement.csproj index 94d2b6c90fa3e..60e182bb3d1c6 100644 --- a/src/ResourceManagement/Network/NetworkManagement/NetworkManagement.csproj +++ b/src/ResourceManagement/Network/NetworkManagement/NetworkManagement.csproj @@ -33,6 +33,39 @@ True + + + + + $(LibraryNugetPackageFolder)\Newtonsoft.Json.6.0.4\lib\portable-net45+wp80+win8+wpa81\Newtonsoft.Json.dll + + + $(LibraryNugetPackageFolder)\Microsoft.Rest.ClientRuntime.1.1.0\lib\portable-net45+win8+wpa81\Microsoft.Rest.ClientRuntime.dll + + + $(LibraryNugetPackageFolder)\Microsoft.Rest.ClientRuntime.Azure.1.0.13\lib\portable-net45+win8+wpa81\Microsoft.Rest.ClientRuntime.Azure.dll + + + + + + + + + + + + $(LibraryNugetPackageFolder)\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll + + + $(LibraryNugetPackageFolder)\Microsoft.Rest.ClientRuntime.1.1.0\lib\net45\Microsoft.Rest.ClientRuntime.dll + + + $(LibraryNugetPackageFolder)\Microsoft.Rest.ClientRuntime.Azure.1.0.13\lib\net45\Microsoft.Rest.ClientRuntime.Azure.dll + + + + diff --git a/src/ResourceManagement/Resource/ResourceManagement/Generated/AuthorizationClient.cs b/src/ResourceManagement/Resource/ResourceManagement/Generated/AuthorizationClient.cs index 50df873904598..b6e04b13e86d0 100644 --- a/src/ResourceManagement/Resource/ResourceManagement/Generated/AuthorizationClient.cs +++ b/src/ResourceManagement/Resource/ResourceManagement/Generated/AuthorizationClient.cs @@ -13,8 +13,9 @@ namespace Microsoft.Azure.Management.Resources using Microsoft.Rest; using Microsoft.Rest.Serialization; using Newtonsoft.Json; - using Microsoft.Azure.OData; + using System.Linq; using System.Linq.Expressions; + using Microsoft.Azure.OData; using Microsoft.Azure; using Models; @@ -38,10 +39,9 @@ public partial class AuthorizationClient : ServiceClient, I public JsonSerializerSettings DeserializationSettings { get; private set; } /// - /// Subscription credentials which uniquely identify Microsoft Azure - /// subscription. + /// Management credentials for Azure. /// - public SubscriptionCloudCredentials Credentials { get; private set; } + public ServiceClientCredentials Credentials { get; private set; } /// /// Gets subscription credentials which uniquely identify Microsoft @@ -125,13 +125,13 @@ public AuthorizationClient(Uri baseUri, params DelegatingHandler[] handlers) : t /// Initializes a new instance of the AuthorizationClient class. /// /// - /// Required. Subscription credentials which uniquely identify Microsoft Azure subscription. + /// Required. Management credentials for Azure. /// /// /// Optional. The set of delegating handlers to insert in the http /// client pipeline. /// - public AuthorizationClient(SubscriptionCloudCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) + public AuthorizationClient(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) { if (credentials == null) { @@ -147,13 +147,13 @@ public AuthorizationClient(SubscriptionCloudCredentials credentials, params Dele /// Optional. The base URI of the service. /// /// - /// Required. Subscription credentials which uniquely identify Microsoft Azure subscription. + /// Required. Management credentials for Azure. /// /// /// Optional. The set of delegating handlers to insert in the http /// client pipeline. /// - public AuthorizationClient(Uri baseUri, SubscriptionCloudCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) + public AuthorizationClient(Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) { @@ -176,10 +176,6 @@ private void Initialize() this.BaseUri = new Uri("https://management.azure.com"); this.ApiVersion = "2015-01-01"; this.AcceptLanguage = "en-US"; - if (this.Credentials != null) - { - this.Credentials.InitializeServiceClient(this); - } SerializationSettings = new JsonSerializerSettings { Formatting = Formatting.Indented, diff --git a/src/ResourceManagement/Resource/ResourceManagement/Generated/DeploymentOperationsOperations.cs b/src/ResourceManagement/Resource/ResourceManagement/Generated/DeploymentOperationsOperations.cs index e62e38e36a713..edc18250f6599 100644 --- a/src/ResourceManagement/Resource/ResourceManagement/Generated/DeploymentOperationsOperations.cs +++ b/src/ResourceManagement/Resource/ResourceManagement/Generated/DeploymentOperationsOperations.cs @@ -11,8 +11,9 @@ namespace Microsoft.Azure.Management.Resources using System.Threading.Tasks; using Microsoft.Rest; using Newtonsoft.Json; - using Microsoft.Azure.OData; + using System.Linq; using System.Linq.Expressions; + using Microsoft.Azure.OData; using Microsoft.Azure; using Models; @@ -169,6 +170,10 @@ internal DeploymentOperationsOperations(ResourceManagementClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { @@ -200,7 +205,7 @@ internal DeploymentOperationsOperations(ResourceManagementClient client) /// /// Cancellation token. /// - public async Task> ListWithHttpMessagesAsync(string resourceGroupName, string deploymentName, int? top = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListWithHttpMessagesAsync(string resourceGroupName, string deploymentName, int? top = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -313,14 +318,18 @@ internal DeploymentOperationsOperations(ResourceManagementClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { @@ -332,7 +341,7 @@ internal DeploymentOperationsOperations(ResourceManagementClient client) /// /// Gets a list of deployments operations. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// @@ -341,11 +350,11 @@ internal DeploymentOperationsOperations(ResourceManagementClient client) /// /// Cancellation token. /// - public async Task> ListNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (nextLink == null) + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextLink"); + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing bool shouldTrace = ServiceClientTracing.IsEnabled; @@ -354,13 +363,13 @@ internal DeploymentOperationsOperations(ResourceManagementClient client) { invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("nextLink", nextLink); + tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(invocationId, this, "ListNext", tracingParameters); } // Construct URL string url = "{nextLink}"; - url = url.Replace("{nextLink}", nextLink); + url = url.Replace("{nextLink}", nextPageLink); List queryParameters = new List(); if (queryParameters.Count > 0) { @@ -429,14 +438,18 @@ internal DeploymentOperationsOperations(ResourceManagementClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { diff --git a/src/ResourceManagement/Resource/ResourceManagement/Generated/DeploymentOperationsOperationsExtensions.cs b/src/ResourceManagement/Resource/ResourceManagement/Generated/DeploymentOperationsOperationsExtensions.cs index 89c2e617d7abf..c7876598edfee 100644 --- a/src/ResourceManagement/Resource/ResourceManagement/Generated/DeploymentOperationsOperationsExtensions.cs +++ b/src/ResourceManagement/Resource/ResourceManagement/Generated/DeploymentOperationsOperationsExtensions.cs @@ -16,7 +16,7 @@ public static partial class DeploymentOperationsOperationsExtensions /// Get a list of deployments operations. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. The name is case insensitive. @@ -36,7 +36,7 @@ public static DeploymentOperation Get(this IDeploymentOperationsOperations opera /// Get a list of deployments operations. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. The name is case insensitive. @@ -60,7 +60,7 @@ public static DeploymentOperation Get(this IDeploymentOperationsOperations opera /// Gets a list of deployments operations. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. The name is case insensitive. @@ -71,7 +71,7 @@ public static DeploymentOperation Get(this IDeploymentOperationsOperations opera /// /// Query parameters. /// - public static DeploymentOperationsListResult List(this IDeploymentOperationsOperations operations, string resourceGroupName, string deploymentName, int? top = default(int?)) + public static Page List(this IDeploymentOperationsOperations operations, string resourceGroupName, string deploymentName, int? top = default(int?)) { return Task.Factory.StartNew(s => ((IDeploymentOperationsOperations)s).ListAsync(resourceGroupName, deploymentName, top), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } @@ -80,7 +80,7 @@ public static DeploymentOperation Get(this IDeploymentOperationsOperations opera /// Gets a list of deployments operations. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. The name is case insensitive. @@ -94,9 +94,9 @@ public static DeploymentOperation Get(this IDeploymentOperationsOperations opera /// /// Cancellation token. /// - public static async Task ListAsync( this IDeploymentOperationsOperations operations, string resourceGroupName, string deploymentName, int? top = default(int?), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListAsync( this IDeploymentOperationsOperations operations, string resourceGroupName, string deploymentName, int? top = default(int?), CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListWithHttpMessagesAsync(resourceGroupName, deploymentName, top, null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListWithHttpMessagesAsync(resourceGroupName, deploymentName, top, null, cancellationToken).ConfigureAwait(false); return result.Body; } @@ -104,31 +104,31 @@ public static DeploymentOperation Get(this IDeploymentOperationsOperations opera /// Gets a list of deployments operations. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// - public static DeploymentOperationsListResult ListNext(this IDeploymentOperationsOperations operations, string nextLink) + public static Page ListNext(this IDeploymentOperationsOperations operations, string nextPageLink) { - return Task.Factory.StartNew(s => ((IDeploymentOperationsOperations)s).ListNextAsync(nextLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + return Task.Factory.StartNew(s => ((IDeploymentOperationsOperations)s).ListNextAsync(nextPageLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } /// /// Gets a list of deployments operations. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// /// Cancellation token. /// - public static async Task ListNextAsync( this IDeploymentOperationsOperations operations, string nextLink, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListNextAsync( this IDeploymentOperationsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListNextWithHttpMessagesAsync(nextLink, null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false); return result.Body; } diff --git a/src/ResourceManagement/Resource/ResourceManagement/Generated/DeploymentsOperations.cs b/src/ResourceManagement/Resource/ResourceManagement/Generated/DeploymentsOperations.cs index d9cb074499f8d..bd8cefce989d7 100644 --- a/src/ResourceManagement/Resource/ResourceManagement/Generated/DeploymentsOperations.cs +++ b/src/ResourceManagement/Resource/ResourceManagement/Generated/DeploymentsOperations.cs @@ -11,8 +11,9 @@ namespace Microsoft.Azure.Management.Resources using System.Threading.Tasks; using Microsoft.Rest; using Newtonsoft.Json; - using Microsoft.Azure.OData; + using System.Linq; using System.Linq.Expressions; + using Microsoft.Azure.OData; using Microsoft.Azure; using Models; @@ -153,6 +154,10 @@ internal DeploymentsOperations(ResourceManagementClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } if (shouldTrace) { ServiceClientTracing.Exit(invocationId, result); @@ -298,6 +303,10 @@ internal DeploymentsOperations(ResourceManagementClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { @@ -455,6 +464,10 @@ internal DeploymentsOperations(ResourceManagementClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { @@ -600,6 +613,10 @@ internal DeploymentsOperations(ResourceManagementClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { @@ -631,7 +648,7 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// Cancellation token. /// - public async Task> ListWithHttpMessagesAsync(string resourceGroupName, Expression> filter = default(Expression>), int? top = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListWithHttpMessagesAsync(string resourceGroupName, Expression> filter = default(Expression>), int? top = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -743,14 +760,18 @@ internal DeploymentsOperations(ResourceManagementClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { @@ -762,7 +783,7 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// Get a list of deployments. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// @@ -771,11 +792,11 @@ internal DeploymentsOperations(ResourceManagementClient client) /// /// Cancellation token. /// - public async Task> ListNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (nextLink == null) + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextLink"); + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing bool shouldTrace = ServiceClientTracing.IsEnabled; @@ -784,13 +805,13 @@ internal DeploymentsOperations(ResourceManagementClient client) { invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("nextLink", nextLink); + tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(invocationId, this, "ListNext", tracingParameters); } // Construct URL string url = "{nextLink}"; - url = url.Replace("{nextLink}", nextLink); + url = url.Replace("{nextLink}", nextPageLink); List queryParameters = new List(); if (queryParameters.Count > 0) { @@ -859,14 +880,18 @@ internal DeploymentsOperations(ResourceManagementClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { diff --git a/src/ResourceManagement/Resource/ResourceManagement/Generated/DeploymentsOperationsExtensions.cs b/src/ResourceManagement/Resource/ResourceManagement/Generated/DeploymentsOperationsExtensions.cs index ad2ad5a584b12..23da2a82e95f7 100644 --- a/src/ResourceManagement/Resource/ResourceManagement/Generated/DeploymentsOperationsExtensions.cs +++ b/src/ResourceManagement/Resource/ResourceManagement/Generated/DeploymentsOperationsExtensions.cs @@ -16,7 +16,7 @@ public static partial class DeploymentsOperationsExtensions /// Cancel a currently running template deployment. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. The name is case insensitive. @@ -33,7 +33,7 @@ public static void Cancel(this IDeploymentsOperations operations, string resourc /// Cancel a currently running template deployment. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. The name is case insensitive. @@ -53,7 +53,7 @@ public static void Cancel(this IDeploymentsOperations operations, string resourc /// Validate a deployment template. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. The name is case insensitive. @@ -73,7 +73,7 @@ public static DeploymentValidateResult Validate(this IDeploymentsOperations oper /// Validate a deployment template. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. The name is case insensitive. @@ -97,7 +97,7 @@ public static DeploymentValidateResult Validate(this IDeploymentsOperations oper /// Create a named template deployment using a template. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. The name is case insensitive. @@ -117,7 +117,7 @@ public static DeploymentExtended CreateOrUpdate(this IDeploymentsOperations oper /// Create a named template deployment using a template. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. The name is case insensitive. @@ -141,7 +141,7 @@ public static DeploymentExtended CreateOrUpdate(this IDeploymentsOperations oper /// Get a deployment. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group to get. The name is case insensitive. @@ -158,7 +158,7 @@ public static DeploymentExtended Get(this IDeploymentsOperations operations, str /// Get a deployment. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group to get. The name is case insensitive. @@ -179,7 +179,7 @@ public static DeploymentExtended Get(this IDeploymentsOperations operations, str /// Get a list of deployments. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group to filter by. The name is case insensitive. @@ -190,7 +190,7 @@ public static DeploymentExtended Get(this IDeploymentsOperations operations, str /// /// Query parameters. If null is passed returns all deployments. /// - public static DeploymentListResult List(this IDeploymentsOperations operations, string resourceGroupName, Expression> filter = default(Expression>), int? top = default(int?)) + public static Page List(this IDeploymentsOperations operations, string resourceGroupName, Expression> filter = default(Expression>), int? top = default(int?)) { return Task.Factory.StartNew(s => ((IDeploymentsOperations)s).ListAsync(resourceGroupName, filter, top), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } @@ -199,7 +199,7 @@ public static DeploymentExtended Get(this IDeploymentsOperations operations, str /// Get a list of deployments. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group to filter by. The name is case insensitive. @@ -213,9 +213,9 @@ public static DeploymentExtended Get(this IDeploymentsOperations operations, str /// /// Cancellation token. /// - public static async Task ListAsync( this IDeploymentsOperations operations, string resourceGroupName, Expression> filter = default(Expression>), int? top = default(int?), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListAsync( this IDeploymentsOperations operations, string resourceGroupName, Expression> filter = default(Expression>), int? top = default(int?), CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListWithHttpMessagesAsync(resourceGroupName, filter, top, null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListWithHttpMessagesAsync(resourceGroupName, filter, top, null, cancellationToken).ConfigureAwait(false); return result.Body; } @@ -223,31 +223,31 @@ public static DeploymentExtended Get(this IDeploymentsOperations operations, str /// Get a list of deployments. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// - public static DeploymentListResult ListNext(this IDeploymentsOperations operations, string nextLink) + public static Page ListNext(this IDeploymentsOperations operations, string nextPageLink) { - return Task.Factory.StartNew(s => ((IDeploymentsOperations)s).ListNextAsync(nextLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + return Task.Factory.StartNew(s => ((IDeploymentsOperations)s).ListNextAsync(nextPageLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } /// /// Get a list of deployments. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// /// Cancellation token. /// - public static async Task ListNextAsync( this IDeploymentsOperations operations, string nextLink, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListNextAsync( this IDeploymentsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListNextWithHttpMessagesAsync(nextLink, null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false); return result.Body; } diff --git a/src/ResourceManagement/Resource/ResourceManagement/Generated/FeatureClient.cs b/src/ResourceManagement/Resource/ResourceManagement/Generated/FeatureClient.cs index 9052e52f2225b..1deafa6573385 100644 --- a/src/ResourceManagement/Resource/ResourceManagement/Generated/FeatureClient.cs +++ b/src/ResourceManagement/Resource/ResourceManagement/Generated/FeatureClient.cs @@ -13,6 +13,7 @@ namespace Microsoft.Azure.Management.Resources using Microsoft.Rest; using Microsoft.Rest.Serialization; using Newtonsoft.Json; + using System.Linq; using Microsoft.Azure; using Models; @@ -36,10 +37,9 @@ public partial class FeatureClient : ServiceClient, IFeatureClien public JsonSerializerSettings DeserializationSettings { get; private set; } /// - /// Subscription credentials which uniquely identify Microsoft Azure - /// subscription. + /// Management credentials for Azure. /// - public SubscriptionCloudCredentials Credentials { get; private set; } + public ServiceClientCredentials Credentials { get; private set; } /// /// Gets subscription credentials which uniquely identify Microsoft @@ -123,13 +123,13 @@ public FeatureClient(Uri baseUri, params DelegatingHandler[] handlers) : this(ha /// Initializes a new instance of the FeatureClient class. /// /// - /// Required. Subscription credentials which uniquely identify Microsoft Azure subscription. + /// Required. Management credentials for Azure. /// /// /// Optional. The set of delegating handlers to insert in the http /// client pipeline. /// - public FeatureClient(SubscriptionCloudCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) + public FeatureClient(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) { if (credentials == null) { @@ -145,13 +145,13 @@ public FeatureClient(SubscriptionCloudCredentials credentials, params Delegating /// Optional. The base URI of the service. /// /// - /// Required. Subscription credentials which uniquely identify Microsoft Azure subscription. + /// Required. Management credentials for Azure. /// /// /// Optional. The set of delegating handlers to insert in the http /// client pipeline. /// - public FeatureClient(Uri baseUri, SubscriptionCloudCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) + public FeatureClient(Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) { @@ -174,10 +174,6 @@ private void Initialize() this.BaseUri = new Uri("https://management.azure.com"); this.ApiVersion = "2014-08-01-preview"; this.AcceptLanguage = "en-US"; - if (this.Credentials != null) - { - this.Credentials.InitializeServiceClient(this); - } SerializationSettings = new JsonSerializerSettings { Formatting = Formatting.Indented, diff --git a/src/ResourceManagement/Resource/ResourceManagement/Generated/FeaturesOperations.cs b/src/ResourceManagement/Resource/ResourceManagement/Generated/FeaturesOperations.cs index 3ff2561bb7d8a..718d0231f501b 100644 --- a/src/ResourceManagement/Resource/ResourceManagement/Generated/FeaturesOperations.cs +++ b/src/ResourceManagement/Resource/ResourceManagement/Generated/FeaturesOperations.cs @@ -11,6 +11,7 @@ namespace Microsoft.Azure.Management.Resources using System.Threading.Tasks; using Microsoft.Rest; using Newtonsoft.Json; + using System.Linq; using Microsoft.Azure; using Models; @@ -42,7 +43,7 @@ internal FeaturesOperations(FeatureClient client) /// /// Cancellation token. /// - public async Task> ListAllWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListAllWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (this.Client.ApiVersion == null) { @@ -138,14 +139,18 @@ internal FeaturesOperations(FeatureClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { @@ -166,7 +171,7 @@ internal FeaturesOperations(FeatureClient client) /// /// Cancellation token. /// - public async Task> ListWithHttpMessagesAsync(string resourceProviderNamespace, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListWithHttpMessagesAsync(string resourceProviderNamespace, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceProviderNamespace == null) { @@ -268,14 +273,18 @@ internal FeaturesOperations(FeatureClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { @@ -410,6 +419,10 @@ internal FeaturesOperations(FeatureClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { @@ -549,6 +562,10 @@ internal FeaturesOperations(FeatureClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { @@ -566,7 +583,7 @@ internal FeaturesOperations(FeatureClient client) /// Gets a list of previewed features for all the providers in the current /// subscription. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// @@ -575,11 +592,11 @@ internal FeaturesOperations(FeatureClient client) /// /// Cancellation token. /// - public async Task> ListAllNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListAllNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (nextLink == null) + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextLink"); + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing bool shouldTrace = ServiceClientTracing.IsEnabled; @@ -588,13 +605,13 @@ internal FeaturesOperations(FeatureClient client) { invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("nextLink", nextLink); + tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(invocationId, this, "ListAllNext", tracingParameters); } // Construct URL string url = "{nextLink}"; - url = url.Replace("{nextLink}", nextLink); + url = url.Replace("{nextLink}", nextPageLink); List queryParameters = new List(); if (queryParameters.Count > 0) { @@ -663,14 +680,18 @@ internal FeaturesOperations(FeatureClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { @@ -682,7 +703,7 @@ internal FeaturesOperations(FeatureClient client) /// /// Gets a list of previewed features of a resource provider. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// @@ -691,11 +712,11 @@ internal FeaturesOperations(FeatureClient client) /// /// Cancellation token. /// - public async Task> ListNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (nextLink == null) + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextLink"); + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing bool shouldTrace = ServiceClientTracing.IsEnabled; @@ -704,13 +725,13 @@ internal FeaturesOperations(FeatureClient client) { invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("nextLink", nextLink); + tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(invocationId, this, "ListNext", tracingParameters); } // Construct URL string url = "{nextLink}"; - url = url.Replace("{nextLink}", nextLink); + url = url.Replace("{nextLink}", nextPageLink); List queryParameters = new List(); if (queryParameters.Count > 0) { @@ -779,14 +800,18 @@ internal FeaturesOperations(FeatureClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { diff --git a/src/ResourceManagement/Resource/ResourceManagement/Generated/FeaturesOperationsExtensions.cs b/src/ResourceManagement/Resource/ResourceManagement/Generated/FeaturesOperationsExtensions.cs index a6128ed15747a..49df6cf328822 100644 --- a/src/ResourceManagement/Resource/ResourceManagement/Generated/FeaturesOperationsExtensions.cs +++ b/src/ResourceManagement/Resource/ResourceManagement/Generated/FeaturesOperationsExtensions.cs @@ -16,9 +16,9 @@ public static partial class FeaturesOperationsExtensions /// subscription. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - public static FeatureOperationsListResult ListAll(this IFeaturesOperations operations) + public static Page ListAll(this IFeaturesOperations operations) { return Task.Factory.StartNew(s => ((IFeaturesOperations)s).ListAllAsync(), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } @@ -28,14 +28,14 @@ public static FeatureOperationsListResult ListAll(this IFeaturesOperations opera /// subscription. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// Cancellation token. /// - public static async Task ListAllAsync( this IFeaturesOperations operations, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListAllAsync( this IFeaturesOperations operations, CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListAllWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListAllWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false); return result.Body; } @@ -43,12 +43,12 @@ public static FeatureOperationsListResult ListAll(this IFeaturesOperations opera /// Gets a list of previewed features of a resource provider. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The namespace of the resource provider. /// - public static FeatureOperationsListResult List(this IFeaturesOperations operations, string resourceProviderNamespace) + public static Page List(this IFeaturesOperations operations, string resourceProviderNamespace) { return Task.Factory.StartNew(s => ((IFeaturesOperations)s).ListAsync(resourceProviderNamespace), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } @@ -57,7 +57,7 @@ public static FeatureOperationsListResult List(this IFeaturesOperations operatio /// Gets a list of previewed features of a resource provider. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The namespace of the resource provider. @@ -65,9 +65,9 @@ public static FeatureOperationsListResult List(this IFeaturesOperations operatio /// /// Cancellation token. /// - public static async Task ListAsync( this IFeaturesOperations operations, string resourceProviderNamespace, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListAsync( this IFeaturesOperations operations, string resourceProviderNamespace, CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListWithHttpMessagesAsync(resourceProviderNamespace, null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListWithHttpMessagesAsync(resourceProviderNamespace, null, cancellationToken).ConfigureAwait(false); return result.Body; } @@ -75,7 +75,7 @@ public static FeatureOperationsListResult List(this IFeaturesOperations operatio /// Get all features under the subscription. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// Namespace of the resource provider. @@ -92,7 +92,7 @@ public static FeatureResult Get(this IFeaturesOperations operations, string reso /// Get all features under the subscription. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// Namespace of the resource provider. @@ -113,7 +113,7 @@ public static FeatureResult Get(this IFeaturesOperations operations, string reso /// Registers for a previewed feature of a resource provider. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// Namespace of the resource provider. @@ -130,7 +130,7 @@ public static FeatureResult Register(this IFeaturesOperations operations, string /// Registers for a previewed feature of a resource provider. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// Namespace of the resource provider. @@ -152,14 +152,14 @@ public static FeatureResult Register(this IFeaturesOperations operations, string /// subscription. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// - public static FeatureOperationsListResult ListAllNext(this IFeaturesOperations operations, string nextLink) + public static Page ListAllNext(this IFeaturesOperations operations, string nextPageLink) { - return Task.Factory.StartNew(s => ((IFeaturesOperations)s).ListAllNextAsync(nextLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + return Task.Factory.StartNew(s => ((IFeaturesOperations)s).ListAllNextAsync(nextPageLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } /// @@ -167,17 +167,17 @@ public static FeatureOperationsListResult ListAllNext(this IFeaturesOperations o /// subscription. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// /// Cancellation token. /// - public static async Task ListAllNextAsync( this IFeaturesOperations operations, string nextLink, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListAllNextAsync( this IFeaturesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListAllNextWithHttpMessagesAsync(nextLink, null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListAllNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false); return result.Body; } @@ -185,31 +185,31 @@ public static FeatureOperationsListResult ListAllNext(this IFeaturesOperations o /// Gets a list of previewed features of a resource provider. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// - public static FeatureOperationsListResult ListNext(this IFeaturesOperations operations, string nextLink) + public static Page ListNext(this IFeaturesOperations operations, string nextPageLink) { - return Task.Factory.StartNew(s => ((IFeaturesOperations)s).ListNextAsync(nextLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + return Task.Factory.StartNew(s => ((IFeaturesOperations)s).ListNextAsync(nextPageLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } /// /// Gets a list of previewed features of a resource provider. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// /// Cancellation token. /// - public static async Task ListNextAsync( this IFeaturesOperations operations, string nextLink, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListNextAsync( this IFeaturesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListNextWithHttpMessagesAsync(nextLink, null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false); return result.Body; } diff --git a/src/ResourceManagement/Resource/ResourceManagement/Generated/IAuthorizationClient.cs b/src/ResourceManagement/Resource/ResourceManagement/Generated/IAuthorizationClient.cs index 36f699ffac450..e84c7e8ad0cef 100644 --- a/src/ResourceManagement/Resource/ResourceManagement/Generated/IAuthorizationClient.cs +++ b/src/ResourceManagement/Resource/ResourceManagement/Generated/IAuthorizationClient.cs @@ -7,8 +7,9 @@ namespace Microsoft.Azure.Management.Resources using System.Threading.Tasks; using Newtonsoft.Json; using Microsoft.Rest; - using Microsoft.Azure.OData; + using System.Linq; using System.Linq.Expressions; + using Microsoft.Azure.OData; using Microsoft.Azure; using Models; @@ -32,10 +33,9 @@ public partial interface IAuthorizationClient JsonSerializerSettings DeserializationSettings { get; } /// - /// Subscription credentials which uniquely identify Microsoft Azure - /// subscription. + /// Management credentials for Azure. /// - SubscriptionCloudCredentials Credentials { get; } + ServiceClientCredentials Credentials { get; } /// /// Gets subscription credentials which uniquely identify Microsoft diff --git a/src/ResourceManagement/Resource/ResourceManagement/Generated/IDeploymentOperationsOperations.cs b/src/ResourceManagement/Resource/ResourceManagement/Generated/IDeploymentOperationsOperations.cs index 44d5c9bf7f4c7..04658c5f9cc65 100644 --- a/src/ResourceManagement/Resource/ResourceManagement/Generated/IDeploymentOperationsOperations.cs +++ b/src/ResourceManagement/Resource/ResourceManagement/Generated/IDeploymentOperationsOperations.cs @@ -6,8 +6,9 @@ namespace Microsoft.Azure.Management.Resources using System.Threading; using System.Threading.Tasks; using Microsoft.Rest; - using Microsoft.Azure.OData; + using System.Linq; using System.Linq.Expressions; + using Microsoft.Azure.OData; using Microsoft.Azure; using Models; @@ -28,10 +29,10 @@ public partial interface IDeploymentOperationsOperations /// Operation Id. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> GetWithHttpMessagesAsync(string resourceGroupName, string deploymentName, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -47,24 +48,24 @@ public partial interface IDeploymentOperationsOperations /// Query parameters. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListWithHttpMessagesAsync(string resourceGroupName, string deploymentName, int? top = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListWithHttpMessagesAsync(string resourceGroupName, string deploymentName, int? top = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Gets a list of deployments operations. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/src/ResourceManagement/Resource/ResourceManagement/Generated/IDeploymentsOperations.cs b/src/ResourceManagement/Resource/ResourceManagement/Generated/IDeploymentsOperations.cs index b8bbc1e22bdf2..add56758c988d 100644 --- a/src/ResourceManagement/Resource/ResourceManagement/Generated/IDeploymentsOperations.cs +++ b/src/ResourceManagement/Resource/ResourceManagement/Generated/IDeploymentsOperations.cs @@ -6,8 +6,9 @@ namespace Microsoft.Azure.Management.Resources using System.Threading; using System.Threading.Tasks; using Microsoft.Rest; - using Microsoft.Azure.OData; + using System.Linq; using System.Linq.Expressions; + using Microsoft.Azure.OData; using Microsoft.Azure; using Models; @@ -25,10 +26,10 @@ public partial interface IDeploymentsOperations /// The name of the deployment. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task CancelWithHttpMessagesAsync(string resourceGroupName, string deploymentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -44,10 +45,10 @@ public partial interface IDeploymentsOperations /// Deployment to validate. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> ValidateWithHttpMessagesAsync(string resourceGroupName, string deploymentName, Deployment parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -63,10 +64,10 @@ public partial interface IDeploymentsOperations /// Additional parameters supplied to the operation. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string deploymentName, Deployment parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -80,10 +81,10 @@ public partial interface IDeploymentsOperations /// The name of the deployment. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> GetWithHttpMessagesAsync(string resourceGroupName, string deploymentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -100,24 +101,24 @@ public partial interface IDeploymentsOperations /// Query parameters. If null is passed returns all deployments. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListWithHttpMessagesAsync(string resourceGroupName, Expression> filter = default(Expression>), int? top = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListWithHttpMessagesAsync(string resourceGroupName, Expression> filter = default(Expression>), int? top = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get a list of deployments. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/src/ResourceManagement/Resource/ResourceManagement/Generated/IFeatureClient.cs b/src/ResourceManagement/Resource/ResourceManagement/Generated/IFeatureClient.cs index 58df4a7d40f1c..fa34a7c83c558 100644 --- a/src/ResourceManagement/Resource/ResourceManagement/Generated/IFeatureClient.cs +++ b/src/ResourceManagement/Resource/ResourceManagement/Generated/IFeatureClient.cs @@ -7,6 +7,7 @@ namespace Microsoft.Azure.Management.Resources using System.Threading.Tasks; using Newtonsoft.Json; using Microsoft.Rest; + using System.Linq; using Microsoft.Azure; using Models; @@ -30,10 +31,9 @@ public partial interface IFeatureClient JsonSerializerSettings DeserializationSettings { get; } /// - /// Subscription credentials which uniquely identify Microsoft Azure - /// subscription. + /// Management credentials for Azure. /// - SubscriptionCloudCredentials Credentials { get; } + ServiceClientCredentials Credentials { get; } /// /// Gets subscription credentials which uniquely identify Microsoft diff --git a/src/ResourceManagement/Resource/ResourceManagement/Generated/IFeaturesOperations.cs b/src/ResourceManagement/Resource/ResourceManagement/Generated/IFeaturesOperations.cs index b2d63097a4a41..a1117bd095128 100644 --- a/src/ResourceManagement/Resource/ResourceManagement/Generated/IFeaturesOperations.cs +++ b/src/ResourceManagement/Resource/ResourceManagement/Generated/IFeaturesOperations.cs @@ -6,6 +6,7 @@ namespace Microsoft.Azure.Management.Resources using System.Threading; using System.Threading.Tasks; using Microsoft.Rest; + using System.Linq; using Microsoft.Azure; using Models; @@ -18,12 +19,12 @@ public partial interface IFeaturesOperations /// current subscription. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListAllWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListAllWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Gets a list of previewed features of a resource provider. /// @@ -31,12 +32,12 @@ public partial interface IFeaturesOperations /// The namespace of the resource provider. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListWithHttpMessagesAsync(string resourceProviderNamespace, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListWithHttpMessagesAsync(string resourceProviderNamespace, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get all features under the subscription. /// @@ -47,10 +48,10 @@ public partial interface IFeaturesOperations /// Previewed feature name in the resource provider. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> GetWithHttpMessagesAsync(string resourceProviderNamespace, string featureName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -63,38 +64,38 @@ public partial interface IFeaturesOperations /// Previewed feature name in the resource provider. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> RegisterWithHttpMessagesAsync(string resourceProviderNamespace, string featureName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Gets a list of previewed features for all the providers in the /// current subscription. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListAllNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListAllNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Gets a list of previewed features of a resource provider. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/src/ResourceManagement/Resource/ResourceManagement/Generated/IManagementLocksOperations.cs b/src/ResourceManagement/Resource/ResourceManagement/Generated/IManagementLocksOperations.cs index 3854edb038646..7b0fd270b1db3 100644 --- a/src/ResourceManagement/Resource/ResourceManagement/Generated/IManagementLocksOperations.cs +++ b/src/ResourceManagement/Resource/ResourceManagement/Generated/IManagementLocksOperations.cs @@ -6,8 +6,9 @@ namespace Microsoft.Azure.Management.Resources using System.Threading; using System.Threading.Tasks; using Microsoft.Rest; - using Microsoft.Azure.OData; + using System.Linq; using System.Linq.Expressions; + using Microsoft.Azure.OData; using Microsoft.Azure; using Models; @@ -28,10 +29,10 @@ public partial interface IManagementLocksOperations /// The management lock parameters. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> CreateOrUpdateAtResourceGroupLevelWithHttpMessagesAsync(string resourceGroupName, string lockName, ManagementLockProperties parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -60,10 +61,10 @@ public partial interface IManagementLocksOperations /// Create or update management lock parameters. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> CreateOrUpdateAtResourceLevelWithHttpMessagesAsync(string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string lockName, ManagementLockProperties parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -89,10 +90,10 @@ public partial interface IManagementLocksOperations /// The name of lock. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task DeleteAtResourceLevelWithHttpMessagesAsync(string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string lockName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -105,10 +106,10 @@ public partial interface IManagementLocksOperations /// The management lock parameters. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> CreateOrUpdateAtSubscriptionLevelWithHttpMessagesAsync(string lockName, ManagementLockProperties parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -118,10 +119,10 @@ public partial interface IManagementLocksOperations /// The name of lock. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task DeleteAtSubscriptionLevelWithHttpMessagesAsync(string lockName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -131,10 +132,10 @@ public partial interface IManagementLocksOperations /// Name of the management lock. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> GetWithHttpMessagesAsync(string lockName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -147,10 +148,10 @@ public partial interface IManagementLocksOperations /// The name of lock. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task DeleteAtResourceGroupLevelWithHttpMessagesAsync(string resourceGroup, string lockName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -163,12 +164,12 @@ public partial interface IManagementLocksOperations /// The filter to apply on the operation. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListAtResourceGroupLevelWithHttpMessagesAsync(string resourceGroupName, Expression> filter = default(Expression>), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListAtResourceGroupLevelWithHttpMessagesAsync(string resourceGroupName, Expression> filter = default(Expression>), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Gets all the management locks of a resource or any level below /// resource. @@ -192,12 +193,12 @@ public partial interface IManagementLocksOperations /// The filter to apply on the operation. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListAtResourceLevelWithHttpMessagesAsync(string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, Expression> filter = default(Expression>), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListAtResourceLevelWithHttpMessagesAsync(string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, Expression> filter = default(Expression>), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get a list of management locks at resource level or below. /// @@ -205,12 +206,12 @@ public partial interface IManagementLocksOperations /// NextLink from the previous successful call to List operation. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Gets all the management locks of a subscription. /// @@ -218,64 +219,64 @@ public partial interface IManagementLocksOperations /// The filter to apply on the operation. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListAtSubscriptionLevelWithHttpMessagesAsync(Expression> filter = default(Expression>), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListAtSubscriptionLevelWithHttpMessagesAsync(Expression> filter = default(Expression>), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Gets all the management locks of a resource group. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListAtResourceGroupLevelNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListAtResourceGroupLevelNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Gets all the management locks of a resource or any level below /// resource. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListAtResourceLevelNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListAtResourceLevelNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get a list of management locks at resource level or below. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListNextNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListNextNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Gets all the management locks of a subscription. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListAtSubscriptionLevelNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListAtSubscriptionLevelNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/src/ResourceManagement/Resource/ResourceManagement/Generated/IProvidersOperations.cs b/src/ResourceManagement/Resource/ResourceManagement/Generated/IProvidersOperations.cs index 2b2bf1ec097b3..d71d45eb25e6d 100644 --- a/src/ResourceManagement/Resource/ResourceManagement/Generated/IProvidersOperations.cs +++ b/src/ResourceManagement/Resource/ResourceManagement/Generated/IProvidersOperations.cs @@ -6,8 +6,9 @@ namespace Microsoft.Azure.Management.Resources using System.Threading; using System.Threading.Tasks; using Microsoft.Rest; - using Microsoft.Azure.OData; + using System.Linq; using System.Linq.Expressions; + using Microsoft.Azure.OData; using Microsoft.Azure; using Models; @@ -22,10 +23,10 @@ public partial interface IProvidersOperations /// Namespace of the resource provider. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> UnregisterWithHttpMessagesAsync(string resourceProviderNamespace, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -35,10 +36,10 @@ public partial interface IProvidersOperations /// Namespace of the resource provider. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> RegisterWithHttpMessagesAsync(string resourceProviderNamespace, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -48,12 +49,12 @@ public partial interface IProvidersOperations /// Query parameters. If null is passed returns all deployments. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListWithHttpMessagesAsync(int? top = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListWithHttpMessagesAsync(int? top = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Gets a resource provider. /// @@ -61,24 +62,24 @@ public partial interface IProvidersOperations /// Namespace of the resource provider. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> GetWithHttpMessagesAsync(string resourceProviderNamespace, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Gets a list of resource providers. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/src/ResourceManagement/Resource/ResourceManagement/Generated/IResourceGroupsOperations.cs b/src/ResourceManagement/Resource/ResourceManagement/Generated/IResourceGroupsOperations.cs index f977dedd73624..19eff215f8611 100644 --- a/src/ResourceManagement/Resource/ResourceManagement/Generated/IResourceGroupsOperations.cs +++ b/src/ResourceManagement/Resource/ResourceManagement/Generated/IResourceGroupsOperations.cs @@ -6,8 +6,9 @@ namespace Microsoft.Azure.Management.Resources using System.Threading; using System.Threading.Tasks; using Microsoft.Rest; - using Microsoft.Azure.OData; + using System.Linq; using System.Linq.Expressions; + using Microsoft.Azure.OData; using Microsoft.Azure; using Models; @@ -28,12 +29,12 @@ public partial interface IResourceGroupsOperations /// Query parameters. If null is passed returns all resource groups. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListResourcesWithHttpMessagesAsync(string resourceGroupName, Expression> filter = default(Expression>), int? top = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListResourcesWithHttpMessagesAsync(string resourceGroupName, Expression> filter = default(Expression>), int? top = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Checks whether resource group exists. /// @@ -42,10 +43,10 @@ public partial interface IResourceGroupsOperations /// insensitive. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> CheckExistenceWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -59,10 +60,10 @@ public partial interface IResourceGroupsOperations /// operation. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, ResourceGroup parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -75,10 +76,10 @@ public partial interface IResourceGroupsOperations /// insensitive. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task DeleteWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -91,10 +92,10 @@ public partial interface IResourceGroupsOperations /// insensitive. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -105,10 +106,10 @@ public partial interface IResourceGroupsOperations /// insensitive. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> GetWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -126,10 +127,10 @@ public partial interface IResourceGroupsOperations /// operation. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> PatchWithHttpMessagesAsync(string resourceGroupName, ResourceGroup parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -142,37 +143,37 @@ public partial interface IResourceGroupsOperations /// Query parameters. If null is passed returns all resource groups. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListWithHttpMessagesAsync(Expression> filter = default(Expression>), int? top = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListWithHttpMessagesAsync(Expression> filter = default(Expression>), int? top = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get all of the resources under a subscription. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListResourcesNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListResourcesNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Gets a collection of resource groups. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/src/ResourceManagement/Resource/ResourceManagement/Generated/IResourceManagementClient.cs b/src/ResourceManagement/Resource/ResourceManagement/Generated/IResourceManagementClient.cs index be12f43b82f5b..4541c38d7ab57 100644 --- a/src/ResourceManagement/Resource/ResourceManagement/Generated/IResourceManagementClient.cs +++ b/src/ResourceManagement/Resource/ResourceManagement/Generated/IResourceManagementClient.cs @@ -7,8 +7,9 @@ namespace Microsoft.Azure.Management.Resources using System.Threading.Tasks; using Newtonsoft.Json; using Microsoft.Rest; - using Microsoft.Azure.OData; + using System.Linq; using System.Linq.Expressions; + using Microsoft.Azure.OData; using Microsoft.Azure; using Models; @@ -32,10 +33,9 @@ public partial interface IResourceManagementClient JsonSerializerSettings DeserializationSettings { get; } /// - /// Subscription credentials which uniquely identify Microsoft Azure - /// subscription. + /// Management credentials for Azure. /// - SubscriptionCloudCredentials Credentials { get; } + ServiceClientCredentials Credentials { get; } /// /// Gets subscription credentials which uniquely identify Microsoft diff --git a/src/ResourceManagement/Resource/ResourceManagement/Generated/IResourceProviderOperationDetailsOperations.cs b/src/ResourceManagement/Resource/ResourceManagement/Generated/IResourceProviderOperationDetailsOperations.cs index 65aff318373a5..5a4f68c0b73ff 100644 --- a/src/ResourceManagement/Resource/ResourceManagement/Generated/IResourceProviderOperationDetailsOperations.cs +++ b/src/ResourceManagement/Resource/ResourceManagement/Generated/IResourceProviderOperationDetailsOperations.cs @@ -6,8 +6,9 @@ namespace Microsoft.Azure.Management.Resources using System.Threading; using System.Threading.Tasks; using Microsoft.Rest; - using Microsoft.Azure.OData; + using System.Linq; using System.Linq.Expressions; + using Microsoft.Azure.OData; using Microsoft.Azure; using Models; @@ -24,10 +25,10 @@ public partial interface IResourceProviderOperationDetailsOperations /// /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> ListWithHttpMessagesAsync(string resourceProviderNamespace, string apiVersion, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } diff --git a/src/ResourceManagement/Resource/ResourceManagement/Generated/IResourcesOperations.cs b/src/ResourceManagement/Resource/ResourceManagement/Generated/IResourcesOperations.cs index 5577e4fbc5719..91696d2c65ee0 100644 --- a/src/ResourceManagement/Resource/ResourceManagement/Generated/IResourcesOperations.cs +++ b/src/ResourceManagement/Resource/ResourceManagement/Generated/IResourcesOperations.cs @@ -6,8 +6,9 @@ namespace Microsoft.Azure.Management.Resources using System.Threading; using System.Threading.Tasks; using Microsoft.Rest; - using Microsoft.Azure.OData; + using System.Linq; using System.Linq.Expressions; + using Microsoft.Azure.OData; using Microsoft.Azure; using Models; @@ -25,10 +26,10 @@ public partial interface IResourcesOperations /// move resources' parameters. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task MoveResourcesWithHttpMessagesAsync(string sourceResourceGroupName, ResourcesMoveInfo parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -41,12 +42,12 @@ public partial interface IResourcesOperations /// Query parameters. If null is passed returns all resource groups. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListWithHttpMessagesAsync(Expression> filter = default(Expression>), int? top = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListWithHttpMessagesAsync(Expression> filter = default(Expression>), int? top = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Checks whether resource exists. /// @@ -68,10 +69,10 @@ public partial interface IResourcesOperations /// /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> CheckExistenceWithHttpMessagesAsync(string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string apiVersion, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -95,10 +96,10 @@ public partial interface IResourcesOperations /// /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task DeleteWithHttpMessagesAsync(string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string apiVersion, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -125,10 +126,10 @@ public partial interface IResourcesOperations /// Create or update resource parameters. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string apiVersion, GenericResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -152,24 +153,24 @@ public partial interface IResourcesOperations /// /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> GetWithHttpMessagesAsync(string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, string apiVersion, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get all of the resources under a subscription. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/src/ResourceManagement/Resource/ResourceManagement/Generated/ISubscriptionClient.cs b/src/ResourceManagement/Resource/ResourceManagement/Generated/ISubscriptionClient.cs index e520d80c0a768..3e7149542db7e 100644 --- a/src/ResourceManagement/Resource/ResourceManagement/Generated/ISubscriptionClient.cs +++ b/src/ResourceManagement/Resource/ResourceManagement/Generated/ISubscriptionClient.cs @@ -7,6 +7,7 @@ namespace Microsoft.Azure.Subscriptions using System.Threading.Tasks; using Newtonsoft.Json; using Microsoft.Rest; + using System.Linq; using Microsoft.Azure; using Models; @@ -30,10 +31,9 @@ public partial interface ISubscriptionClient JsonSerializerSettings DeserializationSettings { get; } /// - /// Subscription credentials which uniquely identify Microsoft Azure - /// subscription. + /// Management credentials for Azure. /// - SubscriptionCloudCredentials Credentials { get; } + ServiceClientCredentials Credentials { get; } /// /// Gets subscription credentials which uniquely identify Microsoft diff --git a/src/ResourceManagement/Resource/ResourceManagement/Generated/ISubscriptionsOperations.cs b/src/ResourceManagement/Resource/ResourceManagement/Generated/ISubscriptionsOperations.cs index 5ba565a532e76..ad6a1ceb0e58c 100644 --- a/src/ResourceManagement/Resource/ResourceManagement/Generated/ISubscriptionsOperations.cs +++ b/src/ResourceManagement/Resource/ResourceManagement/Generated/ISubscriptionsOperations.cs @@ -6,6 +6,7 @@ namespace Microsoft.Azure.Subscriptions using System.Threading; using System.Threading.Tasks; using Microsoft.Rest; + using System.Linq; using Microsoft.Azure; using Models; @@ -20,34 +21,34 @@ public partial interface ISubscriptionsOperations /// Id of the subscription. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> GetWithHttpMessagesAsync(string subscriptionId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Gets a list of the subscriptionIds. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Gets a list of the subscriptionIds. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/src/ResourceManagement/Resource/ResourceManagement/Generated/ITagsOperations.cs b/src/ResourceManagement/Resource/ResourceManagement/Generated/ITagsOperations.cs index cc99bc06ed516..97f4b7a4f3fa4 100644 --- a/src/ResourceManagement/Resource/ResourceManagement/Generated/ITagsOperations.cs +++ b/src/ResourceManagement/Resource/ResourceManagement/Generated/ITagsOperations.cs @@ -6,8 +6,9 @@ namespace Microsoft.Azure.Management.Resources using System.Threading; using System.Threading.Tasks; using Microsoft.Rest; - using Microsoft.Azure.OData; + using System.Linq; using System.Linq.Expressions; + using Microsoft.Azure.OData; using Microsoft.Azure; using Models; @@ -25,10 +26,10 @@ public partial interface ITagsOperations /// The value of the tag. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task DeleteValueWithHttpMessagesAsync(string tagName, string tagValue, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -41,10 +42,10 @@ public partial interface ITagsOperations /// The value of the tag. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> CreateOrUpdateValueWithHttpMessagesAsync(string tagName, string tagValue, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -54,10 +55,10 @@ public partial interface ITagsOperations /// The name of the tag. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> CreateOrUpdateWithHttpMessagesAsync(string tagName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -67,34 +68,34 @@ public partial interface ITagsOperations /// The name of the tag. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task DeleteWithHttpMessagesAsync(string tagName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get a list of subscription resource tags. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get a list of subscription resource tags. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/src/ResourceManagement/Resource/ResourceManagement/Generated/ITenantsOperations.cs b/src/ResourceManagement/Resource/ResourceManagement/Generated/ITenantsOperations.cs index 29a9547a1ff24..857187e2e15aa 100644 --- a/src/ResourceManagement/Resource/ResourceManagement/Generated/ITenantsOperations.cs +++ b/src/ResourceManagement/Resource/ResourceManagement/Generated/ITenantsOperations.cs @@ -6,6 +6,7 @@ namespace Microsoft.Azure.Subscriptions using System.Threading; using System.Threading.Tasks; using Microsoft.Rest; + using System.Linq; using Microsoft.Azure; using Models; @@ -17,24 +18,24 @@ public partial interface ITenantsOperations /// Gets a list of the tenantIds. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Gets a list of the tenantIds. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/src/ResourceManagement/Resource/ResourceManagement/Generated/ManagementLocksOperations.cs b/src/ResourceManagement/Resource/ResourceManagement/Generated/ManagementLocksOperations.cs index b5a709d019243..b27d009679665 100644 --- a/src/ResourceManagement/Resource/ResourceManagement/Generated/ManagementLocksOperations.cs +++ b/src/ResourceManagement/Resource/ResourceManagement/Generated/ManagementLocksOperations.cs @@ -11,8 +11,9 @@ namespace Microsoft.Azure.Management.Resources using System.Threading.Tasks; using Microsoft.Rest; using Newtonsoft.Json; - using Microsoft.Azure.OData; + using System.Linq; using System.Linq.Expressions; + using Microsoft.Azure.OData; using Microsoft.Azure; using Models; @@ -172,6 +173,10 @@ internal ManagementLocksOperations(AuthorizationClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "Created")) { @@ -366,6 +371,10 @@ internal ManagementLocksOperations(AuthorizationClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { @@ -540,6 +549,10 @@ internal ManagementLocksOperations(AuthorizationClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } if (shouldTrace) { ServiceClientTracing.Exit(invocationId, result); @@ -676,6 +689,10 @@ internal ManagementLocksOperations(AuthorizationClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { @@ -805,6 +822,10 @@ internal ManagementLocksOperations(AuthorizationClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } if (shouldTrace) { ServiceClientTracing.Exit(invocationId, result); @@ -929,6 +950,10 @@ internal ManagementLocksOperations(AuthorizationClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "NoContent")) { @@ -1067,6 +1092,10 @@ internal ManagementLocksOperations(AuthorizationClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } if (shouldTrace) { ServiceClientTracing.Exit(invocationId, result); @@ -1089,7 +1118,7 @@ internal ManagementLocksOperations(AuthorizationClient client) /// /// Cancellation token. /// - public async Task> ListAtResourceGroupLevelWithHttpMessagesAsync(string resourceGroupName, Expression> filter = default(Expression>), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListAtResourceGroupLevelWithHttpMessagesAsync(string resourceGroupName, Expression> filter = default(Expression>), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -1196,14 +1225,18 @@ internal ManagementLocksOperations(AuthorizationClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { @@ -1239,7 +1272,7 @@ internal ManagementLocksOperations(AuthorizationClient client) /// /// Cancellation token. /// - public async Task> ListAtResourceLevelWithHttpMessagesAsync(string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, Expression> filter = default(Expression>), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListAtResourceLevelWithHttpMessagesAsync(string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, Expression> filter = default(Expression>), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -1370,14 +1403,18 @@ internal ManagementLocksOperations(AuthorizationClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { @@ -1398,7 +1435,7 @@ internal ManagementLocksOperations(AuthorizationClient client) /// /// Cancellation token. /// - public async Task> ListNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (nextLink == null) { @@ -1492,14 +1529,18 @@ internal ManagementLocksOperations(AuthorizationClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { @@ -1520,7 +1561,7 @@ internal ManagementLocksOperations(AuthorizationClient client) /// /// Cancellation token. /// - public async Task> ListAtSubscriptionLevelWithHttpMessagesAsync(Expression> filter = default(Expression>), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListAtSubscriptionLevelWithHttpMessagesAsync(Expression> filter = default(Expression>), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (this.Client.ApiVersion == null) { @@ -1621,14 +1662,18 @@ internal ManagementLocksOperations(AuthorizationClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { @@ -1640,7 +1685,7 @@ internal ManagementLocksOperations(AuthorizationClient client) /// /// Gets all the management locks of a resource group. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// @@ -1649,11 +1694,11 @@ internal ManagementLocksOperations(AuthorizationClient client) /// /// Cancellation token. /// - public async Task> ListAtResourceGroupLevelNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListAtResourceGroupLevelNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (nextLink == null) + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextLink"); + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing bool shouldTrace = ServiceClientTracing.IsEnabled; @@ -1662,13 +1707,13 @@ internal ManagementLocksOperations(AuthorizationClient client) { invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("nextLink", nextLink); + tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(invocationId, this, "ListAtResourceGroupLevelNext", tracingParameters); } // Construct URL string url = "{nextLink}"; - url = url.Replace("{nextLink}", nextLink); + url = url.Replace("{nextLink}", nextPageLink); List queryParameters = new List(); if (queryParameters.Count > 0) { @@ -1737,14 +1782,18 @@ internal ManagementLocksOperations(AuthorizationClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { @@ -1756,7 +1805,7 @@ internal ManagementLocksOperations(AuthorizationClient client) /// /// Gets all the management locks of a resource or any level below resource. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// @@ -1765,11 +1814,11 @@ internal ManagementLocksOperations(AuthorizationClient client) /// /// Cancellation token. /// - public async Task> ListAtResourceLevelNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListAtResourceLevelNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (nextLink == null) + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextLink"); + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing bool shouldTrace = ServiceClientTracing.IsEnabled; @@ -1778,13 +1827,13 @@ internal ManagementLocksOperations(AuthorizationClient client) { invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("nextLink", nextLink); + tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(invocationId, this, "ListAtResourceLevelNext", tracingParameters); } // Construct URL string url = "{nextLink}"; - url = url.Replace("{nextLink}", nextLink); + url = url.Replace("{nextLink}", nextPageLink); List queryParameters = new List(); if (queryParameters.Count > 0) { @@ -1853,14 +1902,18 @@ internal ManagementLocksOperations(AuthorizationClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { @@ -1872,7 +1925,7 @@ internal ManagementLocksOperations(AuthorizationClient client) /// /// Get a list of management locks at resource level or below. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// @@ -1881,11 +1934,11 @@ internal ManagementLocksOperations(AuthorizationClient client) /// /// Cancellation token. /// - public async Task> ListNextNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListNextNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (nextLink == null) + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextLink"); + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing bool shouldTrace = ServiceClientTracing.IsEnabled; @@ -1894,13 +1947,13 @@ internal ManagementLocksOperations(AuthorizationClient client) { invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("nextLink", nextLink); + tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(invocationId, this, "ListNextNext", tracingParameters); } // Construct URL string url = "{nextLink}"; - url = url.Replace("{nextLink}", nextLink); + url = url.Replace("{nextLink}", nextPageLink); List queryParameters = new List(); if (queryParameters.Count > 0) { @@ -1969,14 +2022,18 @@ internal ManagementLocksOperations(AuthorizationClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { @@ -1988,7 +2045,7 @@ internal ManagementLocksOperations(AuthorizationClient client) /// /// Gets all the management locks of a subscription. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// @@ -1997,11 +2054,11 @@ internal ManagementLocksOperations(AuthorizationClient client) /// /// Cancellation token. /// - public async Task> ListAtSubscriptionLevelNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListAtSubscriptionLevelNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (nextLink == null) + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextLink"); + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing bool shouldTrace = ServiceClientTracing.IsEnabled; @@ -2010,13 +2067,13 @@ internal ManagementLocksOperations(AuthorizationClient client) { invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("nextLink", nextLink); + tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(invocationId, this, "ListAtSubscriptionLevelNext", tracingParameters); } // Construct URL string url = "{nextLink}"; - url = url.Replace("{nextLink}", nextLink); + url = url.Replace("{nextLink}", nextPageLink); List queryParameters = new List(); if (queryParameters.Count > 0) { @@ -2085,14 +2142,18 @@ internal ManagementLocksOperations(AuthorizationClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { diff --git a/src/ResourceManagement/Resource/ResourceManagement/Generated/ManagementLocksOperationsExtensions.cs b/src/ResourceManagement/Resource/ResourceManagement/Generated/ManagementLocksOperationsExtensions.cs index d921dc49c0268..b262f31e788e1 100644 --- a/src/ResourceManagement/Resource/ResourceManagement/Generated/ManagementLocksOperationsExtensions.cs +++ b/src/ResourceManagement/Resource/ResourceManagement/Generated/ManagementLocksOperationsExtensions.cs @@ -16,7 +16,7 @@ public static partial class ManagementLocksOperationsExtensions /// Create or update a management lock at the resource group level. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The resource group name. @@ -36,7 +36,7 @@ public static ManagementLockObject CreateOrUpdateAtResourceGroupLevel(this IMana /// Create or update a management lock at the resource group level. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The resource group name. @@ -61,7 +61,7 @@ public static ManagementLockObject CreateOrUpdateAtResourceGroupLevel(this IMana /// below resource. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -94,7 +94,7 @@ public static ManagementLockObject CreateOrUpdateAtResourceLevel(this IManagemen /// below resource. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -130,7 +130,7 @@ public static ManagementLockObject CreateOrUpdateAtResourceLevel(this IManagemen /// Deletes the management lock of a resource or any level below resource. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -159,7 +159,7 @@ public static void DeleteAtResourceLevel(this IManagementLocksOperations operati /// Deletes the management lock of a resource or any level below resource. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -191,7 +191,7 @@ public static void DeleteAtResourceLevel(this IManagementLocksOperations operati /// Create or update a management lock at the subscription level. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of lock. @@ -208,7 +208,7 @@ public static ManagementLockObject CreateOrUpdateAtSubscriptionLevel(this IManag /// Create or update a management lock at the subscription level. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of lock. @@ -229,7 +229,7 @@ public static ManagementLockObject CreateOrUpdateAtSubscriptionLevel(this IManag /// Deletes the management lock of a subscription. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of lock. @@ -243,7 +243,7 @@ public static void DeleteAtSubscriptionLevel(this IManagementLocksOperations ope /// Deletes the management lock of a subscription. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of lock. @@ -260,7 +260,7 @@ public static void DeleteAtSubscriptionLevel(this IManagementLocksOperations ope /// Gets the management lock of a scope. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// Name of the management lock. @@ -274,7 +274,7 @@ public static ManagementLockObject Get(this IManagementLocksOperations operation /// Gets the management lock of a scope. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// Name of the management lock. @@ -292,7 +292,7 @@ public static ManagementLockObject Get(this IManagementLocksOperations operation /// Deletes the management lock of a resource group. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The resource group names. @@ -309,7 +309,7 @@ public static void DeleteAtResourceGroupLevel(this IManagementLocksOperations op /// Deletes the management lock of a resource group. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The resource group names. @@ -329,7 +329,7 @@ public static void DeleteAtResourceGroupLevel(this IManagementLocksOperations op /// Gets all the management locks of a resource group. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// Resource group name. @@ -337,7 +337,7 @@ public static void DeleteAtResourceGroupLevel(this IManagementLocksOperations op /// /// The filter to apply on the operation. /// - public static ManagementLockListResult ListAtResourceGroupLevel(this IManagementLocksOperations operations, string resourceGroupName, Expression> filter = default(Expression>)) + public static Page ListAtResourceGroupLevel(this IManagementLocksOperations operations, string resourceGroupName, Expression> filter = default(Expression>)) { return Task.Factory.StartNew(s => ((IManagementLocksOperations)s).ListAtResourceGroupLevelAsync(resourceGroupName, filter), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } @@ -346,7 +346,7 @@ public static void DeleteAtResourceGroupLevel(this IManagementLocksOperations op /// Gets all the management locks of a resource group. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// Resource group name. @@ -357,9 +357,9 @@ public static void DeleteAtResourceGroupLevel(this IManagementLocksOperations op /// /// Cancellation token. /// - public static async Task ListAtResourceGroupLevelAsync( this IManagementLocksOperations operations, string resourceGroupName, Expression> filter = default(Expression>), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListAtResourceGroupLevelAsync( this IManagementLocksOperations operations, string resourceGroupName, Expression> filter = default(Expression>), CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListAtResourceGroupLevelWithHttpMessagesAsync(resourceGroupName, filter, null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListAtResourceGroupLevelWithHttpMessagesAsync(resourceGroupName, filter, null, cancellationToken).ConfigureAwait(false); return result.Body; } @@ -367,7 +367,7 @@ public static void DeleteAtResourceGroupLevel(this IManagementLocksOperations op /// Gets all the management locks of a resource or any level below resource. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. The name is case insensitive. @@ -387,7 +387,7 @@ public static void DeleteAtResourceGroupLevel(this IManagementLocksOperations op /// /// The filter to apply on the operation. /// - public static ManagementLockListResult ListAtResourceLevel(this IManagementLocksOperations operations, string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, Expression> filter = default(Expression>)) + public static Page ListAtResourceLevel(this IManagementLocksOperations operations, string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, Expression> filter = default(Expression>)) { return Task.Factory.StartNew(s => ((IManagementLocksOperations)s).ListAtResourceLevelAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, filter), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } @@ -396,7 +396,7 @@ public static void DeleteAtResourceGroupLevel(this IManagementLocksOperations op /// Gets all the management locks of a resource or any level below resource. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. The name is case insensitive. @@ -419,9 +419,9 @@ public static void DeleteAtResourceGroupLevel(this IManagementLocksOperations op /// /// Cancellation token. /// - public static async Task ListAtResourceLevelAsync( this IManagementLocksOperations operations, string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, Expression> filter = default(Expression>), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListAtResourceLevelAsync( this IManagementLocksOperations operations, string resourceGroupName, string resourceProviderNamespace, string parentResourcePath, string resourceType, string resourceName, Expression> filter = default(Expression>), CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListAtResourceLevelWithHttpMessagesAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, filter, null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListAtResourceLevelWithHttpMessagesAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, filter, null, cancellationToken).ConfigureAwait(false); return result.Body; } @@ -429,12 +429,12 @@ public static void DeleteAtResourceGroupLevel(this IManagementLocksOperations op /// Get a list of management locks at resource level or below. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// NextLink from the previous successful call to List operation. /// - public static ManagementLockListResult ListNext(this IManagementLocksOperations operations, string nextLink) + public static Page ListNext(this IManagementLocksOperations operations, string nextLink) { return Task.Factory.StartNew(s => ((IManagementLocksOperations)s).ListNextAsync(nextLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } @@ -443,7 +443,7 @@ public static ManagementLockListResult ListNext(this IManagementLocksOperations /// Get a list of management locks at resource level or below. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// NextLink from the previous successful call to List operation. @@ -451,9 +451,9 @@ public static ManagementLockListResult ListNext(this IManagementLocksOperations /// /// Cancellation token. /// - public static async Task ListNextAsync( this IManagementLocksOperations operations, string nextLink, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListNextAsync( this IManagementLocksOperations operations, string nextLink, CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListNextWithHttpMessagesAsync(nextLink, null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListNextWithHttpMessagesAsync(nextLink, null, cancellationToken).ConfigureAwait(false); return result.Body; } @@ -461,12 +461,12 @@ public static ManagementLockListResult ListNext(this IManagementLocksOperations /// Gets all the management locks of a subscription. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The filter to apply on the operation. /// - public static ManagementLockListResult ListAtSubscriptionLevel(this IManagementLocksOperations operations, Expression> filter = default(Expression>)) + public static Page ListAtSubscriptionLevel(this IManagementLocksOperations operations, Expression> filter = default(Expression>)) { return Task.Factory.StartNew(s => ((IManagementLocksOperations)s).ListAtSubscriptionLevelAsync(filter), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } @@ -475,7 +475,7 @@ public static ManagementLockListResult ListNext(this IManagementLocksOperations /// Gets all the management locks of a subscription. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The filter to apply on the operation. @@ -483,9 +483,9 @@ public static ManagementLockListResult ListNext(this IManagementLocksOperations /// /// Cancellation token. /// - public static async Task ListAtSubscriptionLevelAsync( this IManagementLocksOperations operations, Expression> filter = default(Expression>), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListAtSubscriptionLevelAsync( this IManagementLocksOperations operations, Expression> filter = default(Expression>), CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListAtSubscriptionLevelWithHttpMessagesAsync(filter, null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListAtSubscriptionLevelWithHttpMessagesAsync(filter, null, cancellationToken).ConfigureAwait(false); return result.Body; } @@ -493,31 +493,31 @@ public static ManagementLockListResult ListNext(this IManagementLocksOperations /// Gets all the management locks of a resource group. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// - public static ManagementLockListResult ListAtResourceGroupLevelNext(this IManagementLocksOperations operations, string nextLink) + public static Page ListAtResourceGroupLevelNext(this IManagementLocksOperations operations, string nextPageLink) { - return Task.Factory.StartNew(s => ((IManagementLocksOperations)s).ListAtResourceGroupLevelNextAsync(nextLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + return Task.Factory.StartNew(s => ((IManagementLocksOperations)s).ListAtResourceGroupLevelNextAsync(nextPageLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } /// /// Gets all the management locks of a resource group. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// /// Cancellation token. /// - public static async Task ListAtResourceGroupLevelNextAsync( this IManagementLocksOperations operations, string nextLink, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListAtResourceGroupLevelNextAsync( this IManagementLocksOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListAtResourceGroupLevelNextWithHttpMessagesAsync(nextLink, null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListAtResourceGroupLevelNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false); return result.Body; } @@ -525,31 +525,31 @@ public static ManagementLockListResult ListAtResourceGroupLevelNext(this IManage /// Gets all the management locks of a resource or any level below resource. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// - public static ManagementLockListResult ListAtResourceLevelNext(this IManagementLocksOperations operations, string nextLink) + public static Page ListAtResourceLevelNext(this IManagementLocksOperations operations, string nextPageLink) { - return Task.Factory.StartNew(s => ((IManagementLocksOperations)s).ListAtResourceLevelNextAsync(nextLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + return Task.Factory.StartNew(s => ((IManagementLocksOperations)s).ListAtResourceLevelNextAsync(nextPageLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } /// /// Gets all the management locks of a resource or any level below resource. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// /// Cancellation token. /// - public static async Task ListAtResourceLevelNextAsync( this IManagementLocksOperations operations, string nextLink, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListAtResourceLevelNextAsync( this IManagementLocksOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListAtResourceLevelNextWithHttpMessagesAsync(nextLink, null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListAtResourceLevelNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false); return result.Body; } @@ -557,31 +557,31 @@ public static ManagementLockListResult ListAtResourceLevelNext(this IManagementL /// Get a list of management locks at resource level or below. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// - public static ManagementLockListResult ListNextNext(this IManagementLocksOperations operations, string nextLink) + public static Page ListNextNext(this IManagementLocksOperations operations, string nextPageLink) { - return Task.Factory.StartNew(s => ((IManagementLocksOperations)s).ListNextNextAsync(nextLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + return Task.Factory.StartNew(s => ((IManagementLocksOperations)s).ListNextNextAsync(nextPageLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } /// /// Get a list of management locks at resource level or below. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// /// Cancellation token. /// - public static async Task ListNextNextAsync( this IManagementLocksOperations operations, string nextLink, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListNextNextAsync( this IManagementLocksOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListNextNextWithHttpMessagesAsync(nextLink, null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListNextNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false); return result.Body; } @@ -589,31 +589,31 @@ public static ManagementLockListResult ListNextNext(this IManagementLocksOperati /// Gets all the management locks of a subscription. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// - public static ManagementLockListResult ListAtSubscriptionLevelNext(this IManagementLocksOperations operations, string nextLink) + public static Page ListAtSubscriptionLevelNext(this IManagementLocksOperations operations, string nextPageLink) { - return Task.Factory.StartNew(s => ((IManagementLocksOperations)s).ListAtSubscriptionLevelNextAsync(nextLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + return Task.Factory.StartNew(s => ((IManagementLocksOperations)s).ListAtSubscriptionLevelNextAsync(nextPageLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } /// /// Gets all the management locks of a subscription. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// /// Cancellation token. /// - public static async Task ListAtSubscriptionLevelNextAsync( this IManagementLocksOperations operations, string nextLink, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListAtSubscriptionLevelNextAsync( this IManagementLocksOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListAtSubscriptionLevelNextWithHttpMessagesAsync(nextLink, null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListAtSubscriptionLevelNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false); return result.Body; } diff --git a/src/ResourceManagement/Resource/ResourceManagement/Generated/Models/DeploymentMode.cs b/src/ResourceManagement/Resource/ResourceManagement/Generated/Models/DeploymentMode.cs index 89bfecc34552e..0ed3d7c4a216f 100644 --- a/src/ResourceManagement/Resource/ResourceManagement/Generated/Models/DeploymentMode.cs +++ b/src/ResourceManagement/Resource/ResourceManagement/Generated/Models/DeploymentMode.cs @@ -5,7 +5,7 @@ namespace Microsoft.Azure.Management.Resources.Models using System.Runtime.Serialization; /// - /// Defines values for DeploymentMode + /// Defines values for DeploymentMode. /// [JsonConverter(typeof(StringEnumConverter))] public enum DeploymentMode diff --git a/src/ResourceManagement/Resource/ResourceManagement/Generated/Models/LockLevel.cs b/src/ResourceManagement/Resource/ResourceManagement/Generated/Models/LockLevel.cs index 2e314481aff38..def6f6399ad34 100644 --- a/src/ResourceManagement/Resource/ResourceManagement/Generated/Models/LockLevel.cs +++ b/src/ResourceManagement/Resource/ResourceManagement/Generated/Models/LockLevel.cs @@ -5,7 +5,7 @@ namespace Microsoft.Azure.Management.Resources.Models using System.Runtime.Serialization; /// - /// Defines values for LockLevel + /// Defines values for LockLevel. /// [JsonConverter(typeof(StringEnumConverter))] public enum LockLevel diff --git a/src/ResourceManagement/Resource/ResourceManagement/Generated/ProvidersOperations.cs b/src/ResourceManagement/Resource/ResourceManagement/Generated/ProvidersOperations.cs index 42ad562345d71..307a45ced3b88 100644 --- a/src/ResourceManagement/Resource/ResourceManagement/Generated/ProvidersOperations.cs +++ b/src/ResourceManagement/Resource/ResourceManagement/Generated/ProvidersOperations.cs @@ -11,8 +11,9 @@ namespace Microsoft.Azure.Management.Resources using System.Threading.Tasks; using Microsoft.Rest; using Newtonsoft.Json; - using Microsoft.Azure.OData; + using System.Linq; using System.Linq.Expressions; + using Microsoft.Azure.OData; using Microsoft.Azure; using Models; @@ -151,6 +152,10 @@ internal ProvidersOperations(ResourceManagementClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { @@ -281,6 +286,10 @@ internal ProvidersOperations(ResourceManagementClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { @@ -306,7 +315,7 @@ internal ProvidersOperations(ResourceManagementClient client) /// /// Cancellation token. /// - public async Task> ListWithHttpMessagesAsync(int? top = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListWithHttpMessagesAsync(int? top = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (this.Client.ApiVersion == null) { @@ -407,14 +416,18 @@ internal ProvidersOperations(ResourceManagementClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { @@ -540,6 +553,10 @@ internal ProvidersOperations(ResourceManagementClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { @@ -556,7 +573,7 @@ internal ProvidersOperations(ResourceManagementClient client) /// /// Gets a list of resource providers. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// @@ -565,11 +582,11 @@ internal ProvidersOperations(ResourceManagementClient client) /// /// Cancellation token. /// - public async Task> ListNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (nextLink == null) + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextLink"); + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing bool shouldTrace = ServiceClientTracing.IsEnabled; @@ -578,13 +595,13 @@ internal ProvidersOperations(ResourceManagementClient client) { invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("nextLink", nextLink); + tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(invocationId, this, "ListNext", tracingParameters); } // Construct URL string url = "{nextLink}"; - url = url.Replace("{nextLink}", nextLink); + url = url.Replace("{nextLink}", nextPageLink); List queryParameters = new List(); if (queryParameters.Count > 0) { @@ -653,14 +670,18 @@ internal ProvidersOperations(ResourceManagementClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { diff --git a/src/ResourceManagement/Resource/ResourceManagement/Generated/ProvidersOperationsExtensions.cs b/src/ResourceManagement/Resource/ResourceManagement/Generated/ProvidersOperationsExtensions.cs index 23c58b71da2b8..2f4b3cfc1826e 100644 --- a/src/ResourceManagement/Resource/ResourceManagement/Generated/ProvidersOperationsExtensions.cs +++ b/src/ResourceManagement/Resource/ResourceManagement/Generated/ProvidersOperationsExtensions.cs @@ -16,7 +16,7 @@ public static partial class ProvidersOperationsExtensions /// Unregisters provider from a subscription. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// Namespace of the resource provider. @@ -30,7 +30,7 @@ public static Provider Unregister(this IProvidersOperations operations, string r /// Unregisters provider from a subscription. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// Namespace of the resource provider. @@ -48,7 +48,7 @@ public static Provider Unregister(this IProvidersOperations operations, string r /// Registers provider to be used with a subscription. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// Namespace of the resource provider. @@ -62,7 +62,7 @@ public static Provider Register(this IProvidersOperations operations, string res /// Registers provider to be used with a subscription. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// Namespace of the resource provider. @@ -80,12 +80,12 @@ public static Provider Register(this IProvidersOperations operations, string res /// Gets a list of resource providers. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// Query parameters. If null is passed returns all deployments. /// - public static ProviderListResult List(this IProvidersOperations operations, int? top = default(int?)) + public static Page List(this IProvidersOperations operations, int? top = default(int?)) { return Task.Factory.StartNew(s => ((IProvidersOperations)s).ListAsync(top), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } @@ -94,7 +94,7 @@ public static Provider Register(this IProvidersOperations operations, string res /// Gets a list of resource providers. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// Query parameters. If null is passed returns all deployments. @@ -102,9 +102,9 @@ public static Provider Register(this IProvidersOperations operations, string res /// /// Cancellation token. /// - public static async Task ListAsync( this IProvidersOperations operations, int? top = default(int?), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListAsync( this IProvidersOperations operations, int? top = default(int?), CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListWithHttpMessagesAsync(top, null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListWithHttpMessagesAsync(top, null, cancellationToken).ConfigureAwait(false); return result.Body; } @@ -112,7 +112,7 @@ public static Provider Register(this IProvidersOperations operations, string res /// Gets a resource provider. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// Namespace of the resource provider. @@ -126,7 +126,7 @@ public static Provider Get(this IProvidersOperations operations, string resource /// Gets a resource provider. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// Namespace of the resource provider. @@ -144,31 +144,31 @@ public static Provider Get(this IProvidersOperations operations, string resource /// Gets a list of resource providers. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// - public static ProviderListResult ListNext(this IProvidersOperations operations, string nextLink) + public static Page ListNext(this IProvidersOperations operations, string nextPageLink) { - return Task.Factory.StartNew(s => ((IProvidersOperations)s).ListNextAsync(nextLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + return Task.Factory.StartNew(s => ((IProvidersOperations)s).ListNextAsync(nextPageLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } /// /// Gets a list of resource providers. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// /// Cancellation token. /// - public static async Task ListNextAsync( this IProvidersOperations operations, string nextLink, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListNextAsync( this IProvidersOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListNextWithHttpMessagesAsync(nextLink, null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false); return result.Body; } diff --git a/src/ResourceManagement/Resource/ResourceManagement/Generated/ResourceGroupsOperations.cs b/src/ResourceManagement/Resource/ResourceManagement/Generated/ResourceGroupsOperations.cs index 2009b4d884b8e..777ee57181aa2 100644 --- a/src/ResourceManagement/Resource/ResourceManagement/Generated/ResourceGroupsOperations.cs +++ b/src/ResourceManagement/Resource/ResourceManagement/Generated/ResourceGroupsOperations.cs @@ -11,8 +11,9 @@ namespace Microsoft.Azure.Management.Resources using System.Threading.Tasks; using Microsoft.Rest; using Newtonsoft.Json; - using Microsoft.Azure.OData; + using System.Linq; using System.Linq.Expressions; + using Microsoft.Azure.OData; using Microsoft.Azure; using Models; @@ -52,7 +53,7 @@ internal ResourceGroupsOperations(ResourceManagementClient client) /// /// Cancellation token. /// - public async Task> ListResourcesWithHttpMessagesAsync(string resourceGroupName, Expression> filter = default(Expression>), int? top = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListResourcesWithHttpMessagesAsync(string resourceGroupName, Expression> filter = default(Expression>), int? top = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -164,14 +165,18 @@ internal ResourceGroupsOperations(ResourceManagementClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { @@ -298,6 +303,10 @@ internal ResourceGroupsOperations(ResourceManagementClient client) result.Request = httpRequest; result.Response = httpResponse; result.Body = (statusCode == HttpStatusCode.NoContent); + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } if (shouldTrace) { ServiceClientTracing.Exit(invocationId, result); @@ -435,6 +444,10 @@ internal ResourceGroupsOperations(ResourceManagementClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "Created")) { @@ -462,10 +475,10 @@ internal ResourceGroupsOperations(ResourceManagementClient client) /// The name of the resource group to be deleted. The name is case insensitive. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { @@ -586,6 +599,10 @@ internal ResourceGroupsOperations(ResourceManagementClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } if (shouldTrace) { ServiceClientTracing.Exit(invocationId, result); @@ -710,6 +727,10 @@ internal ResourceGroupsOperations(ResourceManagementClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { @@ -856,6 +877,10 @@ internal ResourceGroupsOperations(ResourceManagementClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { @@ -884,7 +909,7 @@ internal ResourceGroupsOperations(ResourceManagementClient client) /// /// Cancellation token. /// - public async Task> ListWithHttpMessagesAsync(Expression> filter = default(Expression>), int? top = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListWithHttpMessagesAsync(Expression> filter = default(Expression>), int? top = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (this.Client.ApiVersion == null) { @@ -990,14 +1015,18 @@ internal ResourceGroupsOperations(ResourceManagementClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { @@ -1009,7 +1038,7 @@ internal ResourceGroupsOperations(ResourceManagementClient client) /// /// Get all of the resources under a subscription. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// @@ -1018,11 +1047,11 @@ internal ResourceGroupsOperations(ResourceManagementClient client) /// /// Cancellation token. /// - public async Task> ListResourcesNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListResourcesNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (nextLink == null) + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextLink"); + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing bool shouldTrace = ServiceClientTracing.IsEnabled; @@ -1031,13 +1060,13 @@ internal ResourceGroupsOperations(ResourceManagementClient client) { invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("nextLink", nextLink); + tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(invocationId, this, "ListResourcesNext", tracingParameters); } // Construct URL string url = "{nextLink}"; - url = url.Replace("{nextLink}", nextLink); + url = url.Replace("{nextLink}", nextPageLink); List queryParameters = new List(); if (queryParameters.Count > 0) { @@ -1106,14 +1135,18 @@ internal ResourceGroupsOperations(ResourceManagementClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { @@ -1125,7 +1158,7 @@ internal ResourceGroupsOperations(ResourceManagementClient client) /// /// Gets a collection of resource groups. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// @@ -1134,11 +1167,11 @@ internal ResourceGroupsOperations(ResourceManagementClient client) /// /// Cancellation token. /// - public async Task> ListNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (nextLink == null) + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextLink"); + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing bool shouldTrace = ServiceClientTracing.IsEnabled; @@ -1147,13 +1180,13 @@ internal ResourceGroupsOperations(ResourceManagementClient client) { invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("nextLink", nextLink); + tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(invocationId, this, "ListNext", tracingParameters); } // Construct URL string url = "{nextLink}"; - url = url.Replace("{nextLink}", nextLink); + url = url.Replace("{nextLink}", nextPageLink); List queryParameters = new List(); if (queryParameters.Count > 0) { @@ -1222,14 +1255,18 @@ internal ResourceGroupsOperations(ResourceManagementClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { diff --git a/src/ResourceManagement/Resource/ResourceManagement/Generated/ResourceGroupsOperationsExtensions.cs b/src/ResourceManagement/Resource/ResourceManagement/Generated/ResourceGroupsOperationsExtensions.cs index 7200752ff6586..02e28e788d31a 100644 --- a/src/ResourceManagement/Resource/ResourceManagement/Generated/ResourceGroupsOperationsExtensions.cs +++ b/src/ResourceManagement/Resource/ResourceManagement/Generated/ResourceGroupsOperationsExtensions.cs @@ -16,7 +16,7 @@ public static partial class ResourceGroupsOperationsExtensions /// Get all of the resources under a subscription. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// Query parameters. If null is passed returns all resource groups. @@ -27,7 +27,7 @@ public static partial class ResourceGroupsOperationsExtensions /// /// Query parameters. If null is passed returns all resource groups. /// - public static ResourceListResult ListResources(this IResourceGroupsOperations operations, string resourceGroupName, Expression> filter = default(Expression>), int? top = default(int?)) + public static Page ListResources(this IResourceGroupsOperations operations, string resourceGroupName, Expression> filter = default(Expression>), int? top = default(int?)) { return Task.Factory.StartNew(s => ((IResourceGroupsOperations)s).ListResourcesAsync(resourceGroupName, filter, top), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } @@ -36,7 +36,7 @@ public static partial class ResourceGroupsOperationsExtensions /// Get all of the resources under a subscription. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// Query parameters. If null is passed returns all resource groups. @@ -50,9 +50,9 @@ public static partial class ResourceGroupsOperationsExtensions /// /// Cancellation token. /// - public static async Task ListResourcesAsync( this IResourceGroupsOperations operations, string resourceGroupName, Expression> filter = default(Expression>), int? top = default(int?), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListResourcesAsync( this IResourceGroupsOperations operations, string resourceGroupName, Expression> filter = default(Expression>), int? top = default(int?), CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListResourcesWithHttpMessagesAsync(resourceGroupName, filter, top, null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListResourcesWithHttpMessagesAsync(resourceGroupName, filter, top, null, cancellationToken).ConfigureAwait(false); return result.Body; } @@ -60,7 +60,7 @@ public static partial class ResourceGroupsOperationsExtensions /// Checks whether resource group exists. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group to check. The name is case insensitive. @@ -74,7 +74,7 @@ public static partial class ResourceGroupsOperationsExtensions /// Checks whether resource group exists. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group to check. The name is case insensitive. @@ -92,7 +92,7 @@ public static partial class ResourceGroupsOperationsExtensions /// Create a resource group. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group to be created or updated. @@ -110,7 +110,7 @@ public static ResourceGroupExtended CreateOrUpdate(this IResourceGroupsOperation /// Create a resource group. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group to be created or updated. @@ -133,7 +133,7 @@ public static ResourceGroupExtended CreateOrUpdate(this IResourceGroupsOperation /// finished processing the request, call GetLongRunningOperationStatus. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group to be deleted. The name is case insensitive. @@ -148,7 +148,7 @@ public static void Delete(this IResourceGroupsOperations operations, string reso /// finished processing the request, call GetLongRunningOperationStatus. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group to be deleted. The name is case insensitive. @@ -166,7 +166,7 @@ public static void Delete(this IResourceGroupsOperations operations, string reso /// finished processing the request, call GetLongRunningOperationStatus. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group to be deleted. The name is case insensitive. @@ -181,7 +181,7 @@ public static void BeginDelete(this IResourceGroupsOperations operations, string /// finished processing the request, call GetLongRunningOperationStatus. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group to be deleted. The name is case insensitive. @@ -198,7 +198,7 @@ public static void BeginDelete(this IResourceGroupsOperations operations, string /// Get a resource group. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group to get. The name is case insensitive. @@ -212,7 +212,7 @@ public static ResourceGroupExtended Get(this IResourceGroupsOperations operation /// Get a resource group. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group to get. The name is case insensitive. @@ -233,7 +233,7 @@ public static ResourceGroupExtended Get(this IResourceGroupsOperations operation /// carried over. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group to be created or updated. The name is case @@ -254,7 +254,7 @@ public static ResourceGroupExtended Patch(this IResourceGroupsOperations operati /// carried over. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group to be created or updated. The name is case @@ -276,7 +276,7 @@ public static ResourceGroupExtended Patch(this IResourceGroupsOperations operati /// Gets a collection of resource groups. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The filter to apply on the operation. @@ -284,7 +284,7 @@ public static ResourceGroupExtended Patch(this IResourceGroupsOperations operati /// /// Query parameters. If null is passed returns all resource groups. /// - public static ResourceGroupListResult List(this IResourceGroupsOperations operations, Expression> filter = default(Expression>), int? top = default(int?)) + public static Page List(this IResourceGroupsOperations operations, Expression> filter = default(Expression>), int? top = default(int?)) { return Task.Factory.StartNew(s => ((IResourceGroupsOperations)s).ListAsync(filter, top), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } @@ -293,7 +293,7 @@ public static ResourceGroupExtended Patch(this IResourceGroupsOperations operati /// Gets a collection of resource groups. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The filter to apply on the operation. @@ -304,9 +304,9 @@ public static ResourceGroupExtended Patch(this IResourceGroupsOperations operati /// /// Cancellation token. /// - public static async Task ListAsync( this IResourceGroupsOperations operations, Expression> filter = default(Expression>), int? top = default(int?), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListAsync( this IResourceGroupsOperations operations, Expression> filter = default(Expression>), int? top = default(int?), CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListWithHttpMessagesAsync(filter, top, null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListWithHttpMessagesAsync(filter, top, null, cancellationToken).ConfigureAwait(false); return result.Body; } @@ -314,31 +314,31 @@ public static ResourceGroupExtended Patch(this IResourceGroupsOperations operati /// Get all of the resources under a subscription. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// - public static ResourceListResult ListResourcesNext(this IResourceGroupsOperations operations, string nextLink) + public static Page ListResourcesNext(this IResourceGroupsOperations operations, string nextPageLink) { - return Task.Factory.StartNew(s => ((IResourceGroupsOperations)s).ListResourcesNextAsync(nextLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + return Task.Factory.StartNew(s => ((IResourceGroupsOperations)s).ListResourcesNextAsync(nextPageLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } /// /// Get all of the resources under a subscription. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// /// Cancellation token. /// - public static async Task ListResourcesNextAsync( this IResourceGroupsOperations operations, string nextLink, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListResourcesNextAsync( this IResourceGroupsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListResourcesNextWithHttpMessagesAsync(nextLink, null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListResourcesNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false); return result.Body; } @@ -346,31 +346,31 @@ public static ResourceListResult ListResourcesNext(this IResourceGroupsOperation /// Gets a collection of resource groups. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// - public static ResourceGroupListResult ListNext(this IResourceGroupsOperations operations, string nextLink) + public static Page ListNext(this IResourceGroupsOperations operations, string nextPageLink) { - return Task.Factory.StartNew(s => ((IResourceGroupsOperations)s).ListNextAsync(nextLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + return Task.Factory.StartNew(s => ((IResourceGroupsOperations)s).ListNextAsync(nextPageLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } /// /// Gets a collection of resource groups. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// /// Cancellation token. /// - public static async Task ListNextAsync( this IResourceGroupsOperations operations, string nextLink, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListNextAsync( this IResourceGroupsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListNextWithHttpMessagesAsync(nextLink, null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false); return result.Body; } diff --git a/src/ResourceManagement/Resource/ResourceManagement/Generated/ResourceManagementClient.cs b/src/ResourceManagement/Resource/ResourceManagement/Generated/ResourceManagementClient.cs index 4260e6e872286..d65070f6ab270 100644 --- a/src/ResourceManagement/Resource/ResourceManagement/Generated/ResourceManagementClient.cs +++ b/src/ResourceManagement/Resource/ResourceManagement/Generated/ResourceManagementClient.cs @@ -13,8 +13,9 @@ namespace Microsoft.Azure.Management.Resources using Microsoft.Rest; using Microsoft.Rest.Serialization; using Newtonsoft.Json; - using Microsoft.Azure.OData; + using System.Linq; using System.Linq.Expressions; + using Microsoft.Azure.OData; using Microsoft.Azure; using Models; @@ -38,10 +39,9 @@ public partial class ResourceManagementClient : ServiceClient - /// Subscription credentials which uniquely identify Microsoft Azure - /// subscription. + /// Management credentials for Azure. /// - public SubscriptionCloudCredentials Credentials { get; private set; } + public ServiceClientCredentials Credentials { get; private set; } /// /// Gets subscription credentials which uniquely identify Microsoft @@ -137,13 +137,13 @@ public ResourceManagementClient(Uri baseUri, params DelegatingHandler[] handlers /// Initializes a new instance of the ResourceManagementClient class. /// /// - /// Required. Subscription credentials which uniquely identify Microsoft Azure subscription. + /// Required. Management credentials for Azure. /// /// /// Optional. The set of delegating handlers to insert in the http /// client pipeline. /// - public ResourceManagementClient(SubscriptionCloudCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) + public ResourceManagementClient(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) { if (credentials == null) { @@ -159,13 +159,13 @@ public ResourceManagementClient(SubscriptionCloudCredentials credentials, params /// Optional. The base URI of the service. /// /// - /// Required. Subscription credentials which uniquely identify Microsoft Azure subscription. + /// Required. Management credentials for Azure. /// /// /// Optional. The set of delegating handlers to insert in the http /// client pipeline. /// - public ResourceManagementClient(Uri baseUri, SubscriptionCloudCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) + public ResourceManagementClient(Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) { @@ -194,10 +194,6 @@ private void Initialize() this.BaseUri = new Uri("https://management.azure.com"); this.ApiVersion = "2014-04-01-preview"; this.AcceptLanguage = "en-US"; - if (this.Credentials != null) - { - this.Credentials.InitializeServiceClient(this); - } SerializationSettings = new JsonSerializerSettings { Formatting = Formatting.Indented, diff --git a/src/ResourceManagement/Resource/ResourceManagement/Generated/ResourceProviderOperationDetailsOperations.cs b/src/ResourceManagement/Resource/ResourceManagement/Generated/ResourceProviderOperationDetailsOperations.cs index 3d5d3252e5b15..f85ba1ee258bf 100644 --- a/src/ResourceManagement/Resource/ResourceManagement/Generated/ResourceProviderOperationDetailsOperations.cs +++ b/src/ResourceManagement/Resource/ResourceManagement/Generated/ResourceProviderOperationDetailsOperations.cs @@ -11,8 +11,9 @@ namespace Microsoft.Azure.Management.Resources using System.Threading.Tasks; using Microsoft.Rest; using Newtonsoft.Json; - using Microsoft.Azure.OData; + using System.Linq; using System.Linq.Expressions; + using Microsoft.Azure.OData; using Microsoft.Azure; using Models; @@ -154,6 +155,10 @@ internal ResourceProviderOperationDetailsOperations(ResourceManagementClient cli var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "NoContent")) { diff --git a/src/ResourceManagement/Resource/ResourceManagement/Generated/ResourceProviderOperationDetailsOperationsExtensions.cs b/src/ResourceManagement/Resource/ResourceManagement/Generated/ResourceProviderOperationDetailsOperationsExtensions.cs index 476f8b23f4f29..eeb12611f75a0 100644 --- a/src/ResourceManagement/Resource/ResourceManagement/Generated/ResourceProviderOperationDetailsOperationsExtensions.cs +++ b/src/ResourceManagement/Resource/ResourceManagement/Generated/ResourceProviderOperationDetailsOperationsExtensions.cs @@ -16,7 +16,7 @@ public static partial class ResourceProviderOperationDetailsOperationsExtensions /// Gets a list of resource providers. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// Resource identity. @@ -32,7 +32,7 @@ public static ResourceProviderOperationDetailListResult List(this IResourceProvi /// Gets a list of resource providers. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// Resource identity. diff --git a/src/ResourceManagement/Resource/ResourceManagement/Generated/ResourcesOperations.cs b/src/ResourceManagement/Resource/ResourceManagement/Generated/ResourcesOperations.cs index 582105feb4ecc..c5550351dd852 100644 --- a/src/ResourceManagement/Resource/ResourceManagement/Generated/ResourcesOperations.cs +++ b/src/ResourceManagement/Resource/ResourceManagement/Generated/ResourcesOperations.cs @@ -11,8 +11,9 @@ namespace Microsoft.Azure.Management.Resources using System.Threading.Tasks; using Microsoft.Rest; using Newtonsoft.Json; - using Microsoft.Azure.OData; + using System.Linq; using System.Linq.Expressions; + using Microsoft.Azure.OData; using Microsoft.Azure; using Models; @@ -156,6 +157,10 @@ internal ResourcesOperations(ResourceManagementClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } if (shouldTrace) { ServiceClientTracing.Exit(invocationId, result); @@ -178,7 +183,7 @@ internal ResourcesOperations(ResourceManagementClient client) /// /// Cancellation token. /// - public async Task> ListWithHttpMessagesAsync(Expression> filter = default(Expression>), int? top = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListWithHttpMessagesAsync(Expression> filter = default(Expression>), int? top = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (this.Client.ApiVersion == null) { @@ -284,14 +289,18 @@ internal ResourcesOperations(ResourceManagementClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { @@ -457,6 +466,10 @@ internal ResourcesOperations(ResourceManagementClient client) result.Request = httpRequest; result.Response = httpResponse; result.Body = (statusCode == HttpStatusCode.NoContent); + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } if (shouldTrace) { ServiceClientTracing.Exit(invocationId, result); @@ -613,6 +626,10 @@ internal ResourcesOperations(ResourceManagementClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } if (shouldTrace) { ServiceClientTracing.Exit(invocationId, result); @@ -792,6 +809,10 @@ internal ResourcesOperations(ResourceManagementClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "Created")) { @@ -967,6 +988,10 @@ internal ResourcesOperations(ResourceManagementClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "NoContent")) { @@ -989,7 +1014,7 @@ internal ResourcesOperations(ResourceManagementClient client) /// /// Get all of the resources under a subscription. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// @@ -998,11 +1023,11 @@ internal ResourcesOperations(ResourceManagementClient client) /// /// Cancellation token. /// - public async Task> ListNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (nextLink == null) + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextLink"); + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing bool shouldTrace = ServiceClientTracing.IsEnabled; @@ -1011,13 +1036,13 @@ internal ResourcesOperations(ResourceManagementClient client) { invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("nextLink", nextLink); + tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(invocationId, this, "ListNext", tracingParameters); } // Construct URL string url = "{nextLink}"; - url = url.Replace("{nextLink}", nextLink); + url = url.Replace("{nextLink}", nextPageLink); List queryParameters = new List(); if (queryParameters.Count > 0) { @@ -1086,14 +1111,18 @@ internal ResourcesOperations(ResourceManagementClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { diff --git a/src/ResourceManagement/Resource/ResourceManagement/Generated/ResourcesOperationsExtensions.cs b/src/ResourceManagement/Resource/ResourceManagement/Generated/ResourcesOperationsExtensions.cs index 428a9ba10075e..f8d2bf8a8f887 100644 --- a/src/ResourceManagement/Resource/ResourceManagement/Generated/ResourcesOperationsExtensions.cs +++ b/src/ResourceManagement/Resource/ResourceManagement/Generated/ResourcesOperationsExtensions.cs @@ -16,7 +16,7 @@ public static partial class ResourcesOperationsExtensions /// Move resources within or across subscriptions. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// Source resource group name. @@ -33,7 +33,7 @@ public static void MoveResources(this IResourcesOperations operations, string so /// Move resources within or across subscriptions. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// Source resource group name. @@ -53,7 +53,7 @@ public static void MoveResources(this IResourcesOperations operations, string so /// Get all of the resources under a subscription. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The filter to apply on the operation. @@ -61,7 +61,7 @@ public static void MoveResources(this IResourcesOperations operations, string so /// /// Query parameters. If null is passed returns all resource groups. /// - public static ResourceListResult List(this IResourcesOperations operations, Expression> filter = default(Expression>), int? top = default(int?)) + public static Page List(this IResourcesOperations operations, Expression> filter = default(Expression>), int? top = default(int?)) { return Task.Factory.StartNew(s => ((IResourcesOperations)s).ListAsync(filter, top), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } @@ -70,7 +70,7 @@ public static void MoveResources(this IResourcesOperations operations, string so /// Get all of the resources under a subscription. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The filter to apply on the operation. @@ -81,9 +81,9 @@ public static void MoveResources(this IResourcesOperations operations, string so /// /// Cancellation token. /// - public static async Task ListAsync( this IResourcesOperations operations, Expression> filter = default(Expression>), int? top = default(int?), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListAsync( this IResourcesOperations operations, Expression> filter = default(Expression>), int? top = default(int?), CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListWithHttpMessagesAsync(filter, top, null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListWithHttpMessagesAsync(filter, top, null, cancellationToken).ConfigureAwait(false); return result.Body; } @@ -91,7 +91,7 @@ public static void MoveResources(this IResourcesOperations operations, string so /// Checks whether resource exists. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. The name is case insensitive. @@ -119,7 +119,7 @@ public static void MoveResources(this IResourcesOperations operations, string so /// Checks whether resource exists. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. The name is case insensitive. @@ -151,7 +151,7 @@ public static void MoveResources(this IResourcesOperations operations, string so /// Delete resource and all of its resources. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. The name is case insensitive. @@ -179,7 +179,7 @@ public static void Delete(this IResourcesOperations operations, string resourceG /// Delete resource and all of its resources. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. The name is case insensitive. @@ -210,7 +210,7 @@ public static void Delete(this IResourcesOperations operations, string resourceG /// Create a resource. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. The name is case insensitive. @@ -241,7 +241,7 @@ public static GenericResource CreateOrUpdate(this IResourcesOperations operation /// Create a resource. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. The name is case insensitive. @@ -276,7 +276,7 @@ public static GenericResource CreateOrUpdate(this IResourcesOperations operation /// Returns a resource belonging to a resource group. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. The name is case insensitive. @@ -304,7 +304,7 @@ public static GenericResource Get(this IResourcesOperations operations, string r /// Returns a resource belonging to a resource group. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. The name is case insensitive. @@ -336,31 +336,31 @@ public static GenericResource Get(this IResourcesOperations operations, string r /// Get all of the resources under a subscription. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// - public static ResourceListResult ListNext(this IResourcesOperations operations, string nextLink) + public static Page ListNext(this IResourcesOperations operations, string nextPageLink) { - return Task.Factory.StartNew(s => ((IResourcesOperations)s).ListNextAsync(nextLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + return Task.Factory.StartNew(s => ((IResourcesOperations)s).ListNextAsync(nextPageLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } /// /// Get all of the resources under a subscription. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// /// Cancellation token. /// - public static async Task ListNextAsync( this IResourcesOperations operations, string nextLink, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListNextAsync( this IResourcesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListNextWithHttpMessagesAsync(nextLink, null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false); return result.Body; } diff --git a/src/ResourceManagement/Resource/ResourceManagement/Generated/SubscriptionClient.cs b/src/ResourceManagement/Resource/ResourceManagement/Generated/SubscriptionClient.cs index bfd873a93c050..4f446c0af0ca3 100644 --- a/src/ResourceManagement/Resource/ResourceManagement/Generated/SubscriptionClient.cs +++ b/src/ResourceManagement/Resource/ResourceManagement/Generated/SubscriptionClient.cs @@ -13,6 +13,7 @@ namespace Microsoft.Azure.Subscriptions using Microsoft.Rest; using Microsoft.Rest.Serialization; using Newtonsoft.Json; + using System.Linq; using Microsoft.Azure; using Models; @@ -36,10 +37,9 @@ public partial class SubscriptionClient : ServiceClient, ISu public JsonSerializerSettings DeserializationSettings { get; private set; } /// - /// Subscription credentials which uniquely identify Microsoft Azure - /// subscription. + /// Management credentials for Azure. /// - public SubscriptionCloudCredentials Credentials { get; private set; } + public ServiceClientCredentials Credentials { get; private set; } /// /// Gets subscription credentials which uniquely identify Microsoft @@ -125,13 +125,13 @@ public SubscriptionClient(Uri baseUri, params DelegatingHandler[] handlers) : th /// Initializes a new instance of the SubscriptionClient class. /// /// - /// Required. Subscription credentials which uniquely identify Microsoft Azure subscription. + /// Required. Management credentials for Azure. /// /// /// Optional. The set of delegating handlers to insert in the http /// client pipeline. /// - public SubscriptionClient(SubscriptionCloudCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) + public SubscriptionClient(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) { if (credentials == null) { @@ -147,13 +147,13 @@ public SubscriptionClient(SubscriptionCloudCredentials credentials, params Deleg /// Optional. The base URI of the service. /// /// - /// Required. Subscription credentials which uniquely identify Microsoft Azure subscription. + /// Required. Management credentials for Azure. /// /// /// Optional. The set of delegating handlers to insert in the http /// client pipeline. /// - public SubscriptionClient(Uri baseUri, SubscriptionCloudCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) + public SubscriptionClient(Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) { @@ -177,10 +177,6 @@ private void Initialize() this.BaseUri = new Uri("https://management.azure.com"); this.ApiVersion = "2014-04-01-preview"; this.AcceptLanguage = "en-US"; - if (this.Credentials != null) - { - this.Credentials.InitializeServiceClient(this); - } SerializationSettings = new JsonSerializerSettings { Formatting = Formatting.Indented, diff --git a/src/ResourceManagement/Resource/ResourceManagement/Generated/SubscriptionsOperations.cs b/src/ResourceManagement/Resource/ResourceManagement/Generated/SubscriptionsOperations.cs index 4846c89325c62..0228b7d344fd4 100644 --- a/src/ResourceManagement/Resource/ResourceManagement/Generated/SubscriptionsOperations.cs +++ b/src/ResourceManagement/Resource/ResourceManagement/Generated/SubscriptionsOperations.cs @@ -11,6 +11,7 @@ namespace Microsoft.Azure.Subscriptions using System.Threading.Tasks; using Microsoft.Rest; using Newtonsoft.Json; + using System.Linq; using Microsoft.Azure; using Models; @@ -144,6 +145,10 @@ internal SubscriptionsOperations(SubscriptionClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { @@ -166,7 +171,7 @@ internal SubscriptionsOperations(SubscriptionClient client) /// /// Cancellation token. /// - public async Task> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (this.Client.ApiVersion == null) { @@ -262,14 +267,18 @@ internal SubscriptionsOperations(SubscriptionClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { @@ -281,7 +290,7 @@ internal SubscriptionsOperations(SubscriptionClient client) /// /// Gets a list of the subscriptionIds. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// @@ -290,11 +299,11 @@ internal SubscriptionsOperations(SubscriptionClient client) /// /// Cancellation token. /// - public async Task> ListNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (nextLink == null) + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextLink"); + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing bool shouldTrace = ServiceClientTracing.IsEnabled; @@ -303,13 +312,13 @@ internal SubscriptionsOperations(SubscriptionClient client) { invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("nextLink", nextLink); + tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(invocationId, this, "ListNext", tracingParameters); } // Construct URL string url = "{nextLink}"; - url = url.Replace("{nextLink}", nextLink); + url = url.Replace("{nextLink}", nextPageLink); List queryParameters = new List(); if (queryParameters.Count > 0) { @@ -378,14 +387,18 @@ internal SubscriptionsOperations(SubscriptionClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { diff --git a/src/ResourceManagement/Resource/ResourceManagement/Generated/SubscriptionsOperationsExtensions.cs b/src/ResourceManagement/Resource/ResourceManagement/Generated/SubscriptionsOperationsExtensions.cs index 2a7f42d35db1b..5ea440463b7a5 100644 --- a/src/ResourceManagement/Resource/ResourceManagement/Generated/SubscriptionsOperationsExtensions.cs +++ b/src/ResourceManagement/Resource/ResourceManagement/Generated/SubscriptionsOperationsExtensions.cs @@ -15,7 +15,7 @@ public static partial class SubscriptionsOperationsExtensions /// Gets details about particular subscription. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// Id of the subscription. @@ -29,7 +29,7 @@ public static Subscription Get(this ISubscriptionsOperations operations, string /// Gets details about particular subscription. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// Id of the subscription. @@ -47,9 +47,9 @@ public static Subscription Get(this ISubscriptionsOperations operations, string /// Gets a list of the subscriptionIds. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - public static SubscriptionListResult List(this ISubscriptionsOperations operations) + public static Page List(this ISubscriptionsOperations operations) { return Task.Factory.StartNew(s => ((ISubscriptionsOperations)s).ListAsync(), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } @@ -58,14 +58,14 @@ public static SubscriptionListResult List(this ISubscriptionsOperations operatio /// Gets a list of the subscriptionIds. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// Cancellation token. /// - public static async Task ListAsync( this ISubscriptionsOperations operations, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListAsync( this ISubscriptionsOperations operations, CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false); return result.Body; } @@ -73,31 +73,31 @@ public static SubscriptionListResult List(this ISubscriptionsOperations operatio /// Gets a list of the subscriptionIds. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// - public static SubscriptionListResult ListNext(this ISubscriptionsOperations operations, string nextLink) + public static Page ListNext(this ISubscriptionsOperations operations, string nextPageLink) { - return Task.Factory.StartNew(s => ((ISubscriptionsOperations)s).ListNextAsync(nextLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + return Task.Factory.StartNew(s => ((ISubscriptionsOperations)s).ListNextAsync(nextPageLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } /// /// Gets a list of the subscriptionIds. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// /// Cancellation token. /// - public static async Task ListNextAsync( this ISubscriptionsOperations operations, string nextLink, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListNextAsync( this ISubscriptionsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListNextWithHttpMessagesAsync(nextLink, null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false); return result.Body; } diff --git a/src/ResourceManagement/Resource/ResourceManagement/Generated/TagsOperations.cs b/src/ResourceManagement/Resource/ResourceManagement/Generated/TagsOperations.cs index 56983f2e33d1f..57a9aa49f47e4 100644 --- a/src/ResourceManagement/Resource/ResourceManagement/Generated/TagsOperations.cs +++ b/src/ResourceManagement/Resource/ResourceManagement/Generated/TagsOperations.cs @@ -11,8 +11,9 @@ namespace Microsoft.Azure.Management.Resources using System.Threading.Tasks; using Microsoft.Rest; using Newtonsoft.Json; - using Microsoft.Azure.OData; + using System.Linq; using System.Linq.Expressions; + using Microsoft.Azure.OData; using Microsoft.Azure; using Models; @@ -153,6 +154,10 @@ internal TagsOperations(ResourceManagementClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } if (shouldTrace) { ServiceClientTracing.Exit(invocationId, result); @@ -286,6 +291,10 @@ internal TagsOperations(ResourceManagementClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "Created")) { @@ -422,6 +431,10 @@ internal TagsOperations(ResourceManagementClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "Created")) { @@ -551,6 +564,10 @@ internal TagsOperations(ResourceManagementClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } if (shouldTrace) { ServiceClientTracing.Exit(invocationId, result); @@ -567,7 +584,7 @@ internal TagsOperations(ResourceManagementClient client) /// /// Cancellation token. /// - public async Task> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (this.Client.ApiVersion == null) { @@ -663,14 +680,18 @@ internal TagsOperations(ResourceManagementClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { @@ -682,7 +703,7 @@ internal TagsOperations(ResourceManagementClient client) /// /// Get a list of subscription resource tags. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// @@ -691,11 +712,11 @@ internal TagsOperations(ResourceManagementClient client) /// /// Cancellation token. /// - public async Task> ListNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (nextLink == null) + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextLink"); + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing bool shouldTrace = ServiceClientTracing.IsEnabled; @@ -704,13 +725,13 @@ internal TagsOperations(ResourceManagementClient client) { invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("nextLink", nextLink); + tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(invocationId, this, "ListNext", tracingParameters); } // Construct URL string url = "{nextLink}"; - url = url.Replace("{nextLink}", nextLink); + url = url.Replace("{nextLink}", nextPageLink); List queryParameters = new List(); if (queryParameters.Count > 0) { @@ -779,14 +800,18 @@ internal TagsOperations(ResourceManagementClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { diff --git a/src/ResourceManagement/Resource/ResourceManagement/Generated/TagsOperationsExtensions.cs b/src/ResourceManagement/Resource/ResourceManagement/Generated/TagsOperationsExtensions.cs index ca60bbe0d7c72..31efcfc32d5dc 100644 --- a/src/ResourceManagement/Resource/ResourceManagement/Generated/TagsOperationsExtensions.cs +++ b/src/ResourceManagement/Resource/ResourceManagement/Generated/TagsOperationsExtensions.cs @@ -16,7 +16,7 @@ public static partial class TagsOperationsExtensions /// Delete a subscription resource tag value. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the tag. @@ -33,7 +33,7 @@ public static void DeleteValue(this ITagsOperations operations, string tagName, /// Delete a subscription resource tag value. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the tag. @@ -53,7 +53,7 @@ public static void DeleteValue(this ITagsOperations operations, string tagName, /// Create a subscription resource tag value. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the tag. @@ -70,7 +70,7 @@ public static TagValue CreateOrUpdateValue(this ITagsOperations operations, stri /// Create a subscription resource tag value. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the tag. @@ -91,7 +91,7 @@ public static TagValue CreateOrUpdateValue(this ITagsOperations operations, stri /// Create a subscription resource tag. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the tag. @@ -105,7 +105,7 @@ public static TagDetails CreateOrUpdate(this ITagsOperations operations, string /// Create a subscription resource tag. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the tag. @@ -123,7 +123,7 @@ public static TagDetails CreateOrUpdate(this ITagsOperations operations, string /// Delete a subscription resource tag. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the tag. @@ -137,7 +137,7 @@ public static void Delete(this ITagsOperations operations, string tagName) /// Delete a subscription resource tag. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the tag. @@ -154,9 +154,9 @@ public static void Delete(this ITagsOperations operations, string tagName) /// Get a list of subscription resource tags. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - public static TagsListResult List(this ITagsOperations operations) + public static Page List(this ITagsOperations operations) { return Task.Factory.StartNew(s => ((ITagsOperations)s).ListAsync(), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } @@ -165,14 +165,14 @@ public static TagsListResult List(this ITagsOperations operations) /// Get a list of subscription resource tags. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// Cancellation token. /// - public static async Task ListAsync( this ITagsOperations operations, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListAsync( this ITagsOperations operations, CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false); return result.Body; } @@ -180,31 +180,31 @@ public static TagsListResult List(this ITagsOperations operations) /// Get a list of subscription resource tags. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// - public static TagsListResult ListNext(this ITagsOperations operations, string nextLink) + public static Page ListNext(this ITagsOperations operations, string nextPageLink) { - return Task.Factory.StartNew(s => ((ITagsOperations)s).ListNextAsync(nextLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + return Task.Factory.StartNew(s => ((ITagsOperations)s).ListNextAsync(nextPageLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } /// /// Get a list of subscription resource tags. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// /// Cancellation token. /// - public static async Task ListNextAsync( this ITagsOperations operations, string nextLink, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListNextAsync( this ITagsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListNextWithHttpMessagesAsync(nextLink, null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false); return result.Body; } diff --git a/src/ResourceManagement/Resource/ResourceManagement/Generated/TenantsOperations.cs b/src/ResourceManagement/Resource/ResourceManagement/Generated/TenantsOperations.cs index 342f45884cf04..18bca03f619eb 100644 --- a/src/ResourceManagement/Resource/ResourceManagement/Generated/TenantsOperations.cs +++ b/src/ResourceManagement/Resource/ResourceManagement/Generated/TenantsOperations.cs @@ -11,6 +11,7 @@ namespace Microsoft.Azure.Subscriptions using System.Threading.Tasks; using Microsoft.Rest; using Newtonsoft.Json; + using System.Linq; using Microsoft.Azure; using Models; @@ -41,7 +42,7 @@ internal TenantsOperations(SubscriptionClient client) /// /// Cancellation token. /// - public async Task> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (this.Client.ApiVersion == null) { @@ -137,14 +138,18 @@ internal TenantsOperations(SubscriptionClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { @@ -156,7 +161,7 @@ internal TenantsOperations(SubscriptionClient client) /// /// Gets a list of the tenantIds. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// @@ -165,11 +170,11 @@ internal TenantsOperations(SubscriptionClient client) /// /// Cancellation token. /// - public async Task> ListNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (nextLink == null) + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextLink"); + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing bool shouldTrace = ServiceClientTracing.IsEnabled; @@ -178,13 +183,13 @@ internal TenantsOperations(SubscriptionClient client) { invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("nextLink", nextLink); + tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(invocationId, this, "ListNext", tracingParameters); } // Construct URL string url = "{nextLink}"; - url = url.Replace("{nextLink}", nextLink); + url = url.Replace("{nextLink}", nextPageLink); List queryParameters = new List(); if (queryParameters.Count > 0) { @@ -253,14 +258,18 @@ internal TenantsOperations(SubscriptionClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { diff --git a/src/ResourceManagement/Resource/ResourceManagement/Generated/TenantsOperationsExtensions.cs b/src/ResourceManagement/Resource/ResourceManagement/Generated/TenantsOperationsExtensions.cs index c2695fca7f44e..4b0a4cd42c49b 100644 --- a/src/ResourceManagement/Resource/ResourceManagement/Generated/TenantsOperationsExtensions.cs +++ b/src/ResourceManagement/Resource/ResourceManagement/Generated/TenantsOperationsExtensions.cs @@ -15,9 +15,9 @@ public static partial class TenantsOperationsExtensions /// Gets a list of the tenantIds. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - public static TenantListResult List(this ITenantsOperations operations) + public static Page List(this ITenantsOperations operations) { return Task.Factory.StartNew(s => ((ITenantsOperations)s).ListAsync(), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } @@ -26,14 +26,14 @@ public static TenantListResult List(this ITenantsOperations operations) /// Gets a list of the tenantIds. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// Cancellation token. /// - public static async Task ListAsync( this ITenantsOperations operations, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListAsync( this ITenantsOperations operations, CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false); return result.Body; } @@ -41,31 +41,31 @@ public static TenantListResult List(this ITenantsOperations operations) /// Gets a list of the tenantIds. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// - public static TenantListResult ListNext(this ITenantsOperations operations, string nextLink) + public static Page ListNext(this ITenantsOperations operations, string nextPageLink) { - return Task.Factory.StartNew(s => ((ITenantsOperations)s).ListNextAsync(nextLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + return Task.Factory.StartNew(s => ((ITenantsOperations)s).ListNextAsync(nextPageLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } /// /// Gets a list of the tenantIds. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// /// Cancellation token. /// - public static async Task ListNextAsync( this ITenantsOperations operations, string nextLink, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListNextAsync( this ITenantsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListNextWithHttpMessagesAsync(nextLink, null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false); return result.Body; } diff --git a/src/ResourceManagement/Resource/ResourceManagement/Microsoft.Azure.Management.Resources.nuspec b/src/ResourceManagement/Resource/ResourceManagement/Microsoft.Azure.Management.Resources.nuspec index ad20907362a69..2a7d1b4847023 100644 --- a/src/ResourceManagement/Resource/ResourceManagement/Microsoft.Azure.Management.Resources.nuspec +++ b/src/ResourceManagement/Resource/ResourceManagement/Microsoft.Azure.Management.Resources.nuspec @@ -24,7 +24,7 @@ - + diff --git a/src/ResourceManagement/Resource/ResourceManagement/ResourceManagement.csproj b/src/ResourceManagement/Resource/ResourceManagement/ResourceManagement.csproj index 21b1f1459058a..0b7ad90c182ef 100644 --- a/src/ResourceManagement/Resource/ResourceManagement/ResourceManagement.csproj +++ b/src/ResourceManagement/Resource/ResourceManagement/ResourceManagement.csproj @@ -34,6 +34,41 @@ True + + + + + + $(LibraryNugetPackageFolder)\Newtonsoft.Json.6.0.4\lib\portable-net45+wp80+win8+wpa81\Newtonsoft.Json.dll + + + $(LibraryNugetPackageFolder)\Microsoft.Rest.ClientRuntime.1.1.0\lib\portable-net45+win8+wpa81\Microsoft.Rest.ClientRuntime.dll + + + $(LibraryNugetPackageFolder)\Microsoft.Rest.ClientRuntime.Azure.1.0.13\lib\portable-net45+win8+wpa81\Microsoft.Rest.ClientRuntime.Azure.dll + + + + + + + + + + + + $(LibraryNugetPackageFolder)\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll + + + $(LibraryNugetPackageFolder)\Microsoft.Rest.ClientRuntime.1.1.0\lib\net45\Microsoft.Rest.ClientRuntime.dll + + + $(LibraryNugetPackageFolder)\Microsoft.Rest.ClientRuntime.Azure.1.0.13\lib\net45\Microsoft.Rest.ClientRuntime.Azure.dll + + + + + diff --git a/src/ResourceManagement/Resource/ResourceManagement/packages.config b/src/ResourceManagement/Resource/ResourceManagement/packages.config index 3e47763a38835..ca8ae74a13c89 100644 --- a/src/ResourceManagement/Resource/ResourceManagement/packages.config +++ b/src/ResourceManagement/Resource/ResourceManagement/packages.config @@ -1,7 +1,7 @@  - - + + diff --git a/src/ResourceManagement/Resource/Resources.Tests/InMemoryTests/DeploymentTests.InMemory.cs b/src/ResourceManagement/Resource/Resources.Tests/InMemoryTests/DeploymentTests.InMemory.cs index 61930febb8e29..094fa36ac384f 100644 --- a/src/ResourceManagement/Resource/Resources.Tests/InMemoryTests/DeploymentTests.InMemory.cs +++ b/src/ResourceManagement/Resource/Resources.Tests/InMemoryTests/DeploymentTests.InMemory.cs @@ -14,17 +14,16 @@ // using System; -using System.Linq; using System.Collections.Generic; -using Microsoft.Azure; -using Microsoft.Azure.Management.Resources; -using Xunit; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; -using System.Net.Http; +using System.Linq; using System.Net; +using System.Net.Http; +using Newtonsoft.Json.Linq; +using Xunit; +using Microsoft.Rest; +using Microsoft.Azure.Management.Resources; using Microsoft.Azure.Management.Resources.Models; -using System.Runtime.Serialization.Formatters; + namespace ResourceGroups.Tests { @@ -33,7 +32,7 @@ public class InMemoryDeploymentTests public ResourceManagementClient GetResourceManagementClient(RecordedDelegatingHandler handler) { var subscriptionId = Guid.NewGuid().ToString(); - var token = new TokenCloudCredentials(subscriptionId, "abc123"); + var token = new TokenCredentials(subscriptionId, "abc123"); handler.IsPassThrough = false; var client = new ResourceManagementClient(token, handler); client.SubscriptionId = subscriptionId; @@ -190,15 +189,15 @@ public void ListDeploymentOperationsReturnsMultipleObjects() Assert.NotNull(handler.RequestHeaders.GetValues("Authorization")); // Validate response - Assert.Equal(1, result.Value.Count); - Assert.Equal("AEF2398", result.Value[0].OperationId); - Assert.Equal("/subscriptions/123abc/resourcegroups/foo/providers/ResourceProviderTestHost/TestResourceType/resource1", result.Value[0].Properties.TargetResource.Id); - Assert.Equal("mySite1", result.Value[0].Properties.TargetResource.ResourceName); - Assert.Equal("Microsoft.Web", result.Value[0].Properties.TargetResource.ResourceType); - Assert.Equal("Succeeded", result.Value[0].Properties.ProvisioningState); - Assert.Equal("InternalServerError", result.Value[0].Properties.StatusCode); - Assert.Equal("InternalServerError", result.Value[0].Properties.StatusMessage); - Assert.Equal("https://wa.com/subscriptions/mysubid/resourcegroups/TestRG/deployments/test-release-3/operations?$skiptoken=983fknw", result.NextLink); + Assert.Equal(1, result.Count()); + Assert.Equal("AEF2398", result.First().OperationId); + Assert.Equal("/subscriptions/123abc/resourcegroups/foo/providers/ResourceProviderTestHost/TestResourceType/resource1", result.First().Properties.TargetResource.Id); + Assert.Equal("mySite1", result.First().Properties.TargetResource.ResourceName); + Assert.Equal("Microsoft.Web", result.First().Properties.TargetResource.ResourceType); + Assert.Equal("Succeeded", result.First().Properties.ProvisioningState); + Assert.Equal("InternalServerError", result.First().Properties.StatusCode); + Assert.Equal("InternalServerError", result.First().Properties.StatusMessage); + Assert.Equal("https://wa.com/subscriptions/mysubid/resourcegroups/TestRG/deployments/test-release-3/operations?$skiptoken=983fknw", result.NextPageLink); } [Fact] @@ -223,7 +222,7 @@ public void ListDeploymentOperationsReturnsEmptyArray() Assert.NotNull(handler.RequestHeaders.GetValues("Authorization")); // Validate response - Assert.Equal(0, result.Value.Count); + Assert.Equal(0, result.Count()); } [Fact] @@ -318,7 +317,7 @@ public void ListDeploymentOperationsWithRealPayloadReadsJsonInStatusMessage() Assert.Equal(HttpMethod.Get, handler.Method); Assert.NotNull(handler.RequestHeaders.GetValues("Authorization")); - Assert.True(JObject.Parse(result.Value[0].Properties.StatusMessage.ToString()).HasValues); + Assert.True(JObject.Parse(result.First().Properties.StatusMessage.ToString()).HasValues); } [Fact] @@ -370,7 +369,7 @@ public void ListDeploymentOperationsWorksWithNextLink() client = GetResourceManagementClient(handler); - result = client.DeploymentOperations.ListNext(result.NextLink); + result = client.DeploymentOperations.ListNext(result.NextPageLink); // Validate body Assert.Equal(HttpMethod.Get, handler.Method); @@ -378,8 +377,8 @@ public void ListDeploymentOperationsWorksWithNextLink() Assert.Equal("https://wa.com/subscriptions/mysubid/resourcegroups/TestRG/deployments/test-release-3/operations?$skiptoken=983fknw", handler.Uri.ToString()); // Validate response - Assert.Equal(0, result.Value.Count); - Assert.Equal(null, result.NextLink); + Assert.Equal(0, result.Count()); + Assert.Equal(null, result.NextPageLink); } [Fact] @@ -829,15 +828,15 @@ public void DeploymentTestsListAllValidateMessage() Assert.NotNull(handler.RequestHeaders.GetValues("Authorization")); // Validate result - Assert.Equal("myrealease-3.14", result.Value[0].Name); - Assert.Equal("Succeeded", result.Value[0].Properties.ProvisioningState); - Assert.Equal(new DateTime(2014, 1, 5, 12, 30, 43), result.Value[0].Properties.Timestamp); - Assert.Equal(DeploymentMode.Incremental, result.Value[0].Properties.Mode); - Assert.Equal("http://wa/template.json", result.Value[0].Properties.TemplateLink.Uri.ToString()); - Assert.Equal("1.0.0.0", result.Value[0].Properties.TemplateLink.ContentVersion); - Assert.True(result.Value[0].Properties.Parameters.ToString().Contains("\"type\": \"string\"")); - Assert.True(result.Value[0].Properties.Outputs.ToString().Contains("\"type\": \"string\"")); - Assert.Equal("https://wa/subscriptions/subId/templateDeployments?$skiptoken=983fknw", result.NextLink.ToString()); + Assert.Equal("myrealease-3.14", result.First().Name); + Assert.Equal("Succeeded", result.First().Properties.ProvisioningState); + Assert.Equal(new DateTime(2014, 1, 5, 12, 30, 43), result.First().Properties.Timestamp); + Assert.Equal(DeploymentMode.Incremental, result.First().Properties.Mode); + Assert.Equal("http://wa/template.json", result.First().Properties.TemplateLink.Uri.ToString()); + Assert.Equal("1.0.0.0", result.First().Properties.TemplateLink.ContentVersion); + Assert.True(result.First().Properties.Parameters.ToString().Contains("\"type\": \"string\"")); + Assert.True(result.First().Properties.Outputs.ToString().Contains("\"type\": \"string\"")); + Assert.Equal("https://wa/subscriptions/subId/templateDeployments?$skiptoken=983fknw", result.NextPageLink); } [Fact] @@ -938,15 +937,15 @@ public void DeploymentTestsListValidateMessage() Assert.True(handler.Uri.ToString().Contains("$filter=provisioningState eq 'Succeeded'")); // Validate result - Assert.Equal("myrealease-3.14", result.Value[0].Name); - Assert.Equal("Succeeded", result.Value[0].Properties.ProvisioningState); - Assert.Equal(new DateTime(2014, 1, 5, 12, 30, 43), result.Value[0].Properties.Timestamp); - Assert.Equal(DeploymentMode.Incremental, result.Value[0].Properties.Mode); - Assert.Equal("http://wa/template.json", result.Value[0].Properties.TemplateLink.Uri.ToString()); - Assert.Equal("1.0.0.0", result.Value[0].Properties.TemplateLink.ContentVersion); - Assert.True(result.Value[0].Properties.Parameters.ToString().Contains("\"type\": \"string\"")); - Assert.True(result.Value[0].Properties.Outputs.ToString().Contains("\"type\": \"string\"")); - Assert.Equal("https://wa/subscriptions/subId/templateDeployments?$skiptoken=983fknw", result.NextLink.ToString()); + Assert.Equal("myrealease-3.14", result.First().Name); + Assert.Equal("Succeeded", result.First().Properties.ProvisioningState); + Assert.Equal(new DateTime(2014, 1, 5, 12, 30, 43), result.First().Properties.Timestamp); + Assert.Equal(DeploymentMode.Incremental, result.First().Properties.Mode); + Assert.Equal("http://wa/template.json", result.First().Properties.TemplateLink.Uri.ToString()); + Assert.Equal("1.0.0.0", result.First().Properties.TemplateLink.ContentVersion); + Assert.True(result.First().Properties.Parameters.ToString().Contains("\"type\": \"string\"")); + Assert.True(result.First().Properties.Outputs.ToString().Contains("\"type\": \"string\"")); + Assert.Equal("https://wa/subscriptions/subId/templateDeployments?$skiptoken=983fknw", result.NextPageLink); } [Fact] @@ -1048,15 +1047,15 @@ public void DeploymentTestsListForGroupValidateMessage() Assert.True(handler.Uri.ToString().Contains("resourcegroups/foo/deployments")); // Validate result - Assert.Equal("myrealease-3.14", result.Value[0].Name); - Assert.Equal("Succeeded", result.Value[0].Properties.ProvisioningState); - Assert.Equal(new DateTime(2014, 1, 5, 12, 30, 43), result.Value[0].Properties.Timestamp); - Assert.Equal(DeploymentMode.Incremental, result.Value[0].Properties.Mode); - Assert.Equal("http://wa/template.json", result.Value[0].Properties.TemplateLink.Uri.ToString()); - Assert.Equal("1.0.0.0", result.Value[0].Properties.TemplateLink.ContentVersion); - Assert.True(result.Value[0].Properties.Parameters.ToString().Contains("\"type\": \"string\"")); - Assert.True(result.Value[0].Properties.Outputs.ToString().Contains("\"type\": \"string\"")); - Assert.Equal("https://wa/subscriptions/subId/templateDeployments?$skiptoken=983fknw", result.NextLink.ToString()); + Assert.Equal("myrealease-3.14", result.First().Name); + Assert.Equal("Succeeded", result.First().Properties.ProvisioningState); + Assert.Equal(new DateTime(2014, 1, 5, 12, 30, 43), result.First().Properties.Timestamp); + Assert.Equal(DeploymentMode.Incremental, result.First().Properties.Mode); + Assert.Equal("http://wa/template.json", result.First().Properties.TemplateLink.Uri.ToString()); + Assert.Equal("1.0.0.0", result.First().Properties.TemplateLink.ContentVersion); + Assert.True(result.First().Properties.Parameters.ToString().Contains("\"type\": \"string\"")); + Assert.True(result.First().Properties.Outputs.ToString().Contains("\"type\": \"string\"")); + Assert.Equal("https://wa/subscriptions/subId/templateDeployments?$skiptoken=983fknw", result.NextPageLink); } [Fact] @@ -1070,7 +1069,7 @@ public void DeploymentTestListDoesNotThrowExceptions() var client = GetResourceManagementClient(handler); var result = client.Deployments.List("foo"); - Assert.Empty(result.Value); + Assert.Empty(result); } } } diff --git a/src/ResourceManagement/Resource/Resources.Tests/InMemoryTests/FeatureTests.InMemory.cs b/src/ResourceManagement/Resource/Resources.Tests/InMemoryTests/FeatureTests.InMemory.cs index 3f31dd70593ae..d89550a15eb5f 100644 --- a/src/ResourceManagement/Resource/Resources.Tests/InMemoryTests/FeatureTests.InMemory.cs +++ b/src/ResourceManagement/Resource/Resources.Tests/InMemoryTests/FeatureTests.InMemory.cs @@ -14,12 +14,12 @@ // using System; -using Microsoft.Azure; -using Microsoft.Azure.Management.Resources; -using Xunit; -using System.Net.Http; using System.Net; +using System.Net.Http; +using Microsoft.Azure.Management.Resources; using Microsoft.Azure.Test.HttpRecorder; +using Microsoft.Rest; +using Xunit; namespace ResourceGroups.Tests @@ -29,7 +29,7 @@ public class InMemoryFeatureTests public FeatureClient GetFeatureClient(RecordedDelegatingHandler handler) { var subscriptionId = Guid.NewGuid().ToString(); - var token = new TokenCloudCredentials(subscriptionId, "abc123"); + var token = new TokenCredentials(subscriptionId, "abc123"); handler.IsPassThrough = false; var client = new FeatureClient(token, handler); client.SubscriptionId = subscriptionId; @@ -74,7 +74,7 @@ public void RegisterFeature() //Valid payload //Construct expected URL - string expectedUrl = "/subscriptions/" + Uri.EscapeDataString(client.Credentials.SubscriptionId) + "/providers/Microsoft.Features/providers/" + Uri.EscapeDataString(resourceProviderNamespace) + "/features/" + Uri.EscapeDataString(featureName) + "/register?"; + string expectedUrl = "/subscriptions/" + Uri.EscapeDataString(client.SubscriptionId) + "/providers/Microsoft.Features/providers/" + Uri.EscapeDataString(resourceProviderNamespace) + "/features/" + Uri.EscapeDataString(featureName) + "/register?"; expectedUrl = expectedUrl + "api-version=2014-08-01-preview"; string baseUrl = client.BaseUri.AbsoluteUri; // Trim '/' character from the end of baseUrl and beginning of url. @@ -132,7 +132,7 @@ public void GetPreviewedFeatures() //Valid payload //Construct expected URL - string expectedUrl = "/subscriptions/" + Uri.EscapeDataString(client.Credentials.SubscriptionId) + "/providers/Microsoft.Features/providers/"+Uri.EscapeDataString(resourceProviderNamespace) + "/features/" + Uri.EscapeDataString(featureName) + "?"; + string expectedUrl = "/subscriptions/" + Uri.EscapeDataString(client.SubscriptionId) + "/providers/Microsoft.Features/providers/"+Uri.EscapeDataString(resourceProviderNamespace) + "/features/" + Uri.EscapeDataString(featureName) + "?"; expectedUrl = expectedUrl + "api-version=2014-08-01-preview"; string baseUrl = client.BaseUri.AbsoluteUri; // Trim '/' character from the end of baseUrl and beginning of url. @@ -192,7 +192,7 @@ public void ListPreviewedFeatures() //Valid payload //Construct expected URL - string expectedUrl = "/subscriptions/" + Uri.EscapeDataString(client.Credentials.SubscriptionId) + "/providers/Microsoft.Features/providers/" + Uri.EscapeDataString(resourceProviderNamespace) + "/features?"; + string expectedUrl = "/subscriptions/" + Uri.EscapeDataString(client.SubscriptionId) + "/providers/Microsoft.Features/providers/" + Uri.EscapeDataString(resourceProviderNamespace) + "/features?"; expectedUrl = expectedUrl + "api-version=2014-08-01-preview"; string baseUrl = client.BaseUri.AbsoluteUri; // Trim '/' character from the end of baseUrl and beginning of url. @@ -248,7 +248,7 @@ public void ListAllPreviewedFeatures() //Valid payload //Construct expected URL - string expectedUrl = "/subscriptions/" + Uri.EscapeDataString(client.Credentials.SubscriptionId) + "/providers/Microsoft.Features/features?"; + string expectedUrl = "/subscriptions/" + Uri.EscapeDataString(client.SubscriptionId) + "/providers/Microsoft.Features/features?"; expectedUrl = expectedUrl + "api-version=2014-08-01-preview"; string baseUrl = client.BaseUri.AbsoluteUri; // Trim '/' character from the end of baseUrl and beginning of url. diff --git a/src/ResourceManagement/Resource/Resources.Tests/InMemoryTests/ProviderTests.InMemory.cs b/src/ResourceManagement/Resource/Resources.Tests/InMemoryTests/ProviderTests.InMemory.cs index 2a424f489672e..5b17f468186da 100644 --- a/src/ResourceManagement/Resource/Resources.Tests/InMemoryTests/ProviderTests.InMemory.cs +++ b/src/ResourceManagement/Resource/Resources.Tests/InMemoryTests/ProviderTests.InMemory.cs @@ -14,12 +14,12 @@ // using System; -using Microsoft.Azure; +using System.Linq; +using System.Net; +using System.Net.Http; using Microsoft.Azure.Management.Resources; -using Microsoft.Azure.Management.Resources.Models; +using Microsoft.Rest; using Xunit; -using System.Net.Http; -using System.Net; namespace ResourceGroups.Tests { @@ -28,7 +28,7 @@ public class InMemoryProviderTests public ResourceManagementClient GetResourceManagementClient(RecordedDelegatingHandler handler) { var subscriptionId = Guid.NewGuid().ToString(); - var token = new TokenCloudCredentials(subscriptionId, "abc123"); + var token = new TokenCredentials(subscriptionId, "abc123"); handler.IsPassThrough = false; var client = new ResourceManagementClient(token, handler); client.SubscriptionId = subscriptionId; @@ -124,13 +124,13 @@ public void ProviderListValidateMessage() Assert.NotNull(handler.RequestHeaders.GetValues("Authorization")); // Validate result - Assert.Equal(1, result.Value.Count); - Assert.Equal("Microsoft.Websites", result.Value[0].NamespaceProperty); - Assert.Equal("Registered", result.Value[0].RegistrationState); - Assert.Equal(2, result.Value[0].ResourceTypes.Count); - Assert.Equal("sites", result.Value[0].ResourceTypes[0].ResourceType); - Assert.Equal(1, result.Value[0].ResourceTypes[0].Locations.Count); - Assert.Equal("Central US", result.Value[0].ResourceTypes[0].Locations[0]); + Assert.Equal(1, result.Count()); + Assert.Equal("Microsoft.Websites", result.First().NamespaceProperty); + Assert.Equal("Registered", result.First().RegistrationState); + Assert.Equal(2, result.First().ResourceTypes.Count); + Assert.Equal("sites", result.First().ResourceTypes[0].ResourceType); + Assert.Equal(1, result.First().ResourceTypes[0].Locations.Count); + Assert.Equal("Central US", result.First().ResourceTypes[0].Locations[0]); } [Fact] diff --git a/src/ResourceManagement/Resource/Resources.Tests/InMemoryTests/ResourceGroupTests.InMemory.cs b/src/ResourceManagement/Resource/Resources.Tests/InMemoryTests/ResourceGroupTests.InMemory.cs index 716caaa75b22b..14632c4d80f9a 100644 --- a/src/ResourceManagement/Resource/Resources.Tests/InMemoryTests/ResourceGroupTests.InMemory.cs +++ b/src/ResourceManagement/Resource/Resources.Tests/InMemoryTests/ResourceGroupTests.InMemory.cs @@ -14,16 +14,17 @@ // using System; -using System.Linq; using System.Collections.Generic; -using System.Threading; +using System.Linq; +using System.Net; +using System.Net.Http; using Microsoft.Azure; using Microsoft.Azure.Management.Resources; -using Xunit; -using Newtonsoft.Json.Linq; -using System.Net.Http; -using System.Net; using Microsoft.Azure.Management.Resources.Models; +using Microsoft.Rest; +using Newtonsoft.Json.Linq; + +using Xunit; namespace ResourceGroups.Tests { @@ -32,7 +33,7 @@ public class InMemoryResourceGroupTests public ResourceManagementClient GetResourceManagementClient(RecordedDelegatingHandler handler) { var subscriptionId = Guid.NewGuid().ToString(); - var token = new TokenCloudCredentials(subscriptionId, "abc123"); + var token = new TokenCredentials(subscriptionId, "abc123"); handler.IsPassThrough = false; var client = new ResourceManagementClient(token, handler); client.SubscriptionId = subscriptionId; @@ -291,11 +292,11 @@ public void ResourceGroupListAllValidateMessage() Assert.NotNull(handler.RequestHeaders.GetValues("Authorization")); // Validate result - Assert.Equal(2, result.Value.Count); - Assert.Equal("myresourcegroup1", result.Value[0].Name); - Assert.Equal("Succeeded", result.Value[0].Properties.ProvisioningState); - Assert.Equal("/subscriptions/abc123/resourcegroups/csmrgr5mfggio", result.Value[0].Id); - Assert.Equal("https://wa/subscriptions/subId/resourcegroups?api-version=1.0&$skiptoken=662idk", result.NextLink.ToString()); + Assert.Equal(2, result.Count()); + Assert.Equal("myresourcegroup1", result.First().Name); + Assert.Equal("Succeeded", result.First().Properties.ProvisioningState); + Assert.Equal("/subscriptions/abc123/resourcegroups/csmrgr5mfggio", result.First().Id); + Assert.Equal("https://wa/subscriptions/subId/resourcegroups?api-version=1.0&$skiptoken=662idk", result.NextPageLink); } [Fact] @@ -316,7 +317,7 @@ public void ResourceGroupListAllWorksForEmptyLists() Assert.NotNull(handler.RequestHeaders.GetValues("Authorization")); // Validate result - Assert.Equal(0, result.Value.Count); + Assert.Equal(0, result.Count()); } [Fact] @@ -351,9 +352,9 @@ public void ResourceGroupListValidateMessage() Assert.True(handler.Uri.ToString().Contains("$top=5")); // Validate result - Assert.Equal(2, result.Value.Count); - Assert.Equal("myresourcegroup1", result.Value[0].Name); - Assert.Equal("https://wa/subscriptions/subId/resourcegroups?api-version=1.0&$skiptoken=662idk", result.NextLink.ToString()); + Assert.Equal(2, result.Count()); + Assert.Equal("myresourcegroup1", result.First().Name); + Assert.Equal("https://wa/subscriptions/subId/resourcegroups?api-version=1.0&$skiptoken=662idk", result.NextPageLink); } [Fact] diff --git a/src/ResourceManagement/Resource/Resources.Tests/InMemoryTests/ResourceTests.InMemory.cs b/src/ResourceManagement/Resource/Resources.Tests/InMemoryTests/ResourceTests.InMemory.cs index 249b8ba893db0..e86290a5b643b 100644 --- a/src/ResourceManagement/Resource/Resources.Tests/InMemoryTests/ResourceTests.InMemory.cs +++ b/src/ResourceManagement/Resource/Resources.Tests/InMemoryTests/ResourceTests.InMemory.cs @@ -16,14 +16,14 @@ using System; using System.Collections.Generic; using System.Linq; -using Microsoft.Azure; +using System.Net; +using System.Net.Http; using Microsoft.Azure.Management.Resources; +using Microsoft.Azure.Management.Resources.Models; using Microsoft.Azure.Test; -using Xunit; +using Microsoft.Rest; using Newtonsoft.Json.Linq; -using System.Net.Http; -using System.Net; -using Microsoft.Azure.Management.Resources.Models; +using Xunit; namespace ResourceGroups.Tests { @@ -32,7 +32,7 @@ public class InMemoryResourceTests public ResourceManagementClient GetResourceManagementClient(RecordedDelegatingHandler handler) { var subscriptionId = Guid.NewGuid().ToString(); - var token = new TokenCloudCredentials(subscriptionId, "abc123"); + var token = new TokenCredentials(subscriptionId, "abc123"); var client = new ResourceManagementClient(token, handler); client.SubscriptionId = subscriptionId; handler.IsPassThrough = false; @@ -169,13 +169,13 @@ public void ResourceListValidateMessage() Assert.NotNull(handler.RequestHeaders.GetValues("Authorization")); // Validate result - Assert.Equal(2, result.Value.Count()); - Assert.Equal("South Central US", result.Value[0].Location); - Assert.Equal("site1", result.Value[0].Name); - Assert.Equal("/subscriptions/12345/resourceGroups/foo/providers/Microsoft.Web/Sites/site1", result.Value[0].Id); - Assert.Equal("/subscriptions/12345/resourceGroups/foo/providers/Microsoft.Web/Sites/site1", result.Value[0].Id); - Assert.True(result.Value[0].Properties.ToString().Contains("Dedicated")); - Assert.Equal("Running", (result.Value[0].Properties as JObject)["provisioningState"]); + Assert.Equal(2, result.Count()); + Assert.Equal("South Central US", result.First().Location); + Assert.Equal("site1", result.First().Name); + Assert.Equal("/subscriptions/12345/resourceGroups/foo/providers/Microsoft.Web/Sites/site1", result.First().Id); + Assert.Equal("/subscriptions/12345/resourceGroups/foo/providers/Microsoft.Web/Sites/site1", result.First().Id); + Assert.True(result.First().Properties.ToString().Contains("Dedicated")); + Assert.Equal("Running", (result.First().Properties as JObject)["provisioningState"]); } [Fact] @@ -210,12 +210,12 @@ public void ResourceListForResourceGroupValidateMessage() Assert.NotNull(handler.RequestHeaders.GetValues("Authorization")); // Validate result - Assert.Equal(2, result.Value.Count()); - Assert.Equal("South Central US", result.Value[0].Location); - Assert.Equal("site1", result.Value[0].Name); - Assert.Equal("/subscriptions/12345/resourceGroups/foo/providers/Microsoft.Web/Sites/site1", result.Value[0].Id); - Assert.Equal("/subscriptions/12345/resourceGroups/foo/providers/Microsoft.Web/Sites/site1", result.Value[0].Id); - Assert.Null(result.Value[0].Properties); + Assert.Equal(2, result.Count()); + Assert.Equal("South Central US", result.First().Location); + Assert.Equal("site1", result.First().Name); + Assert.Equal("/subscriptions/12345/resourceGroups/foo/providers/Microsoft.Web/Sites/site1", result.First().Id); + Assert.Equal("/subscriptions/12345/resourceGroups/foo/providers/Microsoft.Web/Sites/site1", result.First().Id); + Assert.Null(result.First().Properties); } [Fact] @@ -446,7 +446,7 @@ public void UriSupportsBaseUriWithPathTest() var handler = new RecordedDelegatingHandler(response) { StatusCodeToReturn = HttpStatusCode.NotFound }; handler.IsPassThrough = false; var randomValue = Guid.NewGuid().ToString(); - var token = new TokenCloudCredentials(randomValue, "abc123"); + var token = new TokenCredentials(randomValue, "abc123"); var client = new ResourceManagementClient(new Uri("https://localhost:123/test/"), token, handler); client.SubscriptionId = randomValue; var identity = new ResourceIdentity @@ -531,12 +531,12 @@ public void ResourcesMoveTest() var resourceToMove = new ResourcesMoveInfo(); resourceToMove.Resources = new List(); - resourceToMove.TargetResourceGroup = "/subscriptions/" + Uri.EscapeDataString(client.Credentials.SubscriptionId) + "/resourceGroups/resourceGroup1"; + resourceToMove.TargetResourceGroup = "/subscriptions/" + Uri.EscapeDataString(client.SubscriptionId) + "/resourceGroups/resourceGroup1"; - var resource1 = "/subscriptions/" + Uri.EscapeDataString(client.Credentials.SubscriptionId) + "/resourceGroups/resourceGroup0/providers/Microsoft.Web/website/website1"; + var resource1 = "/subscriptions/" + Uri.EscapeDataString(client.SubscriptionId) + "/resourceGroups/resourceGroup0/providers/Microsoft.Web/website/website1"; resourceToMove.Resources.Add(resource1); - var resource2 = "/subscriptions/" + Uri.EscapeDataString(client.Credentials.SubscriptionId) + "/resourceGroups/resourceGroup0/providers/Microsoft.Compute/hostservice/vm1"; + var resource2 = "/subscriptions/" + Uri.EscapeDataString(client.SubscriptionId) + "/resourceGroups/resourceGroup0/providers/Microsoft.Compute/hostservice/vm1"; resourceToMove.Resources.Add(resource2); client.Resources.MoveResources("resourceGroup0", resourceToMove); @@ -547,7 +547,7 @@ public void ResourcesMoveTest() //Valid payload //Construct expected URL - string expectedUrl = "/subscriptions/" + Uri.EscapeDataString(client.Credentials.SubscriptionId) + "/resourceGroups/resourceGroup0/moveResources?"; + string expectedUrl = "/subscriptions/" + Uri.EscapeDataString(client.SubscriptionId) + "/resourceGroups/resourceGroup0/moveResources?"; expectedUrl = expectedUrl + "api-version=2014-04-01-preview"; string baseUrl = client.BaseUri.AbsoluteUri; // Trim '/' character from the end of baseUrl and beginning of url. diff --git a/src/ResourceManagement/Resource/Resources.Tests/Resources.Tests.csproj b/src/ResourceManagement/Resource/Resources.Tests/Resources.Tests.csproj index 6bc02ec8fe9c8..b5142b3a8e8b6 100644 --- a/src/ResourceManagement/Resource/Resources.Tests/Resources.Tests.csproj +++ b/src/ResourceManagement/Resource/Resources.Tests/Resources.Tests.csproj @@ -153,20 +153,32 @@ + + + + + $(LibraryNugetPackageFolder)\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll + + + $(LibraryNugetPackageFolder)\Microsoft.Rest.ClientRuntime.1.1.0\lib\net45\Microsoft.Rest.ClientRuntime.dll + + + $(LibraryNugetPackageFolder)\Microsoft.Rest.ClientRuntime.Azure.1.0.13\lib\net45\Microsoft.Rest.ClientRuntime.Azure.dll + - ..\..\..\..\packages\Microsoft.Azure.Test.Framework.2.0.5658.29898-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll + $(LibraryNugetPackageFolder)\Microsoft.Azure.Test.Framework.2.0.5658.29898-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll True - ..\..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.2.0.5658.29898-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll + $(LibraryNugetPackageFolder)\Microsoft.Azure.Test.HttpRecorder.2.0.5658.29898-prerelease\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll True - ..\..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.14.201151115\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll + $(LibraryNugetPackageFolder)\Microsoft.IdentityModel.Clients.ActiveDirectory.2.14.201151115\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll True - ..\..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.14.201151115\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll + $(LibraryNugetPackageFolder)\Microsoft.IdentityModel.Clients.ActiveDirectory.2.14.201151115\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll True diff --git a/src/ResourceManagement/Resource/Resources.Tests/ScenarioTests/DeploymentTests.ScenarioTests.cs b/src/ResourceManagement/Resource/Resources.Tests/ScenarioTests/DeploymentTests.ScenarioTests.cs index f363e6eaa59d3..1ccd64a0bcfc2 100644 --- a/src/ResourceManagement/Resource/Resources.Tests/ScenarioTests/DeploymentTests.ScenarioTests.cs +++ b/src/ResourceManagement/Resource/Resources.Tests/ScenarioTests/DeploymentTests.ScenarioTests.cs @@ -13,18 +13,16 @@ // limitations under the License. // +using System.Collections.Generic; using System.IO; +using System.Linq; +using System.Net; +using System.Runtime.Serialization.Formatters; using Microsoft.Azure.Management.Resources; using Microsoft.Azure.Management.Resources.Models; using Microsoft.Azure.Test; using Newtonsoft.Json; using Newtonsoft.Json.Linq; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Net; -using System.Runtime.Serialization.Formatters; -using System.Threading; using Xunit; namespace ResourceGroups.Tests @@ -131,17 +129,17 @@ public void CreateDeploymentAndValidateProperties() var deploymentListResult = client.Deployments.List(groupName, null); var deploymentGetResult = client.Deployments.Get(groupName, deploymentName); - Assert.NotEmpty(deploymentListResult.Value); + Assert.NotEmpty(deploymentListResult); Assert.Equal(deploymentName, deploymentGetResult.Name); - Assert.Equal(deploymentName, deploymentListResult.Value[0].Name); + Assert.Equal(deploymentName, deploymentListResult.First().Name); Assert.Equal(GoodWebsiteTemplateUri, deploymentGetResult.Properties.TemplateLink.Uri); - Assert.Equal(GoodWebsiteTemplateUri, deploymentListResult.Value[0].Properties.TemplateLink.Uri); + Assert.Equal(GoodWebsiteTemplateUri, deploymentListResult.First().Properties.TemplateLink.Uri); Assert.NotNull(deploymentGetResult.Properties.ProvisioningState); - Assert.NotNull(deploymentListResult.Value[0].Properties.ProvisioningState); + Assert.NotNull(deploymentListResult.First().Properties.ProvisioningState); Assert.NotNull(deploymentGetResult.Properties.CorrelationId); - Assert.NotNull(deploymentListResult.Value[0].Properties.CorrelationId); + Assert.NotNull(deploymentListResult.First().Properties.CorrelationId); Assert.True(deploymentGetResult.Properties.Parameters.ToString().Contains("mctest0101")); - Assert.True(deploymentListResult.Value[0].Properties.Parameters.ToString().Contains("mctest0101")); + Assert.True(deploymentListResult.First().Properties.Parameters.ToString().Contains("mctest0101")); } } @@ -307,10 +305,10 @@ public void CreateDummyDeploymentProducesOperations() TestUtilities.Wait(30000); var operations = client.DeploymentOperations.List(groupName, deploymentName, null); - Assert.True(operations.Value.Any()); - Assert.NotNull(operations.Value[0].Id); - Assert.NotNull(operations.Value[0].OperationId); - Assert.NotNull(operations.Value[0].Properties); + Assert.True(operations.Any()); + Assert.NotNull(operations.First().Id); + Assert.NotNull(operations.First().OperationId); + Assert.NotNull(operations.First().Properties); } } @@ -344,23 +342,23 @@ public void ListDeploymentsWorksWithFilter() client.Deployments.CreateOrUpdate(groupName, deploymentName, parameters); var deploymentListResult = client.Deployments.List(groupName, d => d.ProvisioningState == "Running"); - if (null == deploymentListResult.Value || deploymentListResult.Value.Count < 1) + if (null == deploymentListResult|| deploymentListResult.Count() == 0) { deploymentListResult = client.Deployments.List(groupName, d => d.ProvisioningState == "Accepted"); } var deploymentGetResult = client.Deployments.Get(groupName, deploymentName); - Assert.NotEmpty(deploymentListResult.Value); + Assert.NotEmpty(deploymentListResult); Assert.Equal(deploymentName, deploymentGetResult.Name); - Assert.Equal(deploymentName, deploymentListResult.Value[0].Name); + Assert.Equal(deploymentName, deploymentListResult.First().Name); Assert.Equal(GoodWebsiteTemplateUri, deploymentGetResult.Properties.TemplateLink.Uri); - Assert.Equal(GoodWebsiteTemplateUri, deploymentListResult.Value[0].Properties.TemplateLink.Uri); + Assert.Equal(GoodWebsiteTemplateUri, deploymentListResult.First().Properties.TemplateLink.Uri); Assert.NotNull(deploymentGetResult.Properties.ProvisioningState); - Assert.NotNull(deploymentListResult.Value[0].Properties.ProvisioningState); + Assert.NotNull(deploymentListResult.First().Properties.ProvisioningState); Assert.NotNull(deploymentGetResult.Properties.CorrelationId); - Assert.NotNull(deploymentListResult.Value[0].Properties.CorrelationId); + Assert.NotNull(deploymentListResult.First().Properties.CorrelationId); Assert.True(deploymentGetResult.Properties.Parameters.ToString().Contains("mctest0101")); - Assert.True(deploymentListResult.Value[0].Properties.Parameters.ToString().Contains("mctest0101")); + Assert.True(deploymentListResult.First().Properties.Parameters.ToString().Contains("mctest0101")); } } @@ -399,7 +397,7 @@ public void CreateLargeWebDeploymentTemplateWorks() TestUtilities.Wait(30000); var operations = client.DeploymentOperations.List(groupName, deploymentName, null); - Assert.True(operations.Value.Any()); + Assert.True(operations.Any()); } } } diff --git a/src/ResourceManagement/Resource/Resources.Tests/ScenarioTests/ProviderTests.ScenarioTests.cs b/src/ResourceManagement/Resource/Resources.Tests/ScenarioTests/ProviderTests.ScenarioTests.cs index 15fdbde8f77c4..0d3782feda7eb 100644 --- a/src/ResourceManagement/Resource/Resources.Tests/ScenarioTests/ProviderTests.ScenarioTests.cs +++ b/src/ResourceManagement/Resource/Resources.Tests/ScenarioTests/ProviderTests.ScenarioTests.cs @@ -16,14 +16,13 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Net; +using System.Net.Http; using Microsoft.Azure; using Microsoft.Azure.Management.Resources; using Microsoft.Azure.Management.Resources.Models; -using Xunit; -using System.Net.Http; -using System.Net; using Microsoft.Azure.Test; -using System.Threading; +using Xunit; namespace ResourceGroups.Tests { @@ -83,9 +82,9 @@ public void ProviderListValidateMessage() Assert.NotNull(handler.RequestHeaders.GetValues("Authorization")); // Validate result - Assert.True(result.Value.Any()); + Assert.True(result.Any()); var websiteProvider = - result.Value.First( + result.First( p => p.NamespaceProperty.Equals(ProviderName, StringComparison.InvariantCultureIgnoreCase)); Assert.Equal(ProviderName, websiteProvider.NamespaceProperty); Assert.True("Registered" == websiteProvider.RegistrationState || @@ -178,8 +177,8 @@ public void ProviderOperationsList() Assert.NotNull(operations); Assert.NotEmpty(operations.Value); - Assert.NotEmpty(operations.Value[0].Name); - Assert.NotNull(operations.Value[0].Display); + Assert.NotEmpty(operations.Value.First().Name); + Assert.NotNull(operations.Value.First().Display); IEnumerable definitions = operations.Value.Where(op => string.Equals(op.Name, "Microsoft.Insights/AlertRules/Write", StringComparison.InvariantCultureIgnoreCase)); Assert.NotNull(definitions); diff --git a/src/ResourceManagement/Resource/Resources.Tests/ScenarioTests/ResourceGroupTests.ScenarioTests.cs b/src/ResourceManagement/Resource/Resources.Tests/ScenarioTests/ResourceGroupTests.ScenarioTests.cs index 4be9fbc6a5bef..425bf50ce518f 100644 --- a/src/ResourceManagement/Resource/Resources.Tests/ScenarioTests/ResourceGroupTests.ScenarioTests.cs +++ b/src/ResourceManagement/Resource/Resources.Tests/ScenarioTests/ResourceGroupTests.ScenarioTests.cs @@ -21,9 +21,9 @@ using Microsoft.Azure.Management.Resources; using Microsoft.Azure.Management.Resources.Models; using Microsoft.Azure.Test; +using Microsoft.Azure.Test.HttpRecorder; using Microsoft.Rest.TransientFaultHandling; using Xunit; -using Microsoft.Azure.Test.HttpRecorder; namespace ResourceGroups.Tests { @@ -73,7 +73,7 @@ public void DeleteResourceGroupRemovesGroupResources() Assert.Throws(() => client.ResourceGroups.ListResources(resourceGroupName)); - Assert.False(listGroupsResult.Value.Any(rg => rg.Name == resourceGroupName)); + Assert.False(listGroupsResult.Any(rg => rg.Name == resourceGroupName)); TestUtilities.EndTest(); } @@ -92,7 +92,7 @@ public void CanCreateResourceGroup() Tags = new Dictionary() { { "department", "finance" }, { "tagname", "tagvalue" } }, }); var listResult = client.ResourceGroups.List(); - var listedGroup = listResult.Value.FirstOrDefault((g) => string.Equals(g.Name, groupName, StringComparison.Ordinal)); + var listedGroup = listResult.FirstOrDefault((g) => string.Equals(g.Name, groupName, StringComparison.Ordinal)); Assert.NotNull(listedGroup); Assert.Equal("finance", listedGroup.Tags["department"]); Assert.Equal("tagvalue", listedGroup.Tags["tagname"]); @@ -145,7 +145,7 @@ public void DeleteResourceGroupRemovesGroup() var listResult = client.ResourceGroups.List(null); Assert.Equal(HttpStatusCode.OK, deleteResult.Response.StatusCode); - Assert.False(listResult.Value.Any(rg => rg.Name == resourceGroupName && rg.Properties.ProvisioningState != "Deleting")); + Assert.False(listResult.Any(rg => rg.Name == resourceGroupName && rg.Properties.ProvisioningState != "Deleting")); TestUtilities.EndTest(); } } diff --git a/src/ResourceManagement/Resource/Resources.Tests/ScenarioTests/ResourceTests.ScenarioTests.cs b/src/ResourceManagement/Resource/Resources.Tests/ScenarioTests/ResourceTests.ScenarioTests.cs index 6df9d251f2fa8..36e148493e7d4 100644 --- a/src/ResourceManagement/Resource/Resources.Tests/ScenarioTests/ResourceTests.ScenarioTests.cs +++ b/src/ResourceManagement/Resource/Resources.Tests/ScenarioTests/ResourceTests.ScenarioTests.cs @@ -15,6 +15,7 @@ using System.Collections.Generic; using System.Net; +using System.Linq; using Microsoft.Azure; using Microsoft.Azure.Management.Resources; using Microsoft.Azure.Management.Resources.Models; @@ -68,10 +69,10 @@ public void CleanupAllResources() client.SetRetryPolicy(new RetryPolicy(1)); var groups = client.ResourceGroups.List(); - foreach (var group in groups.Value) + foreach (var group in groups) { var resources = client.ResourceGroups.ListResources(group.Name, r => r.ResourceType == "Microsoft.Web/sites"); - foreach (var resource in resources.Value) + foreach (var resource in resources) { client.Resources.Delete(group.Name, CreateResourceIdentity(resource).ResourceProviderNamespace, @@ -169,19 +170,19 @@ public void CreatedResourceIsAvailableInList() var listResult = client.ResourceGroups.ListResources(groupName); - Assert.Equal(1, listResult.Value.Count); - Assert.Equal(resourceName, listResult.Value[0].Name); - Assert.Equal("Microsoft.Web/sites", listResult.Value[0].Type); - Assert.True(ResourcesManagementTestUtilities.LocationsAreEqual(websiteLocation, listResult.Value[0].Location), - string.Format("Resource list location for website '{0}' does not match expected location '{1}'", listResult.Value[0].Location, websiteLocation)); + Assert.Equal(1, listResult.Count()); + Assert.Equal(resourceName, listResult.First().Name); + Assert.Equal("Microsoft.Web/sites", listResult.First().Type); + Assert.True(ResourcesManagementTestUtilities.LocationsAreEqual(websiteLocation, listResult.First().Location), + string.Format("Resource list location for website '{0}' does not match expected location '{1}'", listResult.First().Location, websiteLocation)); listResult = client.ResourceGroups.ListResources(groupName, top: 10); - Assert.Equal(1, listResult.Value.Count); - Assert.Equal(resourceName, listResult.Value[0].Name); - Assert.Equal("Microsoft.Web/sites", listResult.Value[0].Type); - Assert.True(ResourcesManagementTestUtilities.LocationsAreEqual(websiteLocation, listResult.Value[0].Location), - string.Format("Resource list location for website '{0}' does not match expected location '{1}'", listResult.Value[0].Location, websiteLocation)); + Assert.Equal(1, listResult.Count()); + Assert.Equal(resourceName, listResult.First().Name); + Assert.Equal("Microsoft.Web/sites", listResult.First().Type); + Assert.True(ResourcesManagementTestUtilities.LocationsAreEqual(websiteLocation, listResult.First().Location), + string.Format("Resource list location for website '{0}' does not match expected location '{1}'", listResult.First().Location, websiteLocation)); } } @@ -232,8 +233,8 @@ public void CreatedResourceIsAvailableInListFilteredByTagName() var listResult = client.ResourceGroups.ListResources(groupName, r => r.Tagname == tagName); - Assert.Equal(1, listResult.Value.Count); - Assert.Equal(resourceName, listResult.Value[0].Name); + Assert.Equal(1, listResult.Count()); + Assert.Equal(resourceName, listResult.First().Name); var getResult = client.Resources.Get( groupName, @@ -299,8 +300,8 @@ public void CreatedResourceIsAvailableInListFilteredByTagNameAndValue() var listResult = client.ResourceGroups.ListResources(groupName, r => r.Tagname == tagName && r.Tagvalue == tagValue); - Assert.Equal(1, listResult.Value.Count); - Assert.Equal(resourceName, listResult.Value[0].Name); + Assert.Equal(1, listResult.Count()); + Assert.Equal(resourceName, listResult.First().Name); var getResult = client.Resources.Get( groupName, @@ -346,7 +347,7 @@ public void CreatedAndDeleteResource() var listResult = client.ResourceGroups.ListResources(groupName); - Assert.Equal(resourceName, listResult.Value[0].Name); + Assert.Equal(resourceName, listResult.First().Name); client.Resources.Delete( groupName, @@ -388,8 +389,8 @@ public void CreatedAndListResource() var listResult = client.Resources.List(r => r.ResourceType == "Microsoft.Web/sites"); - Assert.NotEmpty(listResult.Value); - Assert.Equal(2, listResult.Value[0].Tags.Count); + Assert.NotEmpty(listResult); + Assert.Equal(2, listResult.First().Tags.Count); } } } diff --git a/src/ResourceManagement/Resource/Resources.Tests/ScenarioTests/SubscriptionTests.ScenarioTests.cs b/src/ResourceManagement/Resource/Resources.Tests/ScenarioTests/SubscriptionTests.ScenarioTests.cs index 4b18a441849b3..bac42adaa94f9 100644 --- a/src/ResourceManagement/Resource/Resources.Tests/ScenarioTests/SubscriptionTests.ScenarioTests.cs +++ b/src/ResourceManagement/Resource/Resources.Tests/ScenarioTests/SubscriptionTests.ScenarioTests.cs @@ -13,11 +13,12 @@ // limitations under the License. // +using System.Linq; +using System.Net; using Microsoft.Azure.Management.Resources; using Microsoft.Azure.Subscriptions; -using Microsoft.Azure.Test.HttpRecorder; using Microsoft.Azure.Test; -using System.Net; +using Microsoft.Azure.Test.HttpRecorder; using Microsoft.Rest.TransientFaultHandling; using Xunit; @@ -63,11 +64,11 @@ public void ListSubscriptions() var subscriptions = client.Subscriptions.List(); Assert.NotNull(subscriptions); - Assert.NotEqual(0, subscriptions.Value.Count); - Assert.NotNull(subscriptions.Value[0].Id); - Assert.NotNull(subscriptions.Value[0].SubscriptionId); - Assert.NotNull(subscriptions.Value[0].DisplayName); - Assert.NotNull(subscriptions.Value[0].State); + Assert.NotEqual(0, subscriptions.Count()); + Assert.NotNull(subscriptions.First().Id); + Assert.NotNull(subscriptions.First().SubscriptionId); + Assert.NotNull(subscriptions.First().DisplayName); + Assert.NotNull(subscriptions.First().State); } } @@ -83,7 +84,7 @@ public void GetSubscriptionDetails() var rmclient = GetResourceManagementClient(handler); client.SetRetryPolicy(new RetryPolicy(1)); - var subscriptionDetails = client.Subscriptions.Get(rmclient.Credentials.SubscriptionId); + var subscriptionDetails = client.Subscriptions.Get(rmclient.SubscriptionId); Assert.NotNull(subscriptionDetails); Assert.NotNull(subscriptionDetails.Id); diff --git a/src/ResourceManagement/Resource/Resources.Tests/ScenarioTests/TagTests.ScenarioTests.cs b/src/ResourceManagement/Resource/Resources.Tests/ScenarioTests/TagTests.ScenarioTests.cs index c217e25b0d6c9..77012e5ab0bf4 100644 --- a/src/ResourceManagement/Resource/Resources.Tests/ScenarioTests/TagTests.ScenarioTests.cs +++ b/src/ResourceManagement/Resource/Resources.Tests/ScenarioTests/TagTests.ScenarioTests.cs @@ -13,12 +13,13 @@ // limitations under the License. // +using System.Linq; using System.Net; using Microsoft.Azure; using Microsoft.Azure.Management.Resources; using Microsoft.Azure.Test; -using Xunit; using Microsoft.Azure.Test.HttpRecorder; +using Xunit; namespace ResourceGroups.Tests { @@ -55,7 +56,7 @@ public void CreateListAndDeleteSubscriptionTag() Assert.Equal(tagName, createResult.TagName); var listResult = client.Tags.List(); - Assert.True(listResult.Value.Count > 0); + Assert.True(listResult.Count() > 0); client.Tags.Delete(tagName); } @@ -81,7 +82,7 @@ public void CreateListAndDeleteSubscriptionTagValue() Assert.Equal(tagValue, createValueResult.TagValueProperty); var listResult = client.Tags.List(); - Assert.True(listResult.Value.Count > 0); + Assert.True(listResult.Count() > 0); client.Tags.DeleteValue(tagName, tagValue); client.Tags.Delete(tagName); diff --git a/src/ResourceManagement/Resource/Resources.Tests/ScenarioTests/TenantTests.ScenarioTests.cs b/src/ResourceManagement/Resource/Resources.Tests/ScenarioTests/TenantTests.ScenarioTests.cs index 53f836e843f48..49d29e4ab1db8 100644 --- a/src/ResourceManagement/Resource/Resources.Tests/ScenarioTests/TenantTests.ScenarioTests.cs +++ b/src/ResourceManagement/Resource/Resources.Tests/ScenarioTests/TenantTests.ScenarioTests.cs @@ -13,10 +13,11 @@ // limitations under the License. // +using System.Linq; +using System.Net; using Microsoft.Azure.Subscriptions; -using Microsoft.Azure.Test.HttpRecorder; using Microsoft.Azure.Test; -using System.Net; +using Microsoft.Azure.Test.HttpRecorder; using Microsoft.Rest.TransientFaultHandling; using Xunit; @@ -54,9 +55,9 @@ public void ListTenants() Assert.NotNull(tenants); Assert.Equal(HttpStatusCode.OK, tenants.Response.StatusCode); Assert.NotNull(tenants.Body); - Assert.NotEqual(0, tenants.Body.Value.Count); - Assert.NotNull(tenants.Body.Value[0].Id); - Assert.NotNull(tenants.Body.Value[0].TenantId); + Assert.NotEqual(0, tenants.Body.Count()); + Assert.NotNull(tenants.Body.First().Id); + Assert.NotNull(tenants.Body.First().TenantId); } } } diff --git a/src/ResourceManagement/Storage/Storage.Tests/Helpers/StorageManagementTestUtilities.cs b/src/ResourceManagement/Storage/Storage.Tests/Helpers/StorageManagementTestUtilities.cs index 3252fcbf29508..ea7118221b079 100644 --- a/src/ResourceManagement/Storage/Storage.Tests/Helpers/StorageManagementTestUtilities.cs +++ b/src/ResourceManagement/Storage/Storage.Tests/Helpers/StorageManagementTestUtilities.cs @@ -19,6 +19,7 @@ using Microsoft.Azure.Management.Storage; using Microsoft.Azure.Management.Storage.Models; using Microsoft.Azure.Test; +using Microsoft.Rest; using ResourceGroups.Tests; using System; using System.Collections.Generic; @@ -33,7 +34,7 @@ namespace Storage.Tests.Helpers public static class StorageManagementTestUtilities { public static bool IsTestTenant = false; - private static SubscriptionCloudCredentials Creds = null; + private static TokenCredentials Creds = null; private static Uri testUri = null; // These are used to create default accounts @@ -82,7 +83,7 @@ public static StorageManagementClient GetStorageManagementClient(RecordedDelegat return storageClient; } - private static SubscriptionCloudCredentials GetCreds() + private static TokenCredentials GetCreds() { return Creds; } diff --git a/src/ResourceManagement/Storage/Storage.Tests/Storage.Tests.csproj b/src/ResourceManagement/Storage/Storage.Tests/Storage.Tests.csproj index 682104d02e7a5..7bf8705c0581a 100644 --- a/src/ResourceManagement/Storage/Storage.Tests/Storage.Tests.csproj +++ b/src/ResourceManagement/Storage/Storage.Tests/Storage.Tests.csproj @@ -61,6 +61,18 @@ + + + + + $(LibraryNugetPackageFolder)\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll + + + $(LibraryNugetPackageFolder)\Microsoft.Rest.ClientRuntime.1.1.0\lib\net45\Microsoft.Rest.ClientRuntime.dll + + + $(LibraryNugetPackageFolder)\Microsoft.Rest.ClientRuntime.Azure.1.0.13\lib\net45\Microsoft.Rest.ClientRuntime.Azure.dll + ..\..\..\..\packages\Microsoft.Azure.Test.Framework.2.0.5658.29898-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll True diff --git a/src/ResourceManagement/Storage/Storage.Tests/Tests/StorageAccountTests.cs b/src/ResourceManagement/Storage/Storage.Tests/Tests/StorageAccountTests.cs index c682fe796821d..787e9c6a6ed75 100644 --- a/src/ResourceManagement/Storage/Storage.Tests/Tests/StorageAccountTests.cs +++ b/src/ResourceManagement/Storage/Storage.Tests/Tests/StorageAccountTests.cs @@ -13,16 +13,16 @@ // limitations under the License. // +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; using Microsoft.Azure; using Microsoft.Azure.Management.Storage; using Microsoft.Azure.Management.Storage.Models; using Microsoft.Azure.Test; using ResourceGroups.Tests; using Storage.Tests.Helpers; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Net; using Xunit; namespace Storage.Tests @@ -174,17 +174,17 @@ public void StorageAccountListByResourceGroupTest() var rgname = StorageManagementTestUtilities.CreateResourceGroup(resourcesClient); var listAccountsRequest = storageMgmtClient.StorageAccounts.ListByResourceGroup(rgname); - Assert.Empty(listAccountsRequest.Value); + Assert.Empty(listAccountsRequest); // Create storage accounts string accountName1 = StorageManagementTestUtilities.CreateStorageAccount(storageMgmtClient, rgname); string accountName2 = StorageManagementTestUtilities.CreateStorageAccount(storageMgmtClient, rgname); listAccountsRequest = storageMgmtClient.StorageAccounts.ListByResourceGroup(rgname); - Assert.Equal(2, listAccountsRequest.Value.Count); + Assert.Equal(2, listAccountsRequest.Count()); - StorageManagementTestUtilities.VerifyAccountProperties(listAccountsRequest.Value[0], true); - StorageManagementTestUtilities.VerifyAccountProperties(listAccountsRequest.Value[1], true); + StorageManagementTestUtilities.VerifyAccountProperties(listAccountsRequest.First(), true); + StorageManagementTestUtilities.VerifyAccountProperties(listAccountsRequest.ToArray()[1], true); } } @@ -211,11 +211,11 @@ public void StorageAccountListBySubscriptionTest() var listAccountsRequest = storageMgmtClient.StorageAccounts.List(); - StorageAccount account1 = listAccountsRequest.Value.First( + StorageAccount account1 = listAccountsRequest.First( t => StringComparer.OrdinalIgnoreCase.Equals(t.Name, accountName1)); StorageManagementTestUtilities.VerifyAccountProperties(account1, true); - StorageAccount account2 = listAccountsRequest.Value.First( + StorageAccount account2 = listAccountsRequest.First( t => StringComparer.OrdinalIgnoreCase.Equals(t.Name, accountName2)); StorageManagementTestUtilities.VerifyAccountProperties(account2, true); } diff --git a/src/ResourceManagement/Storage/StorageManagement/Generated/IStorageAccountsOperations.cs b/src/ResourceManagement/Storage/StorageManagement/Generated/IStorageAccountsOperations.cs index b0ebb684c5c43..2e122da5f6e2f 100644 --- a/src/ResourceManagement/Storage/StorageManagement/Generated/IStorageAccountsOperations.cs +++ b/src/ResourceManagement/Storage/StorageManagement/Generated/IStorageAccountsOperations.cs @@ -6,6 +6,7 @@ namespace Microsoft.Azure.Management.Storage using System.Threading; using System.Threading.Tasks; using Microsoft.Rest; + using System.Linq; using Microsoft.Azure; using Models; @@ -22,10 +23,10 @@ public partial interface IStorageAccountsOperations /// in length and use numbers and lower-case letters only. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> CheckNameAvailabilityWithHttpMessagesAsync(StorageAccountCheckNameAvailabilityParameters accountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -47,10 +48,10 @@ public partial interface IStorageAccountsOperations /// The parameters to provide for the created account. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> CreateWithHttpMessagesAsync(string resourceGroupName, string accountName, StorageAccountCreateParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -72,10 +73,10 @@ public partial interface IStorageAccountsOperations /// The parameters to provide for the created account. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> BeginCreateWithHttpMessagesAsync(string resourceGroupName, string accountName, StorageAccountCreateParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -90,10 +91,10 @@ public partial interface IStorageAccountsOperations /// in length and use numbers and lower-case letters only. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task DeleteWithHttpMessagesAsync(string resourceGroupName, string accountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -111,10 +112,10 @@ public partial interface IStorageAccountsOperations /// in length and use numbers and lower-case letters only. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> GetPropertiesWithHttpMessagesAsync(string resourceGroupName, string accountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -142,10 +143,10 @@ public partial interface IStorageAccountsOperations /// property can be changed at a time using this API. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string accountName, StorageAccountUpdateParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -158,10 +159,10 @@ public partial interface IStorageAccountsOperations /// The name of the storage account. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> ListKeysWithHttpMessagesAsync(string resourceGroupName, string accountName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -170,12 +171,12 @@ public partial interface IStorageAccountsOperations /// operation for this. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Lists all the storage accounts available under the given resource /// group. Note that storage keys are not returned; use the ListKeys @@ -185,12 +186,12 @@ public partial interface IStorageAccountsOperations /// The name of the resource group within the user’s subscription. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Regenerates the access keys for the specified storage account. /// @@ -206,10 +207,10 @@ public partial interface IStorageAccountsOperations /// Specifies name of the key which should be regenerated. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// Task> RegenerateKeyWithHttpMessagesAsync(string resourceGroupName, string accountName, StorageAccountRegenerateKeyParameters regenerateKey, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// @@ -217,30 +218,30 @@ public partial interface IStorageAccountsOperations /// Note that storage keys are not returned; use the ListKeys /// operation for this. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Lists all the storage accounts available under the given resource /// group. Note that storage keys are not returned; use the ListKeys /// operation for this. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// - Task> ListByResourceGroupNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/src/ResourceManagement/Storage/StorageManagement/Generated/IStorageManagementClient.cs b/src/ResourceManagement/Storage/StorageManagement/Generated/IStorageManagementClient.cs index 2a6b6a6829990..c0591eb49bad8 100644 --- a/src/ResourceManagement/Storage/StorageManagement/Generated/IStorageManagementClient.cs +++ b/src/ResourceManagement/Storage/StorageManagement/Generated/IStorageManagementClient.cs @@ -7,6 +7,7 @@ namespace Microsoft.Azure.Management.Storage using System.Threading.Tasks; using Newtonsoft.Json; using Microsoft.Rest; + using System.Linq; using Microsoft.Azure; using Models; @@ -30,10 +31,9 @@ public partial interface IStorageManagementClient JsonSerializerSettings DeserializationSettings { get; } /// - /// Subscription credentials which uniquely identify Microsoft Azure - /// subscription. + /// Management credentials for Azure. /// - SubscriptionCloudCredentials Credentials { get; } + ServiceClientCredentials Credentials { get; } /// /// Gets subscription credentials which uniquely identify Microsoft diff --git a/src/ResourceManagement/Storage/StorageManagement/Generated/Models/AccountStatus.cs b/src/ResourceManagement/Storage/StorageManagement/Generated/Models/AccountStatus.cs index e8b08a270f696..581ce409de768 100644 --- a/src/ResourceManagement/Storage/StorageManagement/Generated/Models/AccountStatus.cs +++ b/src/ResourceManagement/Storage/StorageManagement/Generated/Models/AccountStatus.cs @@ -5,7 +5,7 @@ namespace Microsoft.Azure.Management.Storage.Models using System.Runtime.Serialization; /// - /// Defines values for AccountStatus + /// Defines values for AccountStatus. /// [JsonConverter(typeof(StringEnumConverter))] public enum AccountStatus diff --git a/src/ResourceManagement/Storage/StorageManagement/Generated/Models/AccountType.cs b/src/ResourceManagement/Storage/StorageManagement/Generated/Models/AccountType.cs index 5c398b0d514e2..442f383c5ce6a 100644 --- a/src/ResourceManagement/Storage/StorageManagement/Generated/Models/AccountType.cs +++ b/src/ResourceManagement/Storage/StorageManagement/Generated/Models/AccountType.cs @@ -5,7 +5,7 @@ namespace Microsoft.Azure.Management.Storage.Models using System.Runtime.Serialization; /// - /// Defines values for AccountType + /// Defines values for AccountType. /// [JsonConverter(typeof(StringEnumConverter))] public enum AccountType diff --git a/src/ResourceManagement/Storage/StorageManagement/Generated/Models/KeyName.cs b/src/ResourceManagement/Storage/StorageManagement/Generated/Models/KeyName.cs index 457201db1aef5..7b679e830c81e 100644 --- a/src/ResourceManagement/Storage/StorageManagement/Generated/Models/KeyName.cs +++ b/src/ResourceManagement/Storage/StorageManagement/Generated/Models/KeyName.cs @@ -5,7 +5,7 @@ namespace Microsoft.Azure.Management.Storage.Models using System.Runtime.Serialization; /// - /// Defines values for KeyName + /// Defines values for KeyName. /// [JsonConverter(typeof(StringEnumConverter))] public enum KeyName diff --git a/src/ResourceManagement/Storage/StorageManagement/Generated/Models/ProvisioningState.cs b/src/ResourceManagement/Storage/StorageManagement/Generated/Models/ProvisioningState.cs index 729ffc3c67bea..71d692176f2ea 100644 --- a/src/ResourceManagement/Storage/StorageManagement/Generated/Models/ProvisioningState.cs +++ b/src/ResourceManagement/Storage/StorageManagement/Generated/Models/ProvisioningState.cs @@ -5,7 +5,7 @@ namespace Microsoft.Azure.Management.Storage.Models using System.Runtime.Serialization; /// - /// Defines values for ProvisioningState + /// Defines values for ProvisioningState. /// [JsonConverter(typeof(StringEnumConverter))] public enum ProvisioningState diff --git a/src/ResourceManagement/Storage/StorageManagement/Generated/Models/Reason.cs b/src/ResourceManagement/Storage/StorageManagement/Generated/Models/Reason.cs index a782ab14e9e68..ab9b38b2aab52 100644 --- a/src/ResourceManagement/Storage/StorageManagement/Generated/Models/Reason.cs +++ b/src/ResourceManagement/Storage/StorageManagement/Generated/Models/Reason.cs @@ -5,7 +5,7 @@ namespace Microsoft.Azure.Management.Storage.Models using System.Runtime.Serialization; /// - /// Defines values for Reason + /// Defines values for Reason. /// [JsonConverter(typeof(StringEnumConverter))] public enum Reason diff --git a/src/ResourceManagement/Storage/StorageManagement/Generated/StorageAccountsOperations.cs b/src/ResourceManagement/Storage/StorageManagement/Generated/StorageAccountsOperations.cs index faeef78ddfc73..346c1eb722b3a 100644 --- a/src/ResourceManagement/Storage/StorageManagement/Generated/StorageAccountsOperations.cs +++ b/src/ResourceManagement/Storage/StorageManagement/Generated/StorageAccountsOperations.cs @@ -11,6 +11,7 @@ namespace Microsoft.Azure.Management.Storage using System.Threading.Tasks; using Microsoft.Rest; using Newtonsoft.Json; + using System.Linq; using Microsoft.Azure; using Models; @@ -154,6 +155,10 @@ internal StorageAccountsOperations(StorageManagementClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { @@ -186,10 +191,10 @@ internal StorageAccountsOperations(StorageManagementClient client) /// The parameters to provide for the created account. /// /// - /// Headers that will be added to request. + /// The headers that will be added to request. /// /// - /// Cancellation token. + /// The cancellation token. /// public async Task> CreateWithHttpMessagesAsync(string resourceGroupName, string accountName, StorageAccountCreateParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { @@ -349,6 +354,10 @@ internal StorageAccountsOperations(StorageManagementClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { @@ -483,6 +492,10 @@ internal StorageAccountsOperations(StorageManagementClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } if (shouldTrace) { ServiceClientTracing.Exit(invocationId, result); @@ -620,6 +633,10 @@ internal StorageAccountsOperations(StorageManagementClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { @@ -782,6 +799,10 @@ internal StorageAccountsOperations(StorageManagementClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { @@ -921,6 +942,10 @@ internal StorageAccountsOperations(StorageManagementClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { @@ -944,7 +969,7 @@ internal StorageAccountsOperations(StorageManagementClient client) /// /// Cancellation token. /// - public async Task> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (this.Client.ApiVersion == null) { @@ -1040,14 +1065,18 @@ internal StorageAccountsOperations(StorageManagementClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { @@ -1070,7 +1099,7 @@ internal StorageAccountsOperations(StorageManagementClient client) /// /// Cancellation token. /// - public async Task> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -1172,14 +1201,18 @@ internal StorageAccountsOperations(StorageManagementClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { @@ -1328,6 +1361,10 @@ internal StorageAccountsOperations(StorageManagementClient client) var result = new AzureOperationResponse(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { @@ -1345,7 +1382,7 @@ internal StorageAccountsOperations(StorageManagementClient client) /// Lists all the storage accounts available under the subscription. Note that /// storage keys are not returned; use the ListKeys operation for this. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// @@ -1354,11 +1391,11 @@ internal StorageAccountsOperations(StorageManagementClient client) /// /// Cancellation token. /// - public async Task> ListNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (nextLink == null) + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextLink"); + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing bool shouldTrace = ServiceClientTracing.IsEnabled; @@ -1367,13 +1404,13 @@ internal StorageAccountsOperations(StorageManagementClient client) { invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("nextLink", nextLink); + tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(invocationId, this, "ListNext", tracingParameters); } // Construct URL string url = "{nextLink}"; - url = url.Replace("{nextLink}", nextLink); + url = url.Replace("{nextLink}", nextPageLink); List queryParameters = new List(); if (queryParameters.Count > 0) { @@ -1442,14 +1479,18 @@ internal StorageAccountsOperations(StorageManagementClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { @@ -1463,7 +1504,7 @@ internal StorageAccountsOperations(StorageManagementClient client) /// Note that storage keys are not returned; use the ListKeys operation for /// this. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// @@ -1472,11 +1513,11 @@ internal StorageAccountsOperations(StorageManagementClient client) /// /// Cancellation token. /// - public async Task> ListByResourceGroupNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (nextLink == null) + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextLink"); + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing bool shouldTrace = ServiceClientTracing.IsEnabled; @@ -1485,13 +1526,13 @@ internal StorageAccountsOperations(StorageManagementClient client) { invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("nextLink", nextLink); + tracingParameters.Add("nextPageLink", nextPageLink); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(invocationId, this, "ListByResourceGroupNext", tracingParameters); } // Construct URL string url = "{nextLink}"; - url = url.Replace("{nextLink}", nextLink); + url = url.Replace("{nextLink}", nextPageLink); List queryParameters = new List(); if (queryParameters.Count > 0) { @@ -1560,14 +1601,18 @@ internal StorageAccountsOperations(StorageManagementClient client) throw ex; } // Create Result - var result = new AzureOperationResponse(); + var result = new AzureOperationResponse>(); result.Request = httpRequest; result.Response = httpResponse; + if (httpResponse.Headers.Contains("x-ms-request-id")) + { + result.RequestId = httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } // Deserialize Response if (statusCode == (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), "OK")) { string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - result.Body = JsonConvert.DeserializeObject(responseContent, this.Client.DeserializationSettings); + result.Body = JsonConvert.DeserializeObject>(responseContent, this.Client.DeserializationSettings); } if (shouldTrace) { diff --git a/src/ResourceManagement/Storage/StorageManagement/Generated/StorageAccountsOperationsExtensions.cs b/src/ResourceManagement/Storage/StorageManagement/Generated/StorageAccountsOperationsExtensions.cs index 30227d5bbe04a..462c269fb8b96 100644 --- a/src/ResourceManagement/Storage/StorageManagement/Generated/StorageAccountsOperationsExtensions.cs +++ b/src/ResourceManagement/Storage/StorageManagement/Generated/StorageAccountsOperationsExtensions.cs @@ -15,7 +15,7 @@ public static partial class StorageAccountsOperationsExtensions /// Checks that account name is valid and is not in use. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the storage account within the specified resource group. @@ -31,7 +31,7 @@ public static CheckNameAvailabilityResult CheckNameAvailability(this IStorageAcc /// Checks that account name is valid and is not in use. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the storage account within the specified resource group. @@ -55,7 +55,7 @@ public static CheckNameAvailabilityResult CheckNameAvailability(this IStorageAcc /// properties, then HTTP 200 would be returned. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group within the user’s subscription. @@ -81,7 +81,7 @@ public static StorageAccount Create(this IStorageAccountsOperations operations, /// properties, then HTTP 200 would be returned. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group within the user’s subscription. @@ -111,7 +111,7 @@ public static StorageAccount Create(this IStorageAccountsOperations operations, /// properties, then HTTP 200 would be returned. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group within the user’s subscription. @@ -137,7 +137,7 @@ public static StorageAccount BeginCreate(this IStorageAccountsOperations operati /// properties, then HTTP 200 would be returned. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group within the user’s subscription. @@ -163,7 +163,7 @@ public static StorageAccount BeginCreate(this IStorageAccountsOperations operati /// Deletes a storage account in Microsoft Azure. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group within the user’s subscription. @@ -182,7 +182,7 @@ public static void Delete(this IStorageAccountsOperations operations, string res /// Deletes a storage account in Microsoft Azure. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group within the user’s subscription. @@ -206,7 +206,7 @@ public static void Delete(this IStorageAccountsOperations operations, string res /// operation should be used to retrieve storage keys. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group within the user’s subscription. @@ -227,7 +227,7 @@ public static StorageAccount GetProperties(this IStorageAccountsOperations opera /// operation should be used to retrieve storage keys. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group within the user’s subscription. @@ -258,7 +258,7 @@ public static StorageAccount GetProperties(this IStorageAccountsOperations opera /// storage account cannot be changed after creation. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group within the user’s subscription. @@ -289,7 +289,7 @@ public static StorageAccount Update(this IStorageAccountsOperations operations, /// storage account cannot be changed after creation. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group within the user’s subscription. @@ -316,7 +316,7 @@ public static StorageAccount Update(this IStorageAccountsOperations operations, /// Lists the access keys for the specified storage account. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -333,7 +333,7 @@ public static StorageAccountKeys ListKeys(this IStorageAccountsOperations operat /// Lists the access keys for the specified storage account. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group. @@ -355,9 +355,9 @@ public static StorageAccountKeys ListKeys(this IStorageAccountsOperations operat /// storage keys are not returned; use the ListKeys operation for this. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - public static StorageAccountListResult List(this IStorageAccountsOperations operations) + public static Page List(this IStorageAccountsOperations operations) { return Task.Factory.StartNew(s => ((IStorageAccountsOperations)s).ListAsync(), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } @@ -367,14 +367,14 @@ public static StorageAccountListResult List(this IStorageAccountsOperations oper /// storage keys are not returned; use the ListKeys operation for this. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// Cancellation token. /// - public static async Task ListAsync( this IStorageAccountsOperations operations, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListAsync( this IStorageAccountsOperations operations, CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false); return result.Body; } @@ -384,12 +384,12 @@ public static StorageAccountListResult List(this IStorageAccountsOperations oper /// this. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group within the user’s subscription. /// - public static StorageAccountListResult ListByResourceGroup(this IStorageAccountsOperations operations, string resourceGroupName) + public static Page ListByResourceGroup(this IStorageAccountsOperations operations, string resourceGroupName) { return Task.Factory.StartNew(s => ((IStorageAccountsOperations)s).ListByResourceGroupAsync(resourceGroupName), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } @@ -400,7 +400,7 @@ public static StorageAccountListResult ListByResourceGroup(this IStorageAccounts /// this. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group within the user’s subscription. @@ -408,9 +408,9 @@ public static StorageAccountListResult ListByResourceGroup(this IStorageAccounts /// /// Cancellation token. /// - public static async Task ListByResourceGroupAsync( this IStorageAccountsOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListByResourceGroupAsync( this IStorageAccountsOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false); return result.Body; } @@ -418,7 +418,7 @@ public static StorageAccountListResult ListByResourceGroup(this IStorageAccounts /// Regenerates the access keys for the specified storage account. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group within the user’s subscription. @@ -440,7 +440,7 @@ public static StorageAccountKeys RegenerateKey(this IStorageAccountsOperations o /// Regenerates the access keys for the specified storage account. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// /// /// The name of the resource group within the user’s subscription. @@ -467,14 +467,14 @@ public static StorageAccountKeys RegenerateKey(this IStorageAccountsOperations o /// storage keys are not returned; use the ListKeys operation for this. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// - public static StorageAccountListResult ListNext(this IStorageAccountsOperations operations, string nextLink) + public static Page ListNext(this IStorageAccountsOperations operations, string nextPageLink) { - return Task.Factory.StartNew(s => ((IStorageAccountsOperations)s).ListNextAsync(nextLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + return Task.Factory.StartNew(s => ((IStorageAccountsOperations)s).ListNextAsync(nextPageLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } /// @@ -482,17 +482,17 @@ public static StorageAccountListResult ListNext(this IStorageAccountsOperations /// storage keys are not returned; use the ListKeys operation for this. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// /// Cancellation token. /// - public static async Task ListNextAsync( this IStorageAccountsOperations operations, string nextLink, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListNextAsync( this IStorageAccountsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListNextWithHttpMessagesAsync(nextLink, null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false); return result.Body; } @@ -502,14 +502,14 @@ public static StorageAccountListResult ListNext(this IStorageAccountsOperations /// this. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// - public static StorageAccountListResult ListByResourceGroupNext(this IStorageAccountsOperations operations, string nextLink) + public static Page ListByResourceGroupNext(this IStorageAccountsOperations operations, string nextPageLink) { - return Task.Factory.StartNew(s => ((IStorageAccountsOperations)s).ListByResourceGroupNextAsync(nextLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); + return Task.Factory.StartNew(s => ((IStorageAccountsOperations)s).ListByResourceGroupNextAsync(nextPageLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); } /// @@ -518,17 +518,17 @@ public static StorageAccountListResult ListByResourceGroupNext(this IStorageAcco /// this. /// /// - /// The operations group for this extension method + /// The operations group for this extension method. /// - /// + /// /// NextLink from the previous successful call to List operation. /// /// /// Cancellation token. /// - public static async Task ListByResourceGroupNextAsync( this IStorageAccountsOperations operations, string nextLink, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListByResourceGroupNextAsync( this IStorageAccountsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { - AzureOperationResponse result = await operations.ListByResourceGroupNextWithHttpMessagesAsync(nextLink, null, cancellationToken).ConfigureAwait(false); + AzureOperationResponse> result = await operations.ListByResourceGroupNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false); return result.Body; } diff --git a/src/ResourceManagement/Storage/StorageManagement/Generated/StorageManagementClient.cs b/src/ResourceManagement/Storage/StorageManagement/Generated/StorageManagementClient.cs index a624799161723..0274ccac4ccb4 100644 --- a/src/ResourceManagement/Storage/StorageManagement/Generated/StorageManagementClient.cs +++ b/src/ResourceManagement/Storage/StorageManagement/Generated/StorageManagementClient.cs @@ -13,6 +13,7 @@ namespace Microsoft.Azure.Management.Storage using Microsoft.Rest; using Microsoft.Rest.Serialization; using Newtonsoft.Json; + using System.Linq; using Microsoft.Azure; using Models; @@ -36,10 +37,9 @@ public partial class StorageManagementClient : ServiceClient - /// Subscription credentials which uniquely identify Microsoft Azure - /// subscription. + /// Management credentials for Azure. /// - public SubscriptionCloudCredentials Credentials { get; private set; } + public ServiceClientCredentials Credentials { get; private set; } /// /// Gets subscription credentials which uniquely identify Microsoft @@ -123,13 +123,13 @@ public StorageManagementClient(Uri baseUri, params DelegatingHandler[] handlers) /// Initializes a new instance of the StorageManagementClient class. /// /// - /// Required. Subscription credentials which uniquely identify Microsoft Azure subscription. + /// Required. Management credentials for Azure. /// /// /// Optional. The set of delegating handlers to insert in the http /// client pipeline. /// - public StorageManagementClient(SubscriptionCloudCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) + public StorageManagementClient(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) { if (credentials == null) { @@ -145,13 +145,13 @@ public StorageManagementClient(SubscriptionCloudCredentials credentials, params /// Optional. The base URI of the service. /// /// - /// Required. Subscription credentials which uniquely identify Microsoft Azure subscription. + /// Required. Management credentials for Azure. /// /// /// Optional. The set of delegating handlers to insert in the http /// client pipeline. /// - public StorageManagementClient(Uri baseUri, SubscriptionCloudCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) + public StorageManagementClient(Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) { @@ -174,10 +174,6 @@ private void Initialize() this.BaseUri = new Uri("https://management.azure.com"); this.ApiVersion = "2015-05-01-preview"; this.AcceptLanguage = "en-US"; - if (this.Credentials != null) - { - this.Credentials.InitializeServiceClient(this); - } SerializationSettings = new JsonSerializerSettings { Formatting = Formatting.Indented, diff --git a/src/ResourceManagement/Storage/StorageManagement/StorageManagement.csproj b/src/ResourceManagement/Storage/StorageManagement/StorageManagement.csproj index 8361c74aef79e..9e3fc3fa738c3 100644 --- a/src/ResourceManagement/Storage/StorageManagement/StorageManagement.csproj +++ b/src/ResourceManagement/Storage/StorageManagement/StorageManagement.csproj @@ -35,6 +35,39 @@ Designer + + + + + $(LibraryNugetPackageFolder)\Newtonsoft.Json.6.0.4\lib\portable-net45+wp80+win8+wpa81\Newtonsoft.Json.dll + + + $(LibraryNugetPackageFolder)\Microsoft.Rest.ClientRuntime.1.1.0\lib\portable-net45+win8+wpa81\Microsoft.Rest.ClientRuntime.dll + + + $(LibraryNugetPackageFolder)\Microsoft.Rest.ClientRuntime.Azure.1.0.13\lib\portable-net45+win8+wpa81\Microsoft.Rest.ClientRuntime.Azure.dll + + + + + + + + + + + + $(LibraryNugetPackageFolder)\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll + + + $(LibraryNugetPackageFolder)\Microsoft.Rest.ClientRuntime.1.1.0\lib\net45\Microsoft.Rest.ClientRuntime.dll + + + $(LibraryNugetPackageFolder)\Microsoft.Rest.ClientRuntime.Azure.1.0.13\lib\net45\Microsoft.Rest.ClientRuntime.Azure.dll + + + + diff --git a/tools/Library.Settings.targets b/tools/Library.Settings.targets index 970a00d98ee92..c1fdd1edaa8ef 100644 --- a/tools/Library.Settings.targets +++ b/tools/Library.Settings.targets @@ -23,7 +23,7 @@ net45 - + - - - - - - - - - - - - - - $(LibraryNugetPackageFolder)\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll - - - $(LibraryNugetPackageFolder)\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll - - - False - $(LibraryNugetPackageFolder)\Microsoft.Net.Http.2.2.22\lib\net45\System.Net.Http.Extensions.dll - - - False - $(LibraryNugetPackageFolder)\Microsoft.Net.Http.2.2.22\lib\net45\System.Net.Http.Primitives.dll - - - - - - - - - - $(LibraryNugetPackageFolder)\Microsoft.Rest.ClientRuntime.1.0.3\lib\net45\Microsoft.Rest.ClientRuntime.dll - - - $(LibraryNugetPackageFolder)\Microsoft.Rest.ClientRuntime.Azure.1.0.12\lib\net45\Microsoft.Rest.ClientRuntime.Azure.dll - - - - - \ No newline at end of file diff --git a/tools/references.portable.props b/tools/references.portable.props index 40d3c145652de..3efa4897e8c89 100644 --- a/tools/references.portable.props +++ b/tools/references.portable.props @@ -29,20 +29,4 @@ $(LibraryNugetPackageFolder)\Microsoft.Bcl.1.1.9\lib\portable-net40+sl5+win8+wp8+wpa81\System.Threading.Tasks.dll - - - - - - - $(LibraryNugetPackageFolder)\Microsoft.Rest.ClientRuntime.1.0.3\lib\portable-net403+win8+wpa81\Microsoft.Rest.ClientRuntime.dll - - - $(LibraryNugetPackageFolder)\Microsoft.Rest.ClientRuntime.Azure.1.0.12\lib\portable-net403+win+wpa81\Microsoft.Rest.ClientRuntime.Azure.dll - - - - - \ No newline at end of file