From d9410985e81c409085612153846f38db5a2d60b3 Mon Sep 17 00:00:00 2001 From: Xiaogang Ding Date: Fri, 4 Aug 2023 19:36:32 +0800 Subject: [PATCH 1/2] Generate aks sdk with autorest.powershell --- .../Aks.Sdk/Generated/AgentPoolsOperations.cs | 1283 +++--- .../AgentPoolsOperationsExtensions.cs | 1142 +++--- .../Generated/ContainerServiceClient.cs | 220 +- .../Generated/IAgentPoolsOperations.cs | 157 +- .../Generated/IContainerServiceClient.cs | 59 +- .../IMaintenanceConfigurationsOperations.cs | 70 +- .../Generated/IManagedClustersOperations.cs | 444 +-- src/Aks/Aks.Sdk/Generated/IOperations.cs | 25 +- .../IPrivateEndpointConnectionsOperations.cs | 66 +- .../IPrivateLinkResourcesOperations.cs | 28 +- .../IResolvePrivateLinkServiceIdOperations.cs | 25 +- .../Aks.Sdk/Generated/ISnapshotsOperations.cs | 88 +- .../MaintenanceConfigurationsOperations.cs | 639 +-- ...nanceConfigurationsOperationsExtensions.cs | 410 +- .../Generated/ManagedClustersOperations.cs | 3529 +++++++++-------- .../ManagedClustersOperationsExtensions.cs | 3200 +++++++-------- .../Aks.Sdk/Generated/Models/AccessProfile.cs | 48 + src/Aks/Aks.Sdk/Generated/Models/AgentPool.cs | 850 ++-- .../Models/AgentPoolAvailableVersions.cs | 64 +- .../AgentPoolAvailableVersionsProperties.cs | 48 + ...VersionsPropertiesAgentPoolVersionsItem.cs | 57 +- .../Aks.Sdk/Generated/Models/AgentPoolMode.cs | 18 +- .../Aks.Sdk/Generated/Models/AgentPoolType.cs | 13 +- .../Models/AgentPoolUpgradeProfile.cs | 123 +- .../AgentPoolUpgradeProfileProperties.cs | 99 + ...oolUpgradeProfilePropertiesUpgradesItem.cs | 46 +- .../Models/AgentPoolUpgradeSettings.cs | 47 +- .../AgentPoolsAbortLatestOperationHeaders.cs | 50 +- .../Models/AgentPoolsDeleteHeaders.cs | 31 +- ...gentPoolsUpgradeNodeImageVersionHeaders.cs | 37 +- .../Generated/Models/AzureEntityResource.cs | 64 - .../Generated/Models/AzureKeyVaultKms.cs | 106 +- src/Aks/Aks.Sdk/Generated/Models/Code.cs | 13 +- .../Models/CommandResultProperties.cs | 98 + .../Generated/Models/ConnectionStatus.cs | 13 +- .../Models/ContainerServiceLinuxProfile.cs | 67 +- .../Models/ContainerServiceNetworkProfile.cs | 329 +- .../ContainerServiceSshConfiguration.cs | 49 +- .../Models/ContainerServiceSshPublicKey.cs | 47 +- .../Aks.Sdk/Generated/Models/CreatedByType.cs | 13 +- .../Aks.Sdk/Generated/Models/CreationData.cs | 31 +- .../Generated/Models/CredentialResult.cs | 36 +- .../Generated/Models/CredentialResults.cs | 30 +- .../Generated/Models/EndpointDependency.cs | 43 +- .../Generated/Models/EndpointDetail.cs | 56 +- src/Aks/Aks.Sdk/Generated/Models/Expander.cs | 32 +- .../Generated/Models/ExtendedLocation.cs | 39 +- .../Generated/Models/ExtendedLocationTypes.cs | 13 +- src/Aks/Aks.Sdk/Generated/Models/Format.cs | 20 +- .../Generated/Models/GPUInstanceProfile.cs | 23 +- src/Aks/Aks.Sdk/Generated/Models/Identity.cs | 70 - src/Aks/Aks.Sdk/Generated/Models/IpFamily.cs | 13 +- .../Models/KeyVaultNetworkAccessTypes.cs | 13 +- .../Aks.Sdk/Generated/Models/KubeletConfig.cs | 234 +- .../Generated/Models/KubeletDiskType.cs | 13 +- .../Models/KubernetesPatchVersion.cs | 30 +- .../Generated/Models/KubernetesSupportPlan.cs | 21 +- .../Generated/Models/KubernetesVersion.cs | 63 +- .../Models/KubernetesVersionCapabilities.cs | 35 +- .../Models/KubernetesVersionListResult.cs | 36 +- .../Aks.Sdk/Generated/Models/LicenseType.cs | 13 +- .../Aks.Sdk/Generated/Models/LinuxOSConfig.cs | 93 +- .../Generated/Models/LoadBalancerSku.cs | 19 +- .../Models/MaintenanceConfiguration.cs | 91 +- .../MaintenanceConfigurationProperties.cs | 60 + .../Generated/Models/ManagedCluster.cs | 705 ++-- .../Models/ManagedClusterAADProfile.cs | 127 +- .../ManagedClusterAPIServerAccessProfile.cs | 123 +- .../Models/ManagedClusterAccessProfile.cs | 75 +- .../Models/ManagedClusterAddonProfile.cs | 55 +- .../ManagedClusterAddonProfileIdentity.cs | 35 +- .../Models/ManagedClusterAgentPoolProfile.cs | 327 +- ...anagedClusterAgentPoolProfileProperties.cs | 819 ++-- .../ManagedClusterAutoUpgradeProfile.cs | 43 +- .../ManagedClusterAzureMonitorProfile.cs | 43 +- ...sterAzureMonitorProfileKubeStateMetrics.cs | 83 +- ...anagedClusterAzureMonitorProfileMetrics.cs | 71 +- .../Models/ManagedClusterHTTPProxyConfig.cs | 76 +- .../Models/ManagedClusterIdentity.cs | 93 +- .../ManagedClusterLoadBalancerProfile.cs | 168 +- ...erLoadBalancerProfileManagedOutboundIPs.cs | 89 +- ...erLoadBalancerProfileOutboundIPPrefixes.cs | 36 +- ...edClusterLoadBalancerProfileOutboundIPs.cs | 35 +- .../ManagedClusterManagedOutboundIPProfile.cs | 53 +- .../Models/ManagedClusterNATGatewayProfile.cs | 87 +- .../Models/ManagedClusterOIDCIssuerProfile.cs | 48 +- .../Models/ManagedClusterPodIdentity.cs | 109 +- .../ManagedClusterPodIdentityException.cs | 80 +- .../ManagedClusterPodIdentityProfile.cs | 89 +- ...agedClusterPodIdentityProvisioningError.cs | 31 +- ...ClusterPodIdentityProvisioningErrorBody.cs | 84 +- ...nagedClusterPodIdentityProvisioningInfo.cs | 31 +- ...agedClusterPodIdentityProvisioningState.cs | 13 +- .../ManagedClusterPoolUpgradeProfile.cs | 88 +- ...edClusterPoolUpgradeProfileUpgradesItem.cs | 46 +- .../Models/ManagedClusterProperties.cs | 535 +++ ...nagedClusterPropertiesAutoScalerProfile.cs | 353 +- .../Generated/Models/ManagedClusterSKU.cs | 51 +- .../Generated/Models/ManagedClusterSKUName.cs | 13 +- .../Generated/Models/ManagedClusterSKUTier.cs | 29 +- .../Models/ManagedClusterSecurityProfile.cs | 75 +- .../ManagedClusterSecurityProfileDefender.cs | 63 +- ...curityProfileDefenderSecurityMonitoring.cs | 32 +- ...nagedClusterSecurityProfileImageCleaner.cs | 49 +- ...dClusterSecurityProfileWorkloadIdentity.cs | 31 +- .../ManagedClusterServicePrincipalProfile.cs | 59 +- .../Models/ManagedClusterStorageProfile.cs | 67 +- ...nagedClusterStorageProfileBlobCSIDriver.cs | 36 +- ...nagedClusterStorageProfileDiskCSIDriver.cs | 36 +- ...nagedClusterStorageProfileFileCSIDriver.cs | 36 +- ...ClusterStorageProfileSnapshotController.cs | 36 +- .../Models/ManagedClusterUpgradeProfile.cs | 108 +- .../ManagedClusterUpgradeProfileProperties.cs | 89 + .../Models/ManagedClusterWindowsProfile.cs | 175 +- ...ManagedClusterWorkloadAutoScalerProfile.cs | 39 +- ...gedClusterWorkloadAutoScalerProfileKeda.cs | 33 +- ...agedClustersAbortLatestOperationHeaders.cs | 50 +- .../Models/ManagedClustersDeleteHeaders.cs | 37 +- .../ManagedClustersGetCommandResultHeaders.cs | 37 +- .../ManagedClustersResetAADProfileHeaders.cs | 43 +- ...tersResetServicePrincipalProfileHeaders.cs | 37 +- ...lustersRotateClusterCertificatesHeaders.cs | 37 +- ...sRotateServiceAccountSigningKeysHeaders.cs | 34 +- .../ManagedClustersRunCommandHeaders.cs | 37 +- .../Models/ManagedClustersStartHeaders.cs | 37 +- .../Models/ManagedClustersStopHeaders.cs | 31 +- ...iceIdentityUserAssignedIdentitiesValue.cs} | 49 +- .../Generated/Models/NetworkDataplane.cs | 17 +- .../Aks.Sdk/Generated/Models/NetworkMode.cs | 18 +- .../Aks.Sdk/Generated/Models/NetworkPlugin.cs | 25 +- .../Generated/Models/NetworkPluginMode.cs | 18 +- .../Aks.Sdk/Generated/Models/NetworkPolicy.cs | 26 +- .../Aks.Sdk/Generated/Models/OSDiskType.cs | 24 +- .../Generated/Models/OSOptionProfile.cs | 76 +- .../Generated/Models/OSOptionProperty.cs | 44 +- .../Generated/Models/OSOptionPropertyList.cs | 71 + src/Aks/Aks.Sdk/Generated/Models/OSSKU.cs | 32 +- src/Aks/Aks.Sdk/Generated/Models/OSType.cs | 13 +- .../Generated/Models/OperationValue.cs | 81 +- .../Generated/Models/OperationValueDisplay.cs | 78 + .../Models/OutboundEnvironmentEndpoint.cs | 53 +- .../Aks.Sdk/Generated/Models/OutboundType.cs | 27 +- src/Aks/Aks.Sdk/Generated/Models/Page.cs | 74 +- src/Aks/Aks.Sdk/Generated/Models/Page1.cs | 74 +- src/Aks/Aks.Sdk/Generated/Models/Plan.cs | 116 - .../Aks.Sdk/Generated/Models/PowerState.cs | 27 +- .../Generated/Models/PrivateEndpoint.cs | 25 +- .../Models/PrivateEndpointConnection.cs | 110 +- .../PrivateEndpointConnectionListResult.cs | 35 +- .../PrivateEndpointConnectionProperties.cs | 87 + ...vateEndpointConnectionProvisioningState.cs | 13 +- .../Generated/Models/PrivateLinkResource.cs | 86 +- .../Models/PrivateLinkResourcesListResult.cs | 35 +- .../PrivateLinkServiceConnectionState.cs | 45 +- .../Aks.Sdk/Generated/Models/ProxyResource.cs | 55 - .../Generated/Models/PublicNetworkAccess.cs | 13 +- src/Aks/Aks.Sdk/Generated/Models/Resource.cs | 76 +- .../Generated/Models/ResourceIdentityType.cs | 40 +- .../ResourceIdentityTypeForCommonTypes.cs | 54 - .../ResourceModelWithAllowedPropertySet.cs | 141 - ...urceModelWithAllowedPropertySetIdentity.cs | 47 - ...ResourceModelWithAllowedPropertySetPlan.cs | 63 - .../ResourceModelWithAllowedPropertySetSku.cs | 64 - .../Generated/Models/ResourceReference.cs | 25 +- .../Generated/Models/RunCommandRequest.cs | 61 +- .../Generated/Models/RunCommandResult.cs | 94 +- .../Aks.Sdk/Generated/Models/ScaleDownMode.cs | 19 +- .../Models/ScaleSetEvictionPolicy.cs | 21 +- .../Generated/Models/ScaleSetPriority.cs | 17 +- src/Aks/Aks.Sdk/Generated/Models/Sku.cs | 110 - src/Aks/Aks.Sdk/Generated/Models/SkuTier.cs | 72 - src/Aks/Aks.Sdk/Generated/Models/Snapshot.cs | 169 +- .../Generated/Models/SnapshotProperties.cs | 125 + .../Aks.Sdk/Generated/Models/SnapshotType.cs | 13 +- .../Aks.Sdk/Generated/Models/SubResource.cs | 56 +- .../Aks.Sdk/Generated/Models/SysctlConfig.cs | 321 +- .../Aks.Sdk/Generated/Models/SystemData.cs | 91 +- .../Aks.Sdk/Generated/Models/TagsObject.cs | 29 +- .../Aks.Sdk/Generated/Models/TimeInWeek.cs | 62 +- src/Aks/Aks.Sdk/Generated/Models/TimeSpan.cs | 37 +- .../Generated/Models/TrackedResource.cs | 77 +- .../Generated/Models/UpgradeChannel.cs | 44 +- .../Generated/Models/UserAssignedIdentity.cs | 48 +- src/Aks/Aks.Sdk/Generated/Models/WeekDay.cs | 13 +- .../Generated/Models/WindowsGmsaProfile.cs | 75 +- .../Generated/Models/WorkloadRuntime.cs | 16 +- src/Aks/Aks.Sdk/Generated/Operations.cs | 131 +- .../Aks.Sdk/Generated/OperationsExtensions.cs | 66 +- .../PrivateEndpointConnectionsOperations.cs | 581 +-- ...EndpointConnectionsOperationsExtensions.cs | 448 +-- .../PrivateLinkResourcesOperations.cs | 163 +- ...rivateLinkResourcesOperationsExtensions.cs | 96 +- .../ResolvePrivateLinkServiceIdOperations.cs | 166 +- ...rivateLinkServiceIdOperationsExtensions.cs | 94 +- .../Aks.Sdk/Generated/SnapshotsOperations.cs | 964 ++--- .../SnapshotsOperationsExtensions.cs | 551 ++- src/Aks/Aks.Sdk/README.md | 14 +- .../Aks/Commands/CreateOrUpdateKubeBase.cs | 12 +- src/Aks/Aks/Commands/NewAzureRmAks.cs | 26 +- src/Aks/Aks/Commands/NewAzureRmAksNodePool.cs | 20 +- src/Aks/Aks/Commands/SetAzureRmAks.cs | 10 +- src/Aks/Aks/Models/AdapterHelper.cs | 2 +- src/Aks/Aks/Models/PSKubernetesCluster.cs | 2 +- 203 files changed, 13667 insertions(+), 14135 deletions(-) create mode 100644 src/Aks/Aks.Sdk/Generated/Models/AccessProfile.cs create mode 100644 src/Aks/Aks.Sdk/Generated/Models/AgentPoolAvailableVersionsProperties.cs create mode 100644 src/Aks/Aks.Sdk/Generated/Models/AgentPoolUpgradeProfileProperties.cs delete mode 100644 src/Aks/Aks.Sdk/Generated/Models/AzureEntityResource.cs create mode 100644 src/Aks/Aks.Sdk/Generated/Models/CommandResultProperties.cs delete mode 100644 src/Aks/Aks.Sdk/Generated/Models/Identity.cs create mode 100644 src/Aks/Aks.Sdk/Generated/Models/MaintenanceConfigurationProperties.cs create mode 100644 src/Aks/Aks.Sdk/Generated/Models/ManagedClusterProperties.cs create mode 100644 src/Aks/Aks.Sdk/Generated/Models/ManagedClusterUpgradeProfileProperties.cs rename src/Aks/Aks.Sdk/Generated/Models/{ManagedClusterIdentityUserAssignedIdentitiesValue.cs => ManagedServiceIdentityUserAssignedIdentitiesValue.cs} (55%) create mode 100644 src/Aks/Aks.Sdk/Generated/Models/OSOptionPropertyList.cs create mode 100644 src/Aks/Aks.Sdk/Generated/Models/OperationValueDisplay.cs delete mode 100644 src/Aks/Aks.Sdk/Generated/Models/Plan.cs create mode 100644 src/Aks/Aks.Sdk/Generated/Models/PrivateEndpointConnectionProperties.cs delete mode 100644 src/Aks/Aks.Sdk/Generated/Models/ProxyResource.cs delete mode 100644 src/Aks/Aks.Sdk/Generated/Models/ResourceIdentityTypeForCommonTypes.cs delete mode 100644 src/Aks/Aks.Sdk/Generated/Models/ResourceModelWithAllowedPropertySet.cs delete mode 100644 src/Aks/Aks.Sdk/Generated/Models/ResourceModelWithAllowedPropertySetIdentity.cs delete mode 100644 src/Aks/Aks.Sdk/Generated/Models/ResourceModelWithAllowedPropertySetPlan.cs delete mode 100644 src/Aks/Aks.Sdk/Generated/Models/ResourceModelWithAllowedPropertySetSku.cs delete mode 100644 src/Aks/Aks.Sdk/Generated/Models/Sku.cs delete mode 100644 src/Aks/Aks.Sdk/Generated/Models/SkuTier.cs create mode 100644 src/Aks/Aks.Sdk/Generated/Models/SnapshotProperties.cs diff --git a/src/Aks/Aks.Sdk/Generated/AgentPoolsOperations.cs b/src/Aks/Aks.Sdk/Generated/AgentPoolsOperations.cs index 5eb481279749..ab4148be7c79 100644 --- a/src/Aks/Aks.Sdk/Generated/AgentPoolsOperations.cs +++ b/src/Aks/Aks.Sdk/Generated/AgentPoolsOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// AgentPoolsOperations operations. /// - internal partial class AgentPoolsOperations : IServiceOperations, IAgentPoolsOperations + internal partial class AgentPoolsOperations : Microsoft.Rest.IServiceOperations, IAgentPoolsOperations { /// /// Initializes a new instance of the AgentPoolsOperations class. @@ -36,13 +24,13 @@ internal partial class AgentPoolsOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal AgentPoolsOperations(ContainerServiceClient client) + internal AgentPoolsOperations (ContainerServiceClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -51,14 +39,8 @@ internal AgentPoolsOperations(ContainerServiceClient client) public ContainerServiceClient Client { get; private set; } /// - /// Aborts last operation running on agent pool. + /// Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, a 409 error code is returned. /// - /// - /// Aborts the currently running operation on the agent pool. The Agent Pool - /// will be moved to a Canceling state and eventually to a Canceled state when - /// cancellation finishes. If the operation completes before cancellation can - /// take place, a 409 error code is returned. - /// /// /// The name of the resource group. The name is case insensitive. /// @@ -69,16 +51,16 @@ internal AgentPoolsOperations(ContainerServiceClient client) /// The name of the agent pool. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> AbortLatestOperationWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> AbortLatestOperationWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationHeaderResponse _response = await BeginAbortLatestOperationWithHttpMessagesAsync(resourceGroupName, resourceName, agentPoolName, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationHeaderResponse _response = await BeginAbortLatestOperationWithHttpMessagesAsync(resourceGroupName, resourceName, agentPoolName, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// @@ -96,13 +78,13 @@ internal AgentPoolsOperations(ContainerServiceClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -111,111 +93,112 @@ internal AgentPoolsOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string resourceGroupName, string resourceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) + + + + + if (this.Client.ApiVersion == null) { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.SubscriptionId != null) + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } if (resourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceName"); } if (resourceName != null) { if (resourceName.Length > 63) { - throw new ValidationException(ValidationRules.MaxLength, "resourceName", 63); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceName", 63); } if (resourceName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceName, "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -227,55 +210,56 @@ internal AgentPoolsOperations(ContainerServiceClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -285,9 +269,10 @@ internal AgentPoolsOperations(ContainerServiceClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -298,25 +283,29 @@ internal AgentPoolsOperations(ContainerServiceClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Gets the specified managed cluster agent pool. /// @@ -335,13 +324,13 @@ internal AgentPoolsOperations(ContainerServiceClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -350,132 +339,133 @@ internal AgentPoolsOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) + + + + + if (this.Client.ApiVersion == null) { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.SubscriptionId != null) + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } if (resourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceName"); } if (resourceName != null) { if (resourceName.Length > 63) { - throw new ValidationException(ValidationRules.MaxLength, "resourceName", 63); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceName", 63); } if (resourceName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceName, "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } if (agentPoolName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "agentPoolName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "agentPoolName"); } if (agentPoolName != null) { if (agentPoolName.Length > 12) { - throw new ValidationException(ValidationRules.MaxLength, "agentPoolName", 12); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "agentPoolName", 12); } if (agentPoolName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "agentPoolName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "agentPoolName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(agentPoolName, "^[a-z][a-z0-9]{0,11}$")) { - throw new ValidationException(ValidationRules.Pattern, "agentPoolName", "^[a-z][a-z0-9]{0,11}$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "agentPoolName", "^[a-z][a-z0-9]{0,11}$"); } } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); tracingParameters.Add("agentPoolName", agentPoolName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); _url = _url.Replace("{agentPoolName}", System.Uri.EscapeDataString(agentPoolName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -487,55 +477,56 @@ internal AgentPoolsOperations(ContainerServiceClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -545,9 +536,10 @@ internal AgentPoolsOperations(ContainerServiceClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -558,25 +550,29 @@ internal AgentPoolsOperations(ContainerServiceClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Creates or updates an agent pool in the specified managed cluster. /// @@ -593,16 +589,16 @@ internal AgentPoolsOperations(ContainerServiceClient client) /// The agent pool to create or update. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, AgentPool parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, AgentPool parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send Request - AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, resourceName, agentPoolName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, resourceName, agentPoolName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// @@ -618,16 +614,16 @@ internal AgentPoolsOperations(ContainerServiceClient client) /// The name of the agent pool. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> DeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> DeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationHeaderResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, resourceName, agentPoolName, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationHeaderResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, resourceName, agentPoolName, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// @@ -648,13 +644,13 @@ internal AgentPoolsOperations(ContainerServiceClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -663,132 +659,133 @@ internal AgentPoolsOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetUpgradeProfileWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetUpgradeProfileWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) + + + + + if (this.Client.ApiVersion == null) { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.SubscriptionId != null) + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } if (resourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceName"); } if (resourceName != null) { if (resourceName.Length > 63) { - throw new ValidationException(ValidationRules.MaxLength, "resourceName", 63); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceName", 63); } if (resourceName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceName, "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } if (agentPoolName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "agentPoolName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "agentPoolName"); } if (agentPoolName != null) { if (agentPoolName.Length > 12) { - throw new ValidationException(ValidationRules.MaxLength, "agentPoolName", 12); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "agentPoolName", 12); } if (agentPoolName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "agentPoolName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "agentPoolName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(agentPoolName, "^[a-z][a-z0-9]{0,11}$")) { - throw new ValidationException(ValidationRules.Pattern, "agentPoolName", "^[a-z][a-z0-9]{0,11}$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "agentPoolName", "^[a-z][a-z0-9]{0,11}$"); } } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); tracingParameters.Add("agentPoolName", agentPoolName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetUpgradeProfile", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "GetUpgradeProfile", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); _url = _url.Replace("{agentPoolName}", System.Uri.EscapeDataString(agentPoolName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -800,55 +797,56 @@ internal AgentPoolsOperations(ContainerServiceClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -858,9 +856,10 @@ internal AgentPoolsOperations(ContainerServiceClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -871,33 +870,32 @@ internal AgentPoolsOperations(ContainerServiceClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Gets a list of supported Kubernetes versions for the specified agent pool. + /// See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more details about the version lifecycle. /// - /// - /// See [supported Kubernetes - /// versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) - /// for more details about the version lifecycle. - /// /// /// The name of the resource group. The name is case insensitive. /// @@ -910,13 +908,13 @@ internal AgentPoolsOperations(ContainerServiceClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -925,111 +923,112 @@ internal AgentPoolsOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetAvailableAgentPoolVersionsWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetAvailableAgentPoolVersionsWithHttpMessagesAsync(string resourceGroupName, string resourceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) + + + + + if (this.Client.ApiVersion == null) { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.SubscriptionId != null) + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } if (resourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceName"); } if (resourceName != null) { if (resourceName.Length > 63) { - throw new ValidationException(ValidationRules.MaxLength, "resourceName", 63); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceName", 63); } if (resourceName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceName, "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetAvailableAgentPoolVersions", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "GetAvailableAgentPoolVersions", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/availableAgentPoolVersions").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1041,55 +1040,56 @@ internal AgentPoolsOperations(ContainerServiceClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1099,9 +1099,10 @@ internal AgentPoolsOperations(ContainerServiceClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -1112,34 +1113,32 @@ internal AgentPoolsOperations(ContainerServiceClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Upgrades the node image version of an agent pool to the latest. + /// Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS provides one new image per week with the latest updates. For more details on node image versions, see: https://docs.microsoft.com/azure/aks/node-image-upgrade /// - /// - /// Upgrading the node image version of an agent pool applies the newest OS and - /// runtime updates to the nodes. AKS provides one new image per week with the - /// latest updates. For more details on node image versions, see: - /// https://docs.microsoft.com/azure/aks/node-image-upgrade - /// /// /// The name of the resource group. The name is case insensitive. /// @@ -1150,27 +1149,21 @@ internal AgentPoolsOperations(ContainerServiceClient client) /// The name of the agent pool. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> UpgradeNodeImageVersionWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> UpgradeNodeImageVersionWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginUpgradeNodeImageVersionWithHttpMessagesAsync(resourceGroupName, resourceName, agentPoolName, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginUpgradeNodeImageVersionWithHttpMessagesAsync(resourceGroupName, resourceName, agentPoolName, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Aborts last operation running on agent pool. + /// Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, a 409 error code is returned. /// - /// - /// Aborts the currently running operation on the agent pool. The Agent Pool - /// will be moved to a Canceling state and eventually to a Canceled state when - /// cancellation finishes. If the operation completes before cancellation can - /// take place, a 409 error code is returned. - /// /// /// The name of the resource group. The name is case insensitive. /// @@ -1186,10 +1179,10 @@ internal AgentPoolsOperations(ContainerServiceClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -1198,132 +1191,133 @@ internal AgentPoolsOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginAbortLatestOperationWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginAbortLatestOperationWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) + + + + + if (this.Client.ApiVersion == null) { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.SubscriptionId != null) + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } if (resourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceName"); } if (resourceName != null) { if (resourceName.Length > 63) { - throw new ValidationException(ValidationRules.MaxLength, "resourceName", 63); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceName", 63); } if (resourceName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceName, "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } if (agentPoolName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "agentPoolName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "agentPoolName"); } if (agentPoolName != null) { if (agentPoolName.Length > 12) { - throw new ValidationException(ValidationRules.MaxLength, "agentPoolName", 12); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "agentPoolName", 12); } if (agentPoolName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "agentPoolName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "agentPoolName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(agentPoolName, "^[a-z][a-z0-9]{0,11}$")) { - throw new ValidationException(ValidationRules.Pattern, "agentPoolName", "^[a-z][a-z0-9]{0,11}$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "agentPoolName", "^[a-z][a-z0-9]{0,11}$"); } } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); tracingParameters.Add("agentPoolName", agentPoolName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginAbortLatestOperation", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginAbortLatestOperation", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclusters/{resourceName}/agentPools/{agentPoolName}/abort").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); _url = _url.Replace("{agentPoolName}", System.Uri.EscapeDataString(agentPoolName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1335,55 +1329,56 @@ internal AgentPoolsOperations(ContainerServiceClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 202 && (int)_statusCode != 204) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1393,33 +1388,38 @@ internal AgentPoolsOperations(ContainerServiceClient client) throw ex; } // Create Result - var _result = new AzureOperationHeaderResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationHeaderResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } try { - _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Creates or updates an agent pool in the specified managed cluster. /// @@ -1441,13 +1441,13 @@ internal AgentPoolsOperations(ContainerServiceClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -1456,126 +1456,128 @@ internal AgentPoolsOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, AgentPool parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, AgentPool parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (parameters == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); } - if (Client.ApiVersion != null) + if (parameters != null) { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + parameters.Validate(); + } + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.SubscriptionId != null) + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } if (resourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceName"); } if (resourceName != null) { if (resourceName.Length > 63) { - throw new ValidationException(ValidationRules.MaxLength, "resourceName", 63); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceName", 63); } if (resourceName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceName, "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } if (agentPoolName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "agentPoolName"); - } - if (parameters == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); - } - if (parameters != null) - { - parameters.Validate(); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "agentPoolName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); tracingParameters.Add("agentPoolName", agentPoolName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdate", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdate", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); _url = _url.Replace("{agentPoolName}", System.Uri.EscapeDataString(agentPoolName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PUT"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1587,61 +1589,62 @@ internal AgentPoolsOperations(ContainerServiceClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(parameters != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 201) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1651,9 +1654,10 @@ internal AgentPoolsOperations(ContainerServiceClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -1664,16 +1668,16 @@ internal AgentPoolsOperations(ContainerServiceClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } // Deserialize Response @@ -1682,25 +1686,29 @@ internal AgentPoolsOperations(ContainerServiceClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Deletes an agent pool in the specified managed cluster. /// @@ -1719,10 +1727,10 @@ internal AgentPoolsOperations(ContainerServiceClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -1731,117 +1739,119 @@ internal AgentPoolsOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) + + + + + if (this.Client.ApiVersion == null) { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.SubscriptionId != null) + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } if (resourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceName"); } if (resourceName != null) { if (resourceName.Length > 63) { - throw new ValidationException(ValidationRules.MaxLength, "resourceName", 63); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceName", 63); } if (resourceName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceName, "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } if (agentPoolName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "agentPoolName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "agentPoolName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); tracingParameters.Add("agentPoolName", agentPoolName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); _url = _url.Replace("{agentPoolName}", System.Uri.EscapeDataString(agentPoolName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("DELETE"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1853,55 +1863,56 @@ internal AgentPoolsOperations(ContainerServiceClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 202 && (int)_statusCode != 204) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1911,42 +1922,41 @@ internal AgentPoolsOperations(ContainerServiceClient client) throw ex; } // Create Result - var _result = new AzureOperationHeaderResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationHeaderResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } try { - _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Upgrades the node image version of an agent pool to the latest. + /// Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS provides one new image per week with the latest updates. For more details on node image versions, see: https://docs.microsoft.com/azure/aks/node-image-upgrade /// - /// - /// Upgrading the node image version of an agent pool applies the newest OS and - /// runtime updates to the nodes. AKS provides one new image per week with the - /// latest updates. For more details on node image versions, see: - /// https://docs.microsoft.com/azure/aks/node-image-upgrade - /// /// /// The name of the resource group. The name is case insensitive. /// @@ -1962,13 +1972,13 @@ internal AgentPoolsOperations(ContainerServiceClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -1977,132 +1987,133 @@ internal AgentPoolsOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginUpgradeNodeImageVersionWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginUpgradeNodeImageVersionWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) + + + + + if (this.Client.ApiVersion == null) { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.SubscriptionId != null) + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } if (resourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceName"); } if (resourceName != null) { if (resourceName.Length > 63) { - throw new ValidationException(ValidationRules.MaxLength, "resourceName", 63); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceName", 63); } if (resourceName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceName, "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } if (agentPoolName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "agentPoolName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "agentPoolName"); } if (agentPoolName != null) { if (agentPoolName.Length > 12) { - throw new ValidationException(ValidationRules.MaxLength, "agentPoolName", 12); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "agentPoolName", 12); } if (agentPoolName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "agentPoolName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "agentPoolName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(agentPoolName, "^[a-z][a-z0-9]{0,11}$")) { - throw new ValidationException(ValidationRules.Pattern, "agentPoolName", "^[a-z][a-z0-9]{0,11}$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "agentPoolName", "^[a-z][a-z0-9]{0,11}$"); } } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); tracingParameters.Add("agentPoolName", agentPoolName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginUpgradeNodeImageVersion", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginUpgradeNodeImageVersion", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeNodeImageVersion").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); _url = _url.Replace("{agentPoolName}", System.Uri.EscapeDataString(agentPoolName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -2114,55 +2125,56 @@ internal AgentPoolsOperations(ContainerServiceClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -2172,9 +2184,10 @@ internal AgentPoolsOperations(ContainerServiceClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -2185,38 +2198,42 @@ internal AgentPoolsOperations(ContainerServiceClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } try { - _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Gets a list of agent pools in the specified managed cluster. /// @@ -2229,13 +2246,13 @@ internal AgentPoolsOperations(ContainerServiceClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -2244,51 +2261,53 @@ internal AgentPoolsOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -2300,55 +2319,56 @@ internal AgentPoolsOperations(ContainerServiceClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -2358,9 +2378,10 @@ internal AgentPoolsOperations(ContainerServiceClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -2371,24 +2392,28 @@ internal AgentPoolsOperations(ContainerServiceClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/AgentPoolsOperationsExtensions.cs b/src/Aks/Aks.Sdk/Generated/AgentPoolsOperationsExtensions.cs index 050eec3b1d65..15fb08d1a342 100644 --- a/src/Aks/Aks.Sdk/Generated/AgentPoolsOperationsExtensions.cs +++ b/src/Aks/Aks.Sdk/Generated/AgentPoolsOperationsExtensions.cs @@ -1,669 +1,577 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for AgentPoolsOperations. + /// Extension methods for AgentPoolsOperations /// public static partial class AgentPoolsOperationsExtensions { - /// - /// Aborts last operation running on agent pool. - /// - /// - /// Aborts the currently running operation on the agent pool. The Agent Pool - /// will be moved to a Canceling state and eventually to a Canceled state when - /// cancellation finishes. If the operation completes before cancellation can - /// take place, a 409 error code is returned. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The name of the agent pool. - /// - public static AgentPoolsAbortLatestOperationHeaders AbortLatestOperation(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName, string agentPoolName) - { - return operations.AbortLatestOperationAsync(resourceGroupName, resourceName, agentPoolName).GetAwaiter().GetResult(); - } - - /// - /// Aborts last operation running on agent pool. - /// - /// - /// Aborts the currently running operation on the agent pool. The Agent Pool - /// will be moved to a Canceling state and eventually to a Canceled state when - /// cancellation finishes. If the operation completes before cancellation can - /// take place, a 409 error code is returned. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The name of the agent pool. - /// - /// - /// The cancellation token. - /// - public static async Task AbortLatestOperationAsync(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName, string agentPoolName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.AbortLatestOperationWithHttpMessagesAsync(resourceGroupName, resourceName, agentPoolName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Headers; - } - } - - /// - /// Gets a list of agent pools in the specified managed cluster. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - public static IPage List(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName) - { - return operations.ListAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); - } - - /// - /// Gets a list of agent pools in the specified managed cluster. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the specified managed cluster agent pool. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The name of the agent pool. - /// - public static AgentPool Get(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName, string agentPoolName) - { - return operations.GetAsync(resourceGroupName, resourceName, agentPoolName).GetAwaiter().GetResult(); - } - - /// - /// Gets the specified managed cluster agent pool. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The name of the agent pool. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName, string agentPoolName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, resourceName, agentPoolName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Creates or updates an agent pool in the specified managed cluster. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The name of the agent pool. - /// - /// - /// The agent pool to create or update. - /// - public static AgentPool CreateOrUpdate(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName, string agentPoolName, AgentPool parameters) - { - return operations.CreateOrUpdateAsync(resourceGroupName, resourceName, agentPoolName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Creates or updates an agent pool in the specified managed cluster. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The name of the agent pool. - /// - /// - /// The agent pool to create or update. - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateAsync(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName, string agentPoolName, AgentPool parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, resourceName, agentPoolName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes an agent pool in the specified managed cluster. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The name of the agent pool. - /// - public static AgentPoolsDeleteHeaders Delete(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName, string agentPoolName) - { - return operations.DeleteAsync(resourceGroupName, resourceName, agentPoolName).GetAwaiter().GetResult(); - } - - /// - /// Deletes an agent pool in the specified managed cluster. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The name of the agent pool. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteAsync(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName, string agentPoolName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.DeleteWithHttpMessagesAsync(resourceGroupName, resourceName, agentPoolName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Headers; - } - } + /// + /// Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, a 409 error code is returned. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the agent pool. + /// + public static AgentPoolsAbortLatestOperationHeaders AbortLatestOperation(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName, string agentPoolName) + { + return ((IAgentPoolsOperations)operations).AbortLatestOperationAsync(resourceGroupName, resourceName, agentPoolName).GetAwaiter().GetResult(); + } - /// - /// Gets the upgrade profile for an agent pool. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The name of the agent pool. - /// - public static AgentPoolUpgradeProfile GetUpgradeProfile(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName, string agentPoolName) + /// + /// Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, a 409 error code is returned. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the agent pool. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task AbortLatestOperationAsync(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName, string agentPoolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.AbortLatestOperationWithHttpMessagesAsync(resourceGroupName, resourceName, agentPoolName, null, cancellationToken).ConfigureAwait(false)) { - return operations.GetUpgradeProfileAsync(resourceGroupName, resourceName, agentPoolName).GetAwaiter().GetResult(); + return _result.Headers; } + } + /// + /// Gets a list of agent pools in the specified managed cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + public static Microsoft.Rest.Azure.IPage List(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName) + { + return ((IAgentPoolsOperations)operations).ListAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); + } - /// - /// Gets the upgrade profile for an agent pool. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The name of the agent pool. - /// - /// - /// The cancellation token. - /// - public static async Task GetUpgradeProfileAsync(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName, string agentPoolName, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Gets a list of agent pools in the specified managed cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.GetUpgradeProfileWithHttpMessagesAsync(resourceGroupName, resourceName, agentPoolName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// Gets the specified managed cluster agent pool. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the agent pool. + /// + public static AgentPool Get(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName, string agentPoolName) + { + return ((IAgentPoolsOperations)operations).GetAsync(resourceGroupName, resourceName, agentPoolName).GetAwaiter().GetResult(); + } - /// - /// Gets a list of supported Kubernetes versions for the specified agent pool. - /// - /// - /// See [supported Kubernetes - /// versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) - /// for more details about the version lifecycle. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - public static AgentPoolAvailableVersions GetAvailableAgentPoolVersions(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName) + /// + /// Gets the specified managed cluster agent pool. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the agent pool. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName, string agentPoolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, resourceName, agentPoolName, null, cancellationToken).ConfigureAwait(false)) { - return operations.GetAvailableAgentPoolVersionsAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// Creates or updates an agent pool in the specified managed cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the agent pool. + /// + public static AgentPool CreateOrUpdate(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName, string agentPoolName, AgentPool parameters) + { + return ((IAgentPoolsOperations)operations).CreateOrUpdateAsync(resourceGroupName, resourceName, agentPoolName, parameters).GetAwaiter().GetResult(); + } - /// - /// Gets a list of supported Kubernetes versions for the specified agent pool. - /// - /// - /// See [supported Kubernetes - /// versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) - /// for more details about the version lifecycle. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The cancellation token. - /// - public static async Task GetAvailableAgentPoolVersionsAsync(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Creates or updates an agent pool in the specified managed cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the agent pool. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CreateOrUpdateAsync(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName, string agentPoolName, AgentPool parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, resourceName, agentPoolName, parameters, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.GetAvailableAgentPoolVersionsWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// Deletes an agent pool in the specified managed cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the agent pool. + /// + public static AgentPoolsDeleteHeaders Delete(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName, string agentPoolName) + { + return ((IAgentPoolsOperations)operations).DeleteAsync(resourceGroupName, resourceName, agentPoolName).GetAwaiter().GetResult(); + } - /// - /// Upgrades the node image version of an agent pool to the latest. - /// - /// - /// Upgrading the node image version of an agent pool applies the newest OS and - /// runtime updates to the nodes. AKS provides one new image per week with the - /// latest updates. For more details on node image versions, see: - /// https://docs.microsoft.com/azure/aks/node-image-upgrade - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The name of the agent pool. - /// - public static AgentPool UpgradeNodeImageVersion(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName, string agentPoolName) + /// + /// Deletes an agent pool in the specified managed cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the agent pool. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task DeleteAsync(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName, string agentPoolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.DeleteWithHttpMessagesAsync(resourceGroupName, resourceName, agentPoolName, null, cancellationToken).ConfigureAwait(false)) { - return operations.UpgradeNodeImageVersionAsync(resourceGroupName, resourceName, agentPoolName).GetAwaiter().GetResult(); + return _result.Headers; } + } + /// + /// Gets the upgrade profile for an agent pool. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the agent pool. + /// + public static AgentPoolUpgradeProfile GetUpgradeProfile(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName, string agentPoolName) + { + return ((IAgentPoolsOperations)operations).GetUpgradeProfileAsync(resourceGroupName, resourceName, agentPoolName).GetAwaiter().GetResult(); + } - /// - /// Upgrades the node image version of an agent pool to the latest. - /// - /// - /// Upgrading the node image version of an agent pool applies the newest OS and - /// runtime updates to the nodes. AKS provides one new image per week with the - /// latest updates. For more details on node image versions, see: - /// https://docs.microsoft.com/azure/aks/node-image-upgrade - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The name of the agent pool. - /// - /// - /// The cancellation token. - /// - public static async Task UpgradeNodeImageVersionAsync(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName, string agentPoolName, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Gets the upgrade profile for an agent pool. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the agent pool. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetUpgradeProfileAsync(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName, string agentPoolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetUpgradeProfileWithHttpMessagesAsync(resourceGroupName, resourceName, agentPoolName, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.UpgradeNodeImageVersionWithHttpMessagesAsync(resourceGroupName, resourceName, agentPoolName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more details about the version lifecycle. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + public static AgentPoolAvailableVersions GetAvailableAgentPoolVersions(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName) + { + return ((IAgentPoolsOperations)operations).GetAvailableAgentPoolVersionsAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); + } - /// - /// Aborts last operation running on agent pool. - /// - /// - /// Aborts the currently running operation on the agent pool. The Agent Pool - /// will be moved to a Canceling state and eventually to a Canceled state when - /// cancellation finishes. If the operation completes before cancellation can - /// take place, a 409 error code is returned. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The name of the agent pool. - /// - public static AgentPoolsAbortLatestOperationHeaders BeginAbortLatestOperation(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName, string agentPoolName) + /// + /// See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more details about the version lifecycle. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAvailableAgentPoolVersionsAsync(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetAvailableAgentPoolVersionsWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)) { - return operations.BeginAbortLatestOperationAsync(resourceGroupName, resourceName, agentPoolName).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS provides one new image per week with the latest updates. For more details on node image versions, see: https://docs.microsoft.com/azure/aks/node-image-upgrade + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the agent pool. + /// + public static AgentPool UpgradeNodeImageVersion(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName, string agentPoolName) + { + return ((IAgentPoolsOperations)operations).UpgradeNodeImageVersionAsync(resourceGroupName, resourceName, agentPoolName).GetAwaiter().GetResult(); + } - /// - /// Aborts last operation running on agent pool. - /// - /// - /// Aborts the currently running operation on the agent pool. The Agent Pool - /// will be moved to a Canceling state and eventually to a Canceled state when - /// cancellation finishes. If the operation completes before cancellation can - /// take place, a 409 error code is returned. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The name of the agent pool. - /// - /// - /// The cancellation token. - /// - public static async Task BeginAbortLatestOperationAsync(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName, string agentPoolName, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS provides one new image per week with the latest updates. For more details on node image versions, see: https://docs.microsoft.com/azure/aks/node-image-upgrade + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the agent pool. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task UpgradeNodeImageVersionAsync(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName, string agentPoolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.UpgradeNodeImageVersionWithHttpMessagesAsync(resourceGroupName, resourceName, agentPoolName, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.BeginAbortLatestOperationWithHttpMessagesAsync(resourceGroupName, resourceName, agentPoolName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Headers; - } + return _result.Body; } + } + /// + /// Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, a 409 error code is returned. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the agent pool. + /// + public static AgentPoolsAbortLatestOperationHeaders BeginAbortLatestOperation(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName, string agentPoolName) + { + return ((IAgentPoolsOperations)operations).BeginAbortLatestOperationAsync(resourceGroupName, resourceName, agentPoolName).GetAwaiter().GetResult(); + } - /// - /// Creates or updates an agent pool in the specified managed cluster. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The name of the agent pool. - /// - /// - /// The agent pool to create or update. - /// - public static AgentPool BeginCreateOrUpdate(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName, string agentPoolName, AgentPool parameters) + /// + /// Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, a 409 error code is returned. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the agent pool. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginAbortLatestOperationAsync(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName, string agentPoolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginAbortLatestOperationWithHttpMessagesAsync(resourceGroupName, resourceName, agentPoolName, null, cancellationToken).ConfigureAwait(false)) { - return operations.BeginCreateOrUpdateAsync(resourceGroupName, resourceName, agentPoolName, parameters).GetAwaiter().GetResult(); + return _result.Headers; } + } + /// + /// Creates or updates an agent pool in the specified managed cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the agent pool. + /// + public static AgentPool BeginCreateOrUpdate(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName, string agentPoolName, AgentPool parameters) + { + return ((IAgentPoolsOperations)operations).BeginCreateOrUpdateAsync(resourceGroupName, resourceName, agentPoolName, parameters).GetAwaiter().GetResult(); + } - /// - /// Creates or updates an agent pool in the specified managed cluster. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The name of the agent pool. - /// - /// - /// The agent pool to create or update. - /// - /// - /// The cancellation token. - /// - public static async Task BeginCreateOrUpdateAsync(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName, string agentPoolName, AgentPool parameters, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Creates or updates an agent pool in the specified managed cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the agent pool. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginCreateOrUpdateAsync(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName, string agentPoolName, AgentPool parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, resourceName, agentPoolName, parameters, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, resourceName, agentPoolName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// Deletes an agent pool in the specified managed cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the agent pool. + /// + public static AgentPoolsDeleteHeaders BeginDelete(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName, string agentPoolName) + { + return ((IAgentPoolsOperations)operations).BeginDeleteAsync(resourceGroupName, resourceName, agentPoolName).GetAwaiter().GetResult(); + } - /// - /// Deletes an agent pool in the specified managed cluster. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The name of the agent pool. - /// - public static AgentPoolsDeleteHeaders BeginDelete(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName, string agentPoolName) + /// + /// Deletes an agent pool in the specified managed cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the agent pool. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginDeleteAsync(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName, string agentPoolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, resourceName, agentPoolName, null, cancellationToken).ConfigureAwait(false)) { - return operations.BeginDeleteAsync(resourceGroupName, resourceName, agentPoolName).GetAwaiter().GetResult(); + return _result.Headers; } + } + /// + /// Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS provides one new image per week with the latest updates. For more details on node image versions, see: https://docs.microsoft.com/azure/aks/node-image-upgrade + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the agent pool. + /// + public static AgentPool BeginUpgradeNodeImageVersion(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName, string agentPoolName) + { + return ((IAgentPoolsOperations)operations).BeginUpgradeNodeImageVersionAsync(resourceGroupName, resourceName, agentPoolName).GetAwaiter().GetResult(); + } - /// - /// Deletes an agent pool in the specified managed cluster. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The name of the agent pool. - /// - /// - /// The cancellation token. - /// - public static async Task BeginDeleteAsync(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName, string agentPoolName, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS provides one new image per week with the latest updates. For more details on node image versions, see: https://docs.microsoft.com/azure/aks/node-image-upgrade + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the agent pool. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginUpgradeNodeImageVersionAsync(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName, string agentPoolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginUpgradeNodeImageVersionWithHttpMessagesAsync(resourceGroupName, resourceName, agentPoolName, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, resourceName, agentPoolName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Headers; - } + return _result.Body; } + } + /// + /// Gets a list of agent pools in the specified managed cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListNext(this IAgentPoolsOperations operations, string nextPageLink) + { + return ((IAgentPoolsOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } - /// - /// Upgrades the node image version of an agent pool to the latest. - /// - /// - /// Upgrading the node image version of an agent pool applies the newest OS and - /// runtime updates to the nodes. AKS provides one new image per week with the - /// latest updates. For more details on node image versions, see: - /// https://docs.microsoft.com/azure/aks/node-image-upgrade - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The name of the agent pool. - /// - public static AgentPool BeginUpgradeNodeImageVersion(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName, string agentPoolName) + /// + /// Gets a list of agent pools in the specified managed cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListNextAsync(this IAgentPoolsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { - return operations.BeginUpgradeNodeImageVersionAsync(resourceGroupName, resourceName, agentPoolName).GetAwaiter().GetResult(); + return _result.Body; } - - /// - /// Upgrades the node image version of an agent pool to the latest. - /// - /// - /// Upgrading the node image version of an agent pool applies the newest OS and - /// runtime updates to the nodes. AKS provides one new image per week with the - /// latest updates. For more details on node image versions, see: - /// https://docs.microsoft.com/azure/aks/node-image-upgrade - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The name of the agent pool. - /// - /// - /// The cancellation token. - /// - public static async Task BeginUpgradeNodeImageVersionAsync(this IAgentPoolsOperations operations, string resourceGroupName, string resourceName, string agentPoolName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginUpgradeNodeImageVersionWithHttpMessagesAsync(resourceGroupName, resourceName, agentPoolName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a list of agent pools in the specified managed cluster. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IAgentPoolsOperations operations, string nextPageLink) - { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets a list of agent pools in the specified managed cluster. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListNextAsync(this IAgentPoolsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - + } } } diff --git a/src/Aks/Aks.Sdk/Generated/ContainerServiceClient.cs b/src/Aks/Aks.Sdk/Generated/ContainerServiceClient.cs index db368aaf8168..de157d52b3cd 100644 --- a/src/Aks/Aks.Sdk/Generated/ContainerServiceClient.cs +++ b/src/Aks/Aks.Sdk/Generated/ContainerServiceClient.cs @@ -1,119 +1,97 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; - using Microsoft.Rest.Serialization; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; /// /// The Container Service Client. /// - public partial class ContainerServiceClient : ServiceClient, IContainerServiceClient, IAzureClient + public partial class ContainerServiceClient : Microsoft.Rest.ServiceClient, IContainerServiceClient, IAzureClient { /// /// The base URI of the service. /// public System.Uri BaseUri { get; set; } - /// /// Gets or sets json serialization settings. /// - public JsonSerializerSettings SerializationSettings { get; private set; } - + public Newtonsoft.Json.JsonSerializerSettings SerializationSettings { get; private set; } /// /// Gets or sets json deserialization settings. /// - public JsonSerializerSettings DeserializationSettings { get; private set; } - + public Newtonsoft.Json.JsonSerializerSettings DeserializationSettings { get; private set; } /// /// Credentials needed for the client to connect to Azure. /// - public ServiceClientCredentials Credentials { get; private set; } + public Microsoft.Rest.ServiceClientCredentials Credentials { get; private set; } /// - /// The ID of the target subscription. + /// The API version to use for this operation. /// - public string SubscriptionId { get; set; } + public string ApiVersion { get; private set; } /// - /// The API version to use for this operation. + /// The ID of the target subscription. /// - public string ApiVersion { get; private set; } + public string SubscriptionId { get; set;} /// /// The preferred language for the response. /// - public string AcceptLanguage { get; set; } + public string AcceptLanguage { get; set;} /// - /// The retry timeout in seconds for Long Running Operations. Default value is - /// 30. + /// The retry timeout in seconds for Long Running Operations. Default + /// value is 30. /// - public int? LongRunningOperationRetryTimeout { get; set; } + public int? LongRunningOperationRetryTimeout { get; set;} /// - /// Whether a unique x-ms-client-request-id should be generated. When set to - /// true a unique x-ms-client-request-id value is generated and included in - /// each request. Default is true. + /// Whether a unique x-ms-client-request-id should be generated. When + /// set to true a unique x-ms-client-request-id value is generated and + /// included in each request. Default is true. /// - public bool? GenerateClientRequestId { get; set; } + public bool? GenerateClientRequestId { get; set;} /// - /// Gets the IOperations. + /// Gets the IOperations /// public virtual IOperations Operations { get; private set; } - /// - /// Gets the IManagedClustersOperations. + /// Gets the IManagedClustersOperations /// public virtual IManagedClustersOperations ManagedClusters { get; private set; } - /// - /// Gets the IMaintenanceConfigurationsOperations. + /// Gets the IMaintenanceConfigurationsOperations /// public virtual IMaintenanceConfigurationsOperations MaintenanceConfigurations { get; private set; } - /// - /// Gets the IAgentPoolsOperations. + /// Gets the IAgentPoolsOperations /// public virtual IAgentPoolsOperations AgentPools { get; private set; } - /// - /// Gets the IPrivateEndpointConnectionsOperations. + /// Gets the IPrivateEndpointConnectionsOperations /// public virtual IPrivateEndpointConnectionsOperations PrivateEndpointConnections { get; private set; } - /// - /// Gets the IPrivateLinkResourcesOperations. + /// Gets the IPrivateLinkResourcesOperations /// public virtual IPrivateLinkResourcesOperations PrivateLinkResources { get; private set; } - /// - /// Gets the IResolvePrivateLinkServiceIdOperations. + /// Gets the IResolvePrivateLinkServiceIdOperations /// public virtual IResolvePrivateLinkServiceIdOperations ResolvePrivateLinkServiceId { get; private set; } - /// - /// Gets the ISnapshotsOperations. + /// Gets the ISnapshotsOperations /// public virtual ISnapshotsOperations Snapshots { get; private set; } - /// /// Initializes a new instance of the ContainerServiceClient class. /// @@ -122,24 +100,22 @@ public partial class ContainerServiceClient : ServiceClient /// /// True: will dispose the provided httpClient on calling ContainerServiceClient.Dispose(). False: will not dispose provided httpClient - protected ContainerServiceClient(HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient) + protected ContainerServiceClient(System.Net.Http.HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient) { - Initialize(); + this.Initialize(); } - /// /// Initializes a new instance of the ContainerServiceClient class. /// /// /// Optional. The delegating handlers to add to the http client pipeline. /// - protected ContainerServiceClient(params DelegatingHandler[] handlers) : base(handlers) + protected ContainerServiceClient(params System.Net.Http.DelegatingHandler[] handlers) : base(handlers) { - Initialize(); + this.Initialize(); } - /// - /// Initializes a new instance of the ContainerServiceClient class. + /// Initializes a new instance of the ContainerServiceClient class. /// /// /// Optional. The http client handler used to handle http transport. @@ -147,11 +123,10 @@ protected ContainerServiceClient(params DelegatingHandler[] handlers) : base(han /// /// Optional. The delegating handlers to add to the http client pipeline. /// - protected ContainerServiceClient(HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : base(rootHandler, handlers) + protected ContainerServiceClient(System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : base(rootHandler, handlers) { - Initialize(); + this.Initialize(); } - /// /// Initializes a new instance of the ContainerServiceClient class. /// @@ -164,15 +139,14 @@ protected ContainerServiceClient(HttpClientHandler rootHandler, params Delegatin /// /// Thrown when a required parameter is null /// - protected ContainerServiceClient(System.Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) + protected ContainerServiceClient(System.Uri baseUri, params System.Net.Http.DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) { throw new System.ArgumentNullException("baseUri"); } - BaseUri = baseUri; + this.BaseUri = baseUri; } - /// /// Initializes a new instance of the ContainerServiceClient class. /// @@ -188,15 +162,15 @@ protected ContainerServiceClient(System.Uri baseUri, params DelegatingHandler[] /// /// Thrown when a required parameter is null /// - protected ContainerServiceClient(System.Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) + protected ContainerServiceClient(System.Uri baseUri, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) { throw new System.ArgumentNullException("baseUri"); } - BaseUri = baseUri; + + this.BaseUri = baseUri; } - /// /// Initializes a new instance of the ContainerServiceClient class. /// @@ -209,23 +183,23 @@ protected ContainerServiceClient(System.Uri baseUri, HttpClientHandler rootHandl /// /// Thrown when a required parameter is null /// - public ContainerServiceClient(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) + public ContainerServiceClient(Microsoft.Rest.ServiceClientCredentials credentials, params System.Net.Http.DelegatingHandler[] handlers) : this(handlers) { if (credentials == null) { throw new System.ArgumentNullException("credentials"); } - Credentials = credentials; - if (Credentials != null) + this.Credentials = credentials; + if (this.Credentials != null) { - Credentials.InitializeServiceClient(this); + this.Credentials.InitializeServiceClient(this); } + } - /// /// Initializes a new instance of the ContainerServiceClient class. /// - /// + /// /// Required. Credentials needed for the client to connect to Azure. /// /// @@ -236,23 +210,23 @@ public ContainerServiceClient(ServiceClientCredentials credentials, params Deleg /// /// Thrown when a required parameter is null /// - public ContainerServiceClient(ServiceClientCredentials credentials, HttpClient httpClient, bool disposeHttpClient) : this(httpClient, disposeHttpClient) + public ContainerServiceClient(Microsoft.Rest.ServiceClientCredentials credentials, System.Net.Http.HttpClient httpClient, bool disposeHttpClient) : this(httpClient, disposeHttpClient) { if (credentials == null) { throw new System.ArgumentNullException("credentials"); } - Credentials = credentials; - if (Credentials != null) + this.Credentials = credentials; + if (this.Credentials != null) { - Credentials.InitializeServiceClient(this); + this.Credentials.InitializeServiceClient(this); } + } - /// /// Initializes a new instance of the ContainerServiceClient class. /// - /// + /// /// Required. Credentials needed for the client to connect to Azure. /// /// @@ -264,26 +238,26 @@ public ContainerServiceClient(ServiceClientCredentials credentials, HttpClient h /// /// Thrown when a required parameter is null /// - public ContainerServiceClient(ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) + public ContainerServiceClient(Microsoft.Rest.ServiceClientCredentials credentials, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (credentials == null) { throw new System.ArgumentNullException("credentials"); } - Credentials = credentials; - if (Credentials != null) + this.Credentials = credentials; + if (this.Credentials != null) { - Credentials.InitializeServiceClient(this); + this.Credentials.InitializeServiceClient(this); } + } - /// /// Initializes a new instance of the ContainerServiceClient class. /// /// /// Optional. The base URI of the service. /// - /// + /// /// Required. Credentials needed for the client to connect to Azure. /// /// @@ -292,7 +266,7 @@ public ContainerServiceClient(ServiceClientCredentials credentials, HttpClientHa /// /// Thrown when a required parameter is null /// - public ContainerServiceClient(System.Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) + public ContainerServiceClient(System.Uri baseUri, Microsoft.Rest.ServiceClientCredentials credentials, params System.Net.Http.DelegatingHandler[] handlers) : this(handlers) { if (baseUri == null) { @@ -302,33 +276,30 @@ public ContainerServiceClient(System.Uri baseUri, ServiceClientCredentials crede { throw new System.ArgumentNullException("credentials"); } - BaseUri = baseUri; - Credentials = credentials; - if (Credentials != null) + this.BaseUri = baseUri; + this.Credentials = credentials; + if (this.Credentials != null) { - Credentials.InitializeServiceClient(this); + this.Credentials.InitializeServiceClient(this); } + } - /// /// Initializes a new instance of the ContainerServiceClient class. /// /// /// Optional. The base URI of the service. /// - /// + /// /// Required. Credentials needed for the client to connect to Azure. /// /// /// Optional. The http client handler used to handle http transport. /// - /// - /// Optional. The delegating handlers to add to the http client pipeline. - /// /// /// Thrown when a required parameter is null /// - public ContainerServiceClient(System.Uri baseUri, ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) + public ContainerServiceClient(System.Uri baseUri, Microsoft.Rest.ServiceClientCredentials credentials, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : this(rootHandler, handlers) { if (baseUri == null) { @@ -338,65 +309,66 @@ public ContainerServiceClient(System.Uri baseUri, ServiceClientCredentials crede { throw new System.ArgumentNullException("credentials"); } - BaseUri = baseUri; - Credentials = credentials; - if (Credentials != null) + this.BaseUri = baseUri; + this.Credentials = credentials; + if (this.Credentials != null) { - Credentials.InitializeServiceClient(this); + this.Credentials.InitializeServiceClient(this); } + } - /// /// An optional partial-method to perform custom initialization. /// partial void CustomInitialize(); + /// /// Initializes client properties. /// private void Initialize() { - Operations = new Operations(this); - ManagedClusters = new ManagedClustersOperations(this); - MaintenanceConfigurations = new MaintenanceConfigurationsOperations(this); - AgentPools = new AgentPoolsOperations(this); - PrivateEndpointConnections = new PrivateEndpointConnectionsOperations(this); - PrivateLinkResources = new PrivateLinkResourcesOperations(this); - ResolvePrivateLinkServiceId = new ResolvePrivateLinkServiceIdOperations(this); - Snapshots = new SnapshotsOperations(this); - BaseUri = new System.Uri("https://management.azure.com"); - ApiVersion = "2023-04-01"; - AcceptLanguage = "en-US"; - LongRunningOperationRetryTimeout = 30; - GenerateClientRequestId = true; - SerializationSettings = new JsonSerializerSettings + this.Operations = new Operations(this); + this.ManagedClusters = new ManagedClustersOperations(this); + this.MaintenanceConfigurations = new MaintenanceConfigurationsOperations(this); + this.AgentPools = new AgentPoolsOperations(this); + this.PrivateEndpointConnections = new PrivateEndpointConnectionsOperations(this); + this.PrivateLinkResources = new PrivateLinkResourcesOperations(this); + this.ResolvePrivateLinkServiceId = new ResolvePrivateLinkServiceIdOperations(this); + this.Snapshots = new SnapshotsOperations(this); + this.BaseUri = new System.Uri("https://management.azure.com"); + this.ApiVersion = "2023-04-01"; + this.AcceptLanguage = "en-US"; + this.LongRunningOperationRetryTimeout = 30; + this.GenerateClientRequestId = true; + SerializationSettings = new Newtonsoft.Json.JsonSerializerSettings { Formatting = Newtonsoft.Json.Formatting.Indented, DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, - ContractResolver = new ReadOnlyJsonContractResolver(), - Converters = new List + ContractResolver = new Microsoft.Rest.Serialization.ReadOnlyJsonContractResolver(), + Converters = new System.Collections.Generic.List { - new Iso8601TimeSpanConverter() + new Microsoft.Rest.Serialization.Iso8601TimeSpanConverter() } }; - SerializationSettings.Converters.Add(new TransformationJsonConverter()); - DeserializationSettings = new JsonSerializerSettings + SerializationSettings.Converters.Add(new Microsoft.Rest.Serialization.TransformationJsonConverter()); + DeserializationSettings = new Newtonsoft.Json.JsonSerializerSettings { DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, - ContractResolver = new ReadOnlyJsonContractResolver(), - Converters = new List + ContractResolver = new Microsoft.Rest.Serialization.ReadOnlyJsonContractResolver(), + Converters = new System.Collections.Generic.List { - new Iso8601TimeSpanConverter() + new Microsoft.Rest.Serialization.Iso8601TimeSpanConverter() } }; CustomInitialize(); - DeserializationSettings.Converters.Add(new TransformationJsonConverter()); - DeserializationSettings.Converters.Add(new CloudErrorJsonConverter()); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Serialization.TransformationJsonConverter()); + DeserializationSettings.Converters.Add(new Microsoft.Rest.Azure.CloudErrorJsonConverter()); } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/IAgentPoolsOperations.cs b/src/Aks/Aks.Sdk/Generated/IAgentPoolsOperations.cs index c7a0cdf9dc66..1273f95d0bd0 100644 --- a/src/Aks/Aks.Sdk/Generated/IAgentPoolsOperations.cs +++ b/src/Aks/Aks.Sdk/Generated/IAgentPoolsOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// AgentPoolsOperations operations. @@ -24,14 +14,10 @@ namespace Microsoft.Azure.Management.ContainerService public partial interface IAgentPoolsOperations { /// - /// Aborts last operation running on agent pool. + /// Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, a 409 error code is returned. /// /// - /// Aborts the currently running operation on the agent pool. The Agent - /// Pool will be moved to a Canceling state and eventually to a - /// Canceled state when cancellation finishes. If the operation - /// completes before cancellation can take place, a 409 error code is - /// returned. + /// Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, a 409 error code is returned. /// /// /// The name of the resource group. The name is case insensitive. @@ -51,13 +37,14 @@ public partial interface IAgentPoolsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task> AbortLatestOperationWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> AbortLatestOperationWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Gets a list of agent pools in the specified managed cluster. /// + /// + /// Gets a list of agent pools in the specified managed cluster. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -76,13 +63,14 @@ public partial interface IAgentPoolsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string resourceGroupName, string resourceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Gets the specified managed cluster agent pool. /// + /// + /// Gets the specified managed cluster agent pool. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -104,13 +92,14 @@ public partial interface IAgentPoolsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Creates or updates an agent pool in the specified managed cluster. /// + /// + /// Creates or updates an agent pool in the specified managed cluster. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -135,13 +124,14 @@ public partial interface IAgentPoolsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, AgentPool parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, AgentPool parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Deletes an agent pool in the specified managed cluster. /// + /// + /// Deletes an agent pool in the specified managed cluster. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -160,13 +150,14 @@ public partial interface IAgentPoolsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task> DeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> DeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Gets the upgrade profile for an agent pool. /// + /// + /// Gets the upgrade profile for an agent pool. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -188,18 +179,13 @@ public partial interface IAgentPoolsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetUpgradeProfileWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetUpgradeProfileWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets a list of supported Kubernetes versions for the specified - /// agent pool. + /// See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more details about the version lifecycle. /// /// - /// See [supported Kubernetes - /// versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) - /// for more details about the version lifecycle. + /// See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more details about the version lifecycle. /// /// /// The name of the resource group. The name is case insensitive. @@ -219,19 +205,13 @@ public partial interface IAgentPoolsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetAvailableAgentPoolVersionsWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetAvailableAgentPoolVersionsWithHttpMessagesAsync(string resourceGroupName, string resourceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Upgrades the node image version of an agent pool to the latest. + /// Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS provides one new image per week with the latest updates. For more details on node image versions, see: https://docs.microsoft.com/azure/aks/node-image-upgrade /// /// - /// Upgrading the node image version of an agent pool applies the - /// newest OS and runtime updates to the nodes. AKS provides one new - /// image per week with the latest updates. For more details on node - /// image versions, see: - /// https://docs.microsoft.com/azure/aks/node-image-upgrade + /// Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS provides one new image per week with the latest updates. For more details on node image versions, see: https://docs.microsoft.com/azure/aks/node-image-upgrade /// /// /// The name of the resource group. The name is case insensitive. @@ -254,19 +234,13 @@ public partial interface IAgentPoolsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> UpgradeNodeImageVersionWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> UpgradeNodeImageVersionWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Aborts last operation running on agent pool. + /// Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, a 409 error code is returned. /// /// - /// Aborts the currently running operation on the agent pool. The Agent - /// Pool will be moved to a Canceling state and eventually to a - /// Canceled state when cancellation finishes. If the operation - /// completes before cancellation can take place, a 409 error code is - /// returned. + /// Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, a 409 error code is returned. /// /// /// The name of the resource group. The name is case insensitive. @@ -286,13 +260,14 @@ public partial interface IAgentPoolsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginAbortLatestOperationWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginAbortLatestOperationWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Creates or updates an agent pool in the specified managed cluster. /// + /// + /// Creates or updates an agent pool in the specified managed cluster. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -317,13 +292,14 @@ public partial interface IAgentPoolsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, AgentPool parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, AgentPool parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Deletes an agent pool in the specified managed cluster. /// + /// + /// Deletes an agent pool in the specified managed cluster. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -342,19 +318,13 @@ public partial interface IAgentPoolsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Upgrades the node image version of an agent pool to the latest. + /// Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS provides one new image per week with the latest updates. For more details on node image versions, see: https://docs.microsoft.com/azure/aks/node-image-upgrade /// /// - /// Upgrading the node image version of an agent pool applies the - /// newest OS and runtime updates to the nodes. AKS provides one new - /// image per week with the latest updates. For more details on node - /// image versions, see: - /// https://docs.microsoft.com/azure/aks/node-image-upgrade + /// Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS provides one new image per week with the latest updates. For more details on node image versions, see: https://docs.microsoft.com/azure/aks/node-image-upgrade /// /// /// The name of the resource group. The name is case insensitive. @@ -377,13 +347,14 @@ public partial interface IAgentPoolsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginUpgradeNodeImageVersionWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginUpgradeNodeImageVersionWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Gets a list of agent pools in the specified managed cluster. /// + /// + /// Gets a list of agent pools in the specified managed cluster. + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -399,9 +370,7 @@ public partial interface IAgentPoolsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/IContainerServiceClient.cs b/src/Aks/Aks.Sdk/Generated/IContainerServiceClient.cs index 7e7f2c5a91e2..a50d9878225f 100644 --- a/src/Aks/Aks.Sdk/Generated/IContainerServiceClient.cs +++ b/src/Aks/Aks.Sdk/Generated/IContainerServiceClient.cs @@ -1,24 +1,18 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService { using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using Newtonsoft.Json; /// /// The Container Service Client. /// - public partial interface IContainerServiceClient : System.IDisposable + public partial interface IContainerServiceClient : System.IDisposable { /// /// The base URI of the service. @@ -28,86 +22,91 @@ public partial interface IContainerServiceClient : System.IDisposable /// /// Gets or sets json serialization settings. /// - JsonSerializerSettings SerializationSettings { get; } + Newtonsoft.Json.JsonSerializerSettings SerializationSettings { get; } /// /// Gets or sets json deserialization settings. /// - JsonSerializerSettings DeserializationSettings { get; } + Newtonsoft.Json.JsonSerializerSettings DeserializationSettings { get; } /// /// Credentials needed for the client to connect to Azure. /// - ServiceClientCredentials Credentials { get; } + Microsoft.Rest.ServiceClientCredentials Credentials { get;} + /// - /// The ID of the target subscription. + /// The API version to use for this operation. /// - string SubscriptionId { get; set; } + string ApiVersion { get;} + /// - /// The API version to use for this operation. + /// The ID of the target subscription. /// - string ApiVersion { get; } + string SubscriptionId { get; set;} + /// /// The preferred language for the response. /// - string AcceptLanguage { get; set; } + string AcceptLanguage { get; set;} + /// /// The retry timeout in seconds for Long Running Operations. Default /// value is 30. /// - int? LongRunningOperationRetryTimeout { get; set; } + int? LongRunningOperationRetryTimeout { get; set;} + /// - /// Whether a unique x-ms-client-request-id should be generated. When - /// set to true a unique x-ms-client-request-id value is generated and + /// Whether a unique x-ms-client-request-id should be generated. When + /// set to true a unique x-ms-client-request-id value is generated and /// included in each request. Default is true. /// - bool? GenerateClientRequestId { get; set; } + bool? GenerateClientRequestId { get; set;} /// - /// Gets the IOperations. + /// Gets the IOperations /// IOperations Operations { get; } /// - /// Gets the IManagedClustersOperations. + /// Gets the IManagedClustersOperations /// IManagedClustersOperations ManagedClusters { get; } /// - /// Gets the IMaintenanceConfigurationsOperations. + /// Gets the IMaintenanceConfigurationsOperations /// IMaintenanceConfigurationsOperations MaintenanceConfigurations { get; } /// - /// Gets the IAgentPoolsOperations. + /// Gets the IAgentPoolsOperations /// IAgentPoolsOperations AgentPools { get; } /// - /// Gets the IPrivateEndpointConnectionsOperations. + /// Gets the IPrivateEndpointConnectionsOperations /// IPrivateEndpointConnectionsOperations PrivateEndpointConnections { get; } /// - /// Gets the IPrivateLinkResourcesOperations. + /// Gets the IPrivateLinkResourcesOperations /// IPrivateLinkResourcesOperations PrivateLinkResources { get; } /// - /// Gets the IResolvePrivateLinkServiceIdOperations. + /// Gets the IResolvePrivateLinkServiceIdOperations /// IResolvePrivateLinkServiceIdOperations ResolvePrivateLinkServiceId { get; } /// - /// Gets the ISnapshotsOperations. + /// Gets the ISnapshotsOperations /// ISnapshotsOperations Snapshots { get; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/IMaintenanceConfigurationsOperations.cs b/src/Aks/Aks.Sdk/Generated/IMaintenanceConfigurationsOperations.cs index aec8c81a7d30..8ab749e567e1 100644 --- a/src/Aks/Aks.Sdk/Generated/IMaintenanceConfigurationsOperations.cs +++ b/src/Aks/Aks.Sdk/Generated/IMaintenanceConfigurationsOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// MaintenanceConfigurationsOperations operations. @@ -24,9 +14,11 @@ namespace Microsoft.Azure.Management.ContainerService public partial interface IMaintenanceConfigurationsOperations { /// - /// Gets a list of maintenance configurations in the specified managed - /// cluster. + /// Gets a list of maintenance configurations in the specified managed cluster. /// + /// + /// Gets a list of maintenance configurations in the specified managed cluster. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -45,13 +37,14 @@ public partial interface IMaintenanceConfigurationsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListByManagedClusterWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListByManagedClusterWithHttpMessagesAsync(string resourceGroupName, string resourceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Gets the specified maintenance configuration of a managed cluster. /// + /// + /// Gets the specified maintenance configuration of a managed cluster. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -73,14 +66,14 @@ public partial interface IMaintenanceConfigurationsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string resourceGroupName, string resourceName, string configName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string resourceName, string configName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Creates or updates a maintenance configuration in the specified - /// managed cluster. + /// Creates or updates a maintenance configuration in the specified managed cluster. /// + /// + /// Creates or updates a maintenance configuration in the specified managed cluster. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -105,13 +98,14 @@ public partial interface IMaintenanceConfigurationsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, string configName, MaintenanceConfiguration parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, string configName, MaintenanceConfiguration parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Deletes a maintenance configuration. /// + /// + /// Deletes a maintenance configuration. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -130,14 +124,14 @@ public partial interface IMaintenanceConfigurationsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task DeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, string configName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, string configName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets a list of maintenance configurations in the specified managed - /// cluster. + /// Gets a list of maintenance configurations in the specified managed cluster. /// + /// + /// Gets a list of maintenance configurations in the specified managed cluster. + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -153,9 +147,7 @@ public partial interface IMaintenanceConfigurationsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListByManagedClusterNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListByManagedClusterNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/IManagedClustersOperations.cs b/src/Aks/Aks.Sdk/Generated/IManagedClustersOperations.cs index 8511cc535843..e8c9d97613f1 100644 --- a/src/Aks/Aks.Sdk/Generated/IManagedClustersOperations.cs +++ b/src/Aks/Aks.Sdk/Generated/IManagedClustersOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// ManagedClustersOperations operations. @@ -26,6 +16,9 @@ public partial interface IManagedClustersOperations /// /// Gets supported OS options in the specified subscription. /// + /// + /// Gets supported OS options in the specified subscription. + /// /// /// The name of Azure region. /// @@ -44,18 +37,13 @@ public partial interface IManagedClustersOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetOSOptionsWithHttpMessagesAsync(string location, string resourceType = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetOSOptionsWithHttpMessagesAsync(string location, string resourceType = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets a list of supported Kubernetes versions in the specified - /// subscription. + /// Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and details on preview status of the version /// /// - /// Contains extra metadata on the version, including supported patch - /// versions, capabilities, available upgrades, and details on preview - /// status of the version + /// Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and details on preview status of the version /// /// /// The name of Azure region. @@ -72,13 +60,14 @@ public partial interface IManagedClustersOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> ListKubernetesVersionsWithHttpMessagesAsync(string location, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> ListKubernetesVersionsWithHttpMessagesAsync(string location, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Gets a list of managed clusters in the specified subscription. /// + /// + /// Gets a list of managed clusters in the specified subscription. + /// /// /// The headers that will be added to request. /// @@ -91,14 +80,14 @@ public partial interface IManagedClustersOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Lists managed clusters in the specified subscription and resource - /// group. + /// Lists managed clusters in the specified subscription and resource group. /// + /// + /// Lists managed clusters in the specified subscription and resource group. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -114,13 +103,14 @@ public partial interface IManagedClustersOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Gets the upgrade profile of a managed cluster. /// + /// + /// Gets the upgrade profile of a managed cluster. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -139,19 +129,13 @@ public partial interface IManagedClustersOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetUpgradeProfileWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetUpgradeProfileWithHttpMessagesAsync(string resourceGroupName, string resourceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets an access profile of a managed cluster. + /// **WARNING**: This API will be deprecated. Instead use [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) or [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) . /// /// - /// **WARNING**: This API will be deprecated. Instead use - /// [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) - /// or - /// [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) - /// . + /// **WARNING**: This API will be deprecated. Instead use [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) or [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) . /// /// /// The name of the resource group. The name is case insensitive. @@ -168,20 +152,20 @@ public partial interface IManagedClustersOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - [System.Obsolete("This operation is deprecated. Please do not use it any longer.")] - Task> GetAccessProfileWithHttpMessagesAsync(string resourceGroupName, string resourceName, string roleName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetAccessProfileWithHttpMessagesAsync(string resourceGroupName, string resourceName, string roleName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Lists the admin credentials of a managed cluster. /// + /// + /// Lists the admin credentials of a managed cluster. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -203,13 +187,14 @@ public partial interface IManagedClustersOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> ListClusterAdminCredentialsWithHttpMessagesAsync(string resourceGroupName, string resourceName, string serverFqdn = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> ListClusterAdminCredentialsWithHttpMessagesAsync(string resourceGroupName, string resourceName, string serverFqdn = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Lists the user credentials of a managed cluster. /// + /// + /// Lists the user credentials of a managed cluster. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -220,11 +205,7 @@ public partial interface IManagedClustersOperations /// server fqdn type for credentials to be returned /// /// - /// Only apply to AAD clusters, specifies the format of returned - /// kubeconfig. Format 'azure' will return azure auth-provider - /// kubeconfig; format 'exec' will return exec format kubeconfig, which - /// requires kubelogin binary in the path. Possible values include: - /// 'azure', 'exec' + /// Only apply to AAD clusters, specifies the format of returned kubeconfig. Format 'azure' will return azure auth-provider kubeconfig; format 'exec' will return exec format kubeconfig, which requires kubelogin binary in the path. /// /// /// The headers that will be added to request. @@ -238,13 +219,14 @@ public partial interface IManagedClustersOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> ListClusterUserCredentialsWithHttpMessagesAsync(string resourceGroupName, string resourceName, string serverFqdn = default(string), string format = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> ListClusterUserCredentialsWithHttpMessagesAsync(string resourceGroupName, string resourceName, string serverFqdn = default(string), string format = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Lists the cluster monitoring user credentials of a managed cluster. /// + /// + /// Lists the cluster monitoring user credentials of a managed cluster. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -266,13 +248,14 @@ public partial interface IManagedClustersOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> ListClusterMonitoringUserCredentialsWithHttpMessagesAsync(string resourceGroupName, string resourceName, string serverFqdn = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> ListClusterMonitoringUserCredentialsWithHttpMessagesAsync(string resourceGroupName, string resourceName, string serverFqdn = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Gets a managed cluster. /// + /// + /// Gets a managed cluster. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -291,13 +274,14 @@ public partial interface IManagedClustersOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string resourceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Creates or updates a managed cluster. /// + /// + /// Creates or updates a managed cluster. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -319,13 +303,14 @@ public partial interface IManagedClustersOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, ManagedCluster parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, ManagedCluster parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Updates tags on a managed cluster. /// + /// + /// Updates tags on a managed cluster. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -347,13 +332,14 @@ public partial interface IManagedClustersOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> UpdateTagsWithHttpMessagesAsync(string resourceGroupName, string resourceName, IDictionary tags = default(IDictionary), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> UpdateTagsWithHttpMessagesAsync(string resourceGroupName, string resourceName, System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Deletes a managed cluster. /// + /// + /// Deletes a managed cluster. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -369,16 +355,13 @@ public partial interface IManagedClustersOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task> DeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> DeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Reset the Service Principal Profile of a managed cluster. + /// This action cannot be performed on a cluster that is not using a service principal /// /// - /// This action cannot be performed on a cluster that is not using a - /// service principal + /// This action cannot be performed on a cluster that is not using a service principal /// /// /// The name of the resource group. The name is case insensitive. @@ -398,17 +381,13 @@ public partial interface IManagedClustersOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task> ResetServicePrincipalProfileWithHttpMessagesAsync(string resourceGroupName, string resourceName, ManagedClusterServicePrincipalProfile parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> ResetServicePrincipalProfileWithHttpMessagesAsync(string resourceGroupName, string resourceName, ManagedClusterServicePrincipalProfile parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Reset the AAD Profile of a managed cluster. + /// **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. /// /// - /// **WARNING**: This API will be deprecated. Please see [AKS-managed - /// Azure Active Directory integration](https://aka.ms/aks-managed-aad) - /// to update your cluster with AKS-managed Azure AD. + /// **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. /// /// /// The name of the resource group. The name is case insensitive. @@ -425,21 +404,16 @@ public partial interface IManagedClustersOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - [System.Obsolete("This operation is deprecated. Please do not use it any longer.")] - Task> ResetAADProfileWithHttpMessagesAsync(string resourceGroupName, string resourceName, ManagedClusterAADProfile parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> ResetAADProfileWithHttpMessagesAsync(string resourceGroupName, string resourceName, ManagedClusterAADProfile parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Rotates the certificates of a managed cluster. + /// See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about rotating managed cluster certificates. /// /// - /// See [Certificate - /// rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) - /// for more details about rotating managed cluster certificates. + /// See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about rotating managed cluster certificates. /// /// /// The name of the resource group. The name is case insensitive. @@ -456,19 +430,13 @@ public partial interface IManagedClustersOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task> RotateClusterCertificatesWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> RotateClusterCertificatesWithHttpMessagesAsync(string resourceGroupName, string resourceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Aborts last operation running on managed cluster. + /// Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, a 409 error code is returned. /// /// - /// Aborts the currently running operation on the managed cluster. The - /// Managed Cluster will be moved to a Canceling state and eventually - /// to a Canceled state when cancellation finishes. If the operation - /// completes before cancellation can take place, a 409 error code is - /// returned. + /// Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, a 409 error code is returned. /// /// /// The name of the resource group. The name is case insensitive. @@ -485,13 +453,14 @@ public partial interface IManagedClustersOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task> AbortLatestOperationWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> AbortLatestOperationWithHttpMessagesAsync(string resourceGroupName, string resourceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Rotates the service account signing keys of a managed cluster. /// + /// + /// Rotates the service account signing keys of a managed cluster. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -507,21 +476,13 @@ public partial interface IManagedClustersOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task> RotateServiceAccountSigningKeysWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> RotateServiceAccountSigningKeysWithHttpMessagesAsync(string resourceGroupName, string resourceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Stops a Managed Cluster + /// This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about stopping a cluster. /// /// - /// This can only be performed on Azure Virtual Machine Scale set - /// backed clusters. Stopping a cluster stops the control plane and - /// agent nodes entirely, while maintaining all object and cluster - /// state. A cluster does not accrue charges while it is stopped. See - /// [stopping a - /// cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) - /// for more details about stopping a cluster. + /// This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about stopping a cluster. /// /// /// The name of the resource group. The name is case insensitive. @@ -538,17 +499,13 @@ public partial interface IManagedClustersOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task> StopWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> StopWithHttpMessagesAsync(string resourceGroupName, string resourceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Starts a previously stopped Managed Cluster + /// See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting a cluster. /// /// - /// See [starting a - /// cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) - /// for more details about starting a cluster. + /// See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting a cluster. /// /// /// The name of the resource group. The name is case insensitive. @@ -565,17 +522,13 @@ public partial interface IManagedClustersOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task> StartWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> StartWithHttpMessagesAsync(string resourceGroupName, string resourceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Submits a command to run against the Managed Cluster. + /// AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). /// /// - /// AKS will create a pod to run the command. This is primarily useful - /// for private clusters. For more information see [AKS Run - /// Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + /// AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). /// /// /// The name of the resource group. The name is case insensitive. @@ -598,14 +551,14 @@ public partial interface IManagedClustersOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> RunCommandWithHttpMessagesAsync(string resourceGroupName, string resourceName, RunCommandRequest requestPayload, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> RunCommandWithHttpMessagesAsync(string resourceGroupName, string resourceName, RunCommandRequest requestPayload, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets the results of a command which has been run on the Managed - /// Cluster. + /// Gets the results of a command which has been run on the Managed Cluster. /// + /// + /// Gets the results of a command which has been run on the Managed Cluster. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -627,18 +580,13 @@ public partial interface IManagedClustersOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetCommandResultWithHttpMessagesAsync(string resourceGroupName, string resourceName, string commandId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetCommandResultWithHttpMessagesAsync(string resourceGroupName, string resourceName, string commandId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets a list of egress endpoints (network endpoints of all outbound - /// dependencies) in the specified managed cluster. + /// Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed cluster. The operation returns properties of each egress endpoint. /// /// - /// Gets a list of egress endpoints (network endpoints of all outbound - /// dependencies) in the specified managed cluster. The operation - /// returns properties of each egress endpoint. + /// Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed cluster. The operation returns properties of each egress endpoint. /// /// /// The name of the resource group. The name is case insensitive. @@ -658,13 +606,14 @@ public partial interface IManagedClustersOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListOutboundNetworkDependenciesEndpointsWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListOutboundNetworkDependenciesEndpointsWithHttpMessagesAsync(string resourceGroupName, string resourceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Creates or updates a managed cluster. /// + /// + /// Creates or updates a managed cluster. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -686,13 +635,14 @@ public partial interface IManagedClustersOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, ManagedCluster parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, ManagedCluster parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Updates tags on a managed cluster. /// + /// + /// Updates tags on a managed cluster. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -714,13 +664,14 @@ public partial interface IManagedClustersOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginUpdateTagsWithHttpMessagesAsync(string resourceGroupName, string resourceName, IDictionary tags = default(IDictionary), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginUpdateTagsWithHttpMessagesAsync(string resourceGroupName, string resourceName, System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Deletes a managed cluster. /// + /// + /// Deletes a managed cluster. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -736,16 +687,13 @@ public partial interface IManagedClustersOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Reset the Service Principal Profile of a managed cluster. + /// This action cannot be performed on a cluster that is not using a service principal /// /// - /// This action cannot be performed on a cluster that is not using a - /// service principal + /// This action cannot be performed on a cluster that is not using a service principal /// /// /// The name of the resource group. The name is case insensitive. @@ -765,17 +713,13 @@ public partial interface IManagedClustersOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginResetServicePrincipalProfileWithHttpMessagesAsync(string resourceGroupName, string resourceName, ManagedClusterServicePrincipalProfile parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginResetServicePrincipalProfileWithHttpMessagesAsync(string resourceGroupName, string resourceName, ManagedClusterServicePrincipalProfile parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Reset the AAD Profile of a managed cluster. + /// **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. /// /// - /// **WARNING**: This API will be deprecated. Please see [AKS-managed - /// Azure Active Directory integration](https://aka.ms/aks-managed-aad) - /// to update your cluster with AKS-managed Azure AD. + /// **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. /// /// /// The name of the resource group. The name is case insensitive. @@ -792,21 +736,16 @@ public partial interface IManagedClustersOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - [System.Obsolete("This operation is deprecated. Please do not use it any longer.")] - Task> BeginResetAADProfileWithHttpMessagesAsync(string resourceGroupName, string resourceName, ManagedClusterAADProfile parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginResetAADProfileWithHttpMessagesAsync(string resourceGroupName, string resourceName, ManagedClusterAADProfile parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Rotates the certificates of a managed cluster. + /// See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about rotating managed cluster certificates. /// /// - /// See [Certificate - /// rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) - /// for more details about rotating managed cluster certificates. + /// See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about rotating managed cluster certificates. /// /// /// The name of the resource group. The name is case insensitive. @@ -823,19 +762,13 @@ public partial interface IManagedClustersOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginRotateClusterCertificatesWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginRotateClusterCertificatesWithHttpMessagesAsync(string resourceGroupName, string resourceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Aborts last operation running on managed cluster. + /// Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, a 409 error code is returned. /// /// - /// Aborts the currently running operation on the managed cluster. The - /// Managed Cluster will be moved to a Canceling state and eventually - /// to a Canceled state when cancellation finishes. If the operation - /// completes before cancellation can take place, a 409 error code is - /// returned. + /// Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, a 409 error code is returned. /// /// /// The name of the resource group. The name is case insensitive. @@ -852,13 +785,14 @@ public partial interface IManagedClustersOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginAbortLatestOperationWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginAbortLatestOperationWithHttpMessagesAsync(string resourceGroupName, string resourceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Rotates the service account signing keys of a managed cluster. /// + /// + /// Rotates the service account signing keys of a managed cluster. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -874,21 +808,13 @@ public partial interface IManagedClustersOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginRotateServiceAccountSigningKeysWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginRotateServiceAccountSigningKeysWithHttpMessagesAsync(string resourceGroupName, string resourceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Stops a Managed Cluster + /// This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about stopping a cluster. /// /// - /// This can only be performed on Azure Virtual Machine Scale set - /// backed clusters. Stopping a cluster stops the control plane and - /// agent nodes entirely, while maintaining all object and cluster - /// state. A cluster does not accrue charges while it is stopped. See - /// [stopping a - /// cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) - /// for more details about stopping a cluster. + /// This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about stopping a cluster. /// /// /// The name of the resource group. The name is case insensitive. @@ -905,17 +831,13 @@ public partial interface IManagedClustersOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginStopWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginStopWithHttpMessagesAsync(string resourceGroupName, string resourceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Starts a previously stopped Managed Cluster + /// See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting a cluster. /// /// - /// See [starting a - /// cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) - /// for more details about starting a cluster. + /// See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting a cluster. /// /// /// The name of the resource group. The name is case insensitive. @@ -932,17 +854,13 @@ public partial interface IManagedClustersOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginStartWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginStartWithHttpMessagesAsync(string resourceGroupName, string resourceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Submits a command to run against the Managed Cluster. + /// AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). /// /// - /// AKS will create a pod to run the command. This is primarily useful - /// for private clusters. For more information see [AKS Run - /// Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + /// AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). /// /// /// The name of the resource group. The name is case insensitive. @@ -965,13 +883,14 @@ public partial interface IManagedClustersOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginRunCommandWithHttpMessagesAsync(string resourceGroupName, string resourceName, RunCommandRequest requestPayload, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> BeginRunCommandWithHttpMessagesAsync(string resourceGroupName, string resourceName, RunCommandRequest requestPayload, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Gets a list of managed clusters in the specified subscription. /// + /// + /// Gets a list of managed clusters in the specified subscription. + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -987,14 +906,14 @@ public partial interface IManagedClustersOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Lists managed clusters in the specified subscription and resource - /// group. + /// Lists managed clusters in the specified subscription and resource group. /// + /// + /// Lists managed clusters in the specified subscription and resource group. + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -1010,18 +929,13 @@ public partial interface IManagedClustersOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets a list of egress endpoints (network endpoints of all outbound - /// dependencies) in the specified managed cluster. + /// Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed cluster. The operation returns properties of each egress endpoint. /// /// - /// Gets a list of egress endpoints (network endpoints of all outbound - /// dependencies) in the specified managed cluster. The operation - /// returns properties of each egress endpoint. + /// Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed cluster. The operation returns properties of each egress endpoint. /// /// /// The NextLink from the previous successful call to List operation. @@ -1038,9 +952,7 @@ public partial interface IManagedClustersOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListOutboundNetworkDependenciesEndpointsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListOutboundNetworkDependenciesEndpointsNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/IOperations.cs b/src/Aks/Aks.Sdk/Generated/IOperations.cs index b8bbbe9eb5c7..2b1598c741f9 100644 --- a/src/Aks/Aks.Sdk/Generated/IOperations.cs +++ b/src/Aks/Aks.Sdk/Generated/IOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// Operations operations. @@ -26,6 +16,9 @@ public partial interface IOperations /// /// Gets a list of operations. /// + /// + /// Gets a list of operations. + /// /// /// The headers that will be added to request. /// @@ -38,9 +31,7 @@ public partial interface IOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/IPrivateEndpointConnectionsOperations.cs b/src/Aks/Aks.Sdk/Generated/IPrivateEndpointConnectionsOperations.cs index c7215b26ffaf..4b505a2ca1ef 100644 --- a/src/Aks/Aks.Sdk/Generated/IPrivateEndpointConnectionsOperations.cs +++ b/src/Aks/Aks.Sdk/Generated/IPrivateEndpointConnectionsOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// PrivateEndpointConnectionsOperations operations. @@ -24,12 +14,10 @@ namespace Microsoft.Azure.Management.ContainerService public partial interface IPrivateEndpointConnectionsOperations { /// - /// Gets a list of private endpoint connections in the specified - /// managed cluster. + /// To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters /// /// - /// To learn more about private clusters, see: - /// https://docs.microsoft.com/azure/aks/private-clusters + /// To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters /// /// /// The name of the resource group. The name is case insensitive. @@ -49,16 +37,13 @@ public partial interface IPrivateEndpointConnectionsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> ListWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> ListWithHttpMessagesAsync(string resourceGroupName, string resourceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// - /// Gets the specified private endpoint connection. + /// To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters /// /// - /// To learn more about private clusters, see: - /// https://docs.microsoft.com/azure/aks/private-clusters + /// To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters /// /// /// The name of the resource group. The name is case insensitive. @@ -81,13 +66,14 @@ public partial interface IPrivateEndpointConnectionsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string resourceGroupName, string resourceName, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string resourceName, string privateEndpointConnectionName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Updates a private endpoint connection. /// + /// + /// Updates a private endpoint connection. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -112,13 +98,14 @@ public partial interface IPrivateEndpointConnectionsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, string privateEndpointConnectionName, PrivateEndpointConnection parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, string privateEndpointConnectionName, PrivateEndpointConnection parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Deletes a private endpoint connection. /// + /// + /// Deletes a private endpoint connection. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -137,13 +124,14 @@ public partial interface IPrivateEndpointConnectionsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task DeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, string privateEndpointConnectionName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Deletes a private endpoint connection. /// + /// + /// Deletes a private endpoint connection. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -162,9 +150,7 @@ public partial interface IPrivateEndpointConnectionsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, string privateEndpointConnectionName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/IPrivateLinkResourcesOperations.cs b/src/Aks/Aks.Sdk/Generated/IPrivateLinkResourcesOperations.cs index 3a8134d0ca55..6345b22d1b40 100644 --- a/src/Aks/Aks.Sdk/Generated/IPrivateLinkResourcesOperations.cs +++ b/src/Aks/Aks.Sdk/Generated/IPrivateLinkResourcesOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// PrivateLinkResourcesOperations operations. @@ -24,12 +14,10 @@ namespace Microsoft.Azure.Management.ContainerService public partial interface IPrivateLinkResourcesOperations { /// - /// Gets a list of private link resources in the specified managed - /// cluster. + /// To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters /// /// - /// To learn more about private clusters, see: - /// https://docs.microsoft.com/azure/aks/private-clusters + /// To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters /// /// /// The name of the resource group. The name is case insensitive. @@ -49,9 +37,7 @@ public partial interface IPrivateLinkResourcesOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> ListWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> ListWithHttpMessagesAsync(string resourceGroupName, string resourceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/IResolvePrivateLinkServiceIdOperations.cs b/src/Aks/Aks.Sdk/Generated/IResolvePrivateLinkServiceIdOperations.cs index 743ac50836f1..2dad524d14cc 100644 --- a/src/Aks/Aks.Sdk/Generated/IResolvePrivateLinkServiceIdOperations.cs +++ b/src/Aks/Aks.Sdk/Generated/IResolvePrivateLinkServiceIdOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// ResolvePrivateLinkServiceIdOperations operations. @@ -26,6 +16,9 @@ public partial interface IResolvePrivateLinkServiceIdOperations /// /// Gets the private link service ID for the specified managed cluster. /// + /// + /// Gets the private link service ID for the specified managed cluster. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -47,9 +40,7 @@ public partial interface IResolvePrivateLinkServiceIdOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> POSTWithHttpMessagesAsync(string resourceGroupName, string resourceName, PrivateLinkResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> PostWithHttpMessagesAsync(string resourceGroupName, string resourceName, PrivateLinkResource parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/ISnapshotsOperations.cs b/src/Aks/Aks.Sdk/Generated/ISnapshotsOperations.cs index 604e546f73f3..dd77dccbaccf 100644 --- a/src/Aks/Aks.Sdk/Generated/ISnapshotsOperations.cs +++ b/src/Aks/Aks.Sdk/Generated/ISnapshotsOperations.cs @@ -1,22 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// /// SnapshotsOperations operations. @@ -26,6 +16,9 @@ public partial interface ISnapshotsOperations /// /// Gets a list of snapshots in the specified subscription. /// + /// + /// Gets a list of snapshots in the specified subscription. + /// /// /// The headers that will be added to request. /// @@ -38,13 +31,14 @@ public partial interface ISnapshotsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Lists snapshots in the specified subscription and resource group. /// + /// + /// Lists snapshots in the specified subscription and resource group. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -60,13 +54,14 @@ public partial interface ISnapshotsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Gets a snapshot. /// + /// + /// Gets a snapshot. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -85,13 +80,14 @@ public partial interface ISnapshotsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string resourceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Creates or updates a snapshot. /// + /// + /// Creates or updates a snapshot. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -113,13 +109,14 @@ public partial interface ISnapshotsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, Snapshot parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, Snapshot parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Updates tags on a snapshot. /// + /// + /// Updates tags on a snapshot. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -141,13 +138,14 @@ public partial interface ISnapshotsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task> UpdateTagsWithHttpMessagesAsync(string resourceGroupName, string resourceName, IDictionary tags = default(IDictionary), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task> UpdateTagsWithHttpMessagesAsync(string resourceGroupName, string resourceName, System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Deletes a snapshot. /// + /// + /// Deletes a snapshot. + /// /// /// The name of the resource group. The name is case insensitive. /// @@ -163,13 +161,14 @@ public partial interface ISnapshotsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when a required parameter is null - /// - Task DeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Gets a list of snapshots in the specified subscription. /// + /// + /// Gets a list of snapshots in the specified subscription. + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -185,13 +184,14 @@ public partial interface ISnapshotsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Lists snapshots in the specified subscription and resource group. /// + /// + /// Lists snapshots in the specified subscription and resource group. + /// /// /// The NextLink from the previous successful call to List operation. /// @@ -207,9 +207,7 @@ public partial interface ISnapshotsOperations /// /// Thrown when unable to deserialize the response /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + System.Threading.Tasks.Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/MaintenanceConfigurationsOperations.cs b/src/Aks/Aks.Sdk/Generated/MaintenanceConfigurationsOperations.cs index 7c28a1eeae51..7b93f55955ff 100644 --- a/src/Aks/Aks.Sdk/Generated/MaintenanceConfigurationsOperations.cs +++ b/src/Aks/Aks.Sdk/Generated/MaintenanceConfigurationsOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// MaintenanceConfigurationsOperations operations. /// - internal partial class MaintenanceConfigurationsOperations : IServiceOperations, IMaintenanceConfigurationsOperations + internal partial class MaintenanceConfigurationsOperations : Microsoft.Rest.IServiceOperations, IMaintenanceConfigurationsOperations { /// /// Initializes a new instance of the MaintenanceConfigurationsOperations class. @@ -36,13 +24,13 @@ internal partial class MaintenanceConfigurationsOperations : IServiceOperations< /// /// Thrown when a required parameter is null /// - internal MaintenanceConfigurationsOperations(ContainerServiceClient client) + internal MaintenanceConfigurationsOperations (ContainerServiceClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -65,13 +53,13 @@ internal MaintenanceConfigurationsOperations(ContainerServiceClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -80,111 +68,112 @@ internal MaintenanceConfigurationsOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListByManagedClusterWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListByManagedClusterWithHttpMessagesAsync(string resourceGroupName, string resourceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) + + + + + if (this.Client.ApiVersion == null) { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.SubscriptionId != null) + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } if (resourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceName"); } if (resourceName != null) { if (resourceName.Length > 63) { - throw new ValidationException(ValidationRules.MaxLength, "resourceName", 63); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceName", 63); } if (resourceName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceName, "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByManagedCluster", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByManagedCluster", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -196,55 +185,56 @@ internal MaintenanceConfigurationsOperations(ContainerServiceClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -254,9 +244,10 @@ internal MaintenanceConfigurationsOperations(ContainerServiceClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -267,25 +258,29 @@ internal MaintenanceConfigurationsOperations(ContainerServiceClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Gets the specified maintenance configuration of a managed cluster. /// @@ -304,13 +299,13 @@ internal MaintenanceConfigurationsOperations(ContainerServiceClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -319,117 +314,119 @@ internal MaintenanceConfigurationsOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string resourceName, string configName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string resourceName, string configName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) + + + + + if (this.Client.ApiVersion == null) { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.SubscriptionId != null) + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } if (resourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceName"); } if (resourceName != null) { if (resourceName.Length > 63) { - throw new ValidationException(ValidationRules.MaxLength, "resourceName", 63); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceName", 63); } if (resourceName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceName, "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } if (configName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "configName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "configName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); tracingParameters.Add("configName", configName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); _url = _url.Replace("{configName}", System.Uri.EscapeDataString(configName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -441,55 +438,56 @@ internal MaintenanceConfigurationsOperations(ContainerServiceClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -499,9 +497,10 @@ internal MaintenanceConfigurationsOperations(ContainerServiceClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -512,28 +511,31 @@ internal MaintenanceConfigurationsOperations(ContainerServiceClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Creates or updates a maintenance configuration in the specified managed - /// cluster. + /// Creates or updates a maintenance configuration in the specified managed cluster. /// /// /// The name of the resource group. The name is case insensitive. @@ -553,13 +555,13 @@ internal MaintenanceConfigurationsOperations(ContainerServiceClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -568,122 +570,125 @@ internal MaintenanceConfigurationsOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, string configName, MaintenanceConfiguration parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, string configName, MaintenanceConfiguration parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (parameters == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); } - if (Client.ApiVersion != null) + + if (this.Client.ApiVersion == null) { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.SubscriptionId != null) + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } if (resourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceName"); } if (resourceName != null) { if (resourceName.Length > 63) { - throw new ValidationException(ValidationRules.MaxLength, "resourceName", 63); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceName", 63); } if (resourceName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceName, "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } if (configName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "configName"); - } - if (parameters == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "configName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); tracingParameters.Add("configName", configName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); _url = _url.Replace("{configName}", System.Uri.EscapeDataString(configName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PUT"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -695,61 +700,62 @@ internal MaintenanceConfigurationsOperations(ContainerServiceClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(parameters != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -759,9 +765,10 @@ internal MaintenanceConfigurationsOperations(ContainerServiceClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -772,25 +779,29 @@ internal MaintenanceConfigurationsOperations(ContainerServiceClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Deletes a maintenance configuration. /// @@ -809,10 +820,10 @@ internal MaintenanceConfigurationsOperations(ContainerServiceClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -821,117 +832,119 @@ internal MaintenanceConfigurationsOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, string configName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, string configName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) + + + + + if (this.Client.ApiVersion == null) { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.SubscriptionId != null) + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } if (resourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceName"); } if (resourceName != null) { if (resourceName.Length > 63) { - throw new ValidationException(ValidationRules.MaxLength, "resourceName", 63); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceName", 63); } if (resourceName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceName, "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } if (configName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "configName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "configName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); tracingParameters.Add("configName", configName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); _url = _url.Replace("{configName}", System.Uri.EscapeDataString(configName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("DELETE"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -943,55 +956,56 @@ internal MaintenanceConfigurationsOperations(ContainerServiceClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 204) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1001,20 +1015,25 @@ internal MaintenanceConfigurationsOperations(ContainerServiceClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Gets a list of maintenance configurations in the specified managed cluster. /// @@ -1027,13 +1046,13 @@ internal MaintenanceConfigurationsOperations(ContainerServiceClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -1042,51 +1061,53 @@ internal MaintenanceConfigurationsOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListByManagedClusterNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListByManagedClusterNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByManagedClusterNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByManagedClusterNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1098,55 +1119,56 @@ internal MaintenanceConfigurationsOperations(ContainerServiceClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1156,9 +1178,10 @@ internal MaintenanceConfigurationsOperations(ContainerServiceClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -1169,24 +1192,28 @@ internal MaintenanceConfigurationsOperations(ContainerServiceClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/MaintenanceConfigurationsOperationsExtensions.cs b/src/Aks/Aks.Sdk/Generated/MaintenanceConfigurationsOperationsExtensions.cs index b50c1e74eaa7..9609ef26cc71 100644 --- a/src/Aks/Aks.Sdk/Generated/MaintenanceConfigurationsOperationsExtensions.cs +++ b/src/Aks/Aks.Sdk/Generated/MaintenanceConfigurationsOperationsExtensions.cs @@ -1,242 +1,220 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for MaintenanceConfigurationsOperations. + /// Extension methods for MaintenanceConfigurationsOperations /// public static partial class MaintenanceConfigurationsOperationsExtensions { - /// - /// Gets a list of maintenance configurations in the specified managed cluster. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - public static IPage ListByManagedCluster(this IMaintenanceConfigurationsOperations operations, string resourceGroupName, string resourceName) - { - return operations.ListByManagedClusterAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); - } - - /// - /// Gets a list of maintenance configurations in the specified managed cluster. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The cancellation token. - /// - public static async Task> ListByManagedClusterAsync(this IMaintenanceConfigurationsOperations operations, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByManagedClusterWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the specified maintenance configuration of a managed cluster. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The name of the maintenance configuration. - /// - public static MaintenanceConfiguration Get(this IMaintenanceConfigurationsOperations operations, string resourceGroupName, string resourceName, string configName) - { - return operations.GetAsync(resourceGroupName, resourceName, configName).GetAwaiter().GetResult(); - } + /// + /// Gets a list of maintenance configurations in the specified managed cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + public static Microsoft.Rest.Azure.IPage ListByManagedCluster(this IMaintenanceConfigurationsOperations operations, string resourceGroupName, string resourceName) + { + return ((IMaintenanceConfigurationsOperations)operations).ListByManagedClusterAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); + } - /// - /// Gets the specified maintenance configuration of a managed cluster. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The name of the maintenance configuration. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IMaintenanceConfigurationsOperations operations, string resourceGroupName, string resourceName, string configName, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Gets a list of maintenance configurations in the specified managed cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListByManagedClusterAsync(this IMaintenanceConfigurationsOperations operations, string resourceGroupName, string resourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListByManagedClusterWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, resourceName, configName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// Gets the specified maintenance configuration of a managed cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the maintenance configuration. + /// + public static MaintenanceConfiguration Get(this IMaintenanceConfigurationsOperations operations, string resourceGroupName, string resourceName, string configName) + { + return ((IMaintenanceConfigurationsOperations)operations).GetAsync(resourceGroupName, resourceName, configName).GetAwaiter().GetResult(); + } - /// - /// Creates or updates a maintenance configuration in the specified managed - /// cluster. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The name of the maintenance configuration. - /// - /// - /// The maintenance configuration to create or update. - /// - public static MaintenanceConfiguration CreateOrUpdate(this IMaintenanceConfigurationsOperations operations, string resourceGroupName, string resourceName, string configName, MaintenanceConfiguration parameters) + /// + /// Gets the specified maintenance configuration of a managed cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the maintenance configuration. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IMaintenanceConfigurationsOperations operations, string resourceGroupName, string resourceName, string configName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, resourceName, configName, null, cancellationToken).ConfigureAwait(false)) { - return operations.CreateOrUpdateAsync(resourceGroupName, resourceName, configName, parameters).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// Creates or updates a maintenance configuration in the specified managed cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the maintenance configuration. + /// + public static MaintenanceConfiguration CreateOrUpdate(this IMaintenanceConfigurationsOperations operations, string resourceGroupName, string resourceName, string configName, MaintenanceConfiguration parameters) + { + return ((IMaintenanceConfigurationsOperations)operations).CreateOrUpdateAsync(resourceGroupName, resourceName, configName, parameters).GetAwaiter().GetResult(); + } - /// - /// Creates or updates a maintenance configuration in the specified managed - /// cluster. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The name of the maintenance configuration. - /// - /// - /// The maintenance configuration to create or update. - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateAsync(this IMaintenanceConfigurationsOperations operations, string resourceGroupName, string resourceName, string configName, MaintenanceConfiguration parameters, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Creates or updates a maintenance configuration in the specified managed cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the maintenance configuration. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CreateOrUpdateAsync(this IMaintenanceConfigurationsOperations operations, string resourceGroupName, string resourceName, string configName, MaintenanceConfiguration parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, resourceName, configName, parameters, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, resourceName, configName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// Deletes a maintenance configuration. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the maintenance configuration. + /// + public static void Delete(this IMaintenanceConfigurationsOperations operations, string resourceGroupName, string resourceName, string configName) + { + ((IMaintenanceConfigurationsOperations)operations).DeleteAsync(resourceGroupName, resourceName, configName).GetAwaiter().GetResult(); + } - /// - /// Deletes a maintenance configuration. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The name of the maintenance configuration. - /// - public static void Delete(this IMaintenanceConfigurationsOperations operations, string resourceGroupName, string resourceName, string configName) - { - operations.DeleteAsync(resourceGroupName, resourceName, configName).GetAwaiter().GetResult(); - } - - /// - /// Deletes a maintenance configuration. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The name of the maintenance configuration. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteAsync(this IMaintenanceConfigurationsOperations operations, string resourceGroupName, string resourceName, string configName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, resourceName, configName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } + /// + /// Deletes a maintenance configuration. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the maintenance configuration. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task DeleteAsync(this IMaintenanceConfigurationsOperations operations, string resourceGroupName, string resourceName, string configName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, resourceName, configName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Gets a list of maintenance configurations in the specified managed cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListByManagedClusterNext(this IMaintenanceConfigurationsOperations operations, string nextPageLink) + { + return ((IMaintenanceConfigurationsOperations)operations).ListByManagedClusterNextAsync(nextPageLink).GetAwaiter().GetResult(); + } - /// - /// Gets a list of maintenance configurations in the specified managed cluster. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListByManagedClusterNext(this IMaintenanceConfigurationsOperations operations, string nextPageLink) + /// + /// Gets a list of maintenance configurations in the specified managed cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListByManagedClusterNextAsync(this IMaintenanceConfigurationsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListByManagedClusterNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { - return operations.ListByManagedClusterNextAsync(nextPageLink).GetAwaiter().GetResult(); + return _result.Body; } - - /// - /// Gets a list of maintenance configurations in the specified managed cluster. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListByManagedClusterNextAsync(this IMaintenanceConfigurationsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByManagedClusterNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - + } } } diff --git a/src/Aks/Aks.Sdk/Generated/ManagedClustersOperations.cs b/src/Aks/Aks.Sdk/Generated/ManagedClustersOperations.cs index 5a71652504c2..a12362707092 100644 --- a/src/Aks/Aks.Sdk/Generated/ManagedClustersOperations.cs +++ b/src/Aks/Aks.Sdk/Generated/ManagedClustersOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// ManagedClustersOperations operations. /// - internal partial class ManagedClustersOperations : IServiceOperations, IManagedClustersOperations + internal partial class ManagedClustersOperations : Microsoft.Rest.IServiceOperations, IManagedClustersOperations { /// /// Initializes a new instance of the ManagedClustersOperations class. @@ -36,13 +24,13 @@ internal partial class ManagedClustersOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal ManagedClustersOperations(ContainerServiceClient client) + internal ManagedClustersOperations (ContainerServiceClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -65,13 +53,13 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -80,62 +68,65 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetOSOptionsWithHttpMessagesAsync(string location, string resourceType = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetOSOptionsWithHttpMessagesAsync(string location, string resourceType = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) + + + + + if (this.Client.ApiVersion == null) { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.SubscriptionId != null) + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } if (location == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "location"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "location"); } if (location != null) { if (location.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "location", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "location", 1); } } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("location", location); tracingParameters.Add("resourceType", resourceType); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetOSOptions", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "GetOSOptions", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/osOptions/default").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{location}", System.Uri.EscapeDataString(location)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (resourceType != null) { @@ -146,25 +137,24 @@ internal ManagedClustersOperations(ContainerServiceClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -176,55 +166,56 @@ internal ManagedClustersOperations(ContainerServiceClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -234,9 +225,10 @@ internal ManagedClustersOperations(ContainerServiceClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -247,33 +239,32 @@ internal ManagedClustersOperations(ContainerServiceClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Gets a list of supported Kubernetes versions in the specified subscription. + /// Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and details on preview status of the version /// - /// - /// Contains extra metadata on the version, including supported patch versions, - /// capabilities, available upgrades, and details on preview status of the - /// version - /// /// /// The name of Azure region. /// @@ -283,13 +274,13 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -298,86 +289,87 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - public async Task> ListKubernetesVersionsWithHttpMessagesAsync(string location, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> ListKubernetesVersionsWithHttpMessagesAsync(string location, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) + + + + + if (this.Client.ApiVersion == null) { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.SubscriptionId != null) + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } if (location == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "location"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "location"); } if (location != null) { if (location.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "location", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "location", 1); } } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("location", location); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListKubernetesVersions", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListKubernetesVersions", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/kubernetesVersions").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{location}", System.Uri.EscapeDataString(location)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -389,55 +381,56 @@ internal ManagedClustersOperations(ContainerServiceClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -447,9 +440,10 @@ internal ManagedClustersOperations(ContainerServiceClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -460,25 +454,29 @@ internal ManagedClustersOperations(ContainerServiceClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Gets a list of managed clusters in the specified subscription. /// @@ -488,13 +486,13 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -503,73 +501,74 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) + + + + + if (this.Client.ApiVersion == null) { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.SubscriptionId != null) + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -581,55 +580,56 @@ internal ManagedClustersOperations(ContainerServiceClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -639,9 +639,10 @@ internal ManagedClustersOperations(ContainerServiceClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -652,25 +653,29 @@ internal ManagedClustersOperations(ContainerServiceClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Lists managed clusters in the specified subscription and resource group. /// @@ -683,13 +688,13 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -698,90 +703,91 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) + + + + + if (this.Client.ApiVersion == null) { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.SubscriptionId != null) + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroup", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroup", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -793,55 +799,56 @@ internal ManagedClustersOperations(ContainerServiceClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -851,9 +858,10 @@ internal ManagedClustersOperations(ContainerServiceClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -864,25 +872,29 @@ internal ManagedClustersOperations(ContainerServiceClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Gets the upgrade profile of a managed cluster. /// @@ -898,13 +910,13 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -913,111 +925,112 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetUpgradeProfileWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetUpgradeProfileWithHttpMessagesAsync(string resourceGroupName, string resourceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) + + + + + if (this.Client.ApiVersion == null) { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.SubscriptionId != null) + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } if (resourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceName"); } if (resourceName != null) { if (resourceName.Length > 63) { - throw new ValidationException(ValidationRules.MaxLength, "resourceName", 63); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceName", 63); } if (resourceName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceName, "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetUpgradeProfile", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "GetUpgradeProfile", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1029,55 +1042,56 @@ internal ManagedClustersOperations(ContainerServiceClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1087,9 +1101,10 @@ internal ManagedClustersOperations(ContainerServiceClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -1100,35 +1115,32 @@ internal ManagedClustersOperations(ContainerServiceClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Gets an access profile of a managed cluster. + /// **WARNING**: This API will be deprecated. Instead use [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) or [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) . /// - /// - /// **WARNING**: This API will be deprecated. Instead use - /// [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) - /// or - /// [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) - /// . - /// /// /// The name of the resource group. The name is case insensitive. /// @@ -1144,13 +1156,13 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -1159,118 +1171,119 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - [System.Obsolete("This operation is deprecated. Please do not use it any longer.")] - public async Task> GetAccessProfileWithHttpMessagesAsync(string resourceGroupName, string resourceName, string roleName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetAccessProfileWithHttpMessagesAsync(string resourceGroupName, string resourceName, string roleName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) + + + + + if (this.Client.ApiVersion == null) { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.SubscriptionId != null) + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } if (resourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceName"); } if (resourceName != null) { if (resourceName.Length > 63) { - throw new ValidationException(ValidationRules.MaxLength, "resourceName", 63); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceName", 63); } if (resourceName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceName, "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } if (roleName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "roleName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "roleName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); tracingParameters.Add("roleName", roleName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetAccessProfile", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "GetAccessProfile", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); _url = _url.Replace("{roleName}", System.Uri.EscapeDataString(roleName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1282,55 +1295,56 @@ internal ManagedClustersOperations(ContainerServiceClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1340,9 +1354,10 @@ internal ManagedClustersOperations(ContainerServiceClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -1353,25 +1368,29 @@ internal ManagedClustersOperations(ContainerServiceClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Lists the admin credentials of a managed cluster. /// @@ -1390,13 +1409,13 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -1405,87 +1424,90 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - public async Task> ListClusterAdminCredentialsWithHttpMessagesAsync(string resourceGroupName, string resourceName, string serverFqdn = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> ListClusterAdminCredentialsWithHttpMessagesAsync(string resourceGroupName, string resourceName, string serverFqdn = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) + + + + + if (this.Client.ApiVersion == null) { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.SubscriptionId != null) + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } if (resourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceName"); } if (resourceName != null) { if (resourceName.Length > 63) { - throw new ValidationException(ValidationRules.MaxLength, "resourceName", 63); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceName", 63); } if (resourceName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceName, "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); tracingParameters.Add("serverFqdn", serverFqdn); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListClusterAdminCredentials", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListClusterAdminCredentials", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (serverFqdn != null) { @@ -1496,25 +1518,24 @@ internal ManagedClustersOperations(ContainerServiceClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1526,55 +1547,56 @@ internal ManagedClustersOperations(ContainerServiceClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1584,9 +1606,10 @@ internal ManagedClustersOperations(ContainerServiceClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -1597,25 +1620,29 @@ internal ManagedClustersOperations(ContainerServiceClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Lists the user credentials of a managed cluster. /// @@ -1629,10 +1656,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// server fqdn type for credentials to be returned /// /// - /// Only apply to AAD clusters, specifies the format of returned kubeconfig. - /// Format 'azure' will return azure auth-provider kubeconfig; format 'exec' - /// will return exec format kubeconfig, which requires kubelogin binary in the - /// path. Possible values include: 'azure', 'exec' + /// Only apply to AAD clusters, specifies the format of returned kubeconfig. Format 'azure' will return azure auth-provider kubeconfig; format 'exec' will return exec format kubeconfig, which requires kubelogin binary in the path. /// /// /// Headers that will be added to request. @@ -1640,13 +1664,13 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -1655,88 +1679,92 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - public async Task> ListClusterUserCredentialsWithHttpMessagesAsync(string resourceGroupName, string resourceName, string serverFqdn = default(string), string format = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> ListClusterUserCredentialsWithHttpMessagesAsync(string resourceGroupName, string resourceName, string serverFqdn = default(string), string format = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) + + + + + if (this.Client.ApiVersion == null) { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.SubscriptionId != null) + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } if (resourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceName"); } if (resourceName != null) { if (resourceName.Length > 63) { - throw new ValidationException(ValidationRules.MaxLength, "resourceName", 63); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceName", 63); } if (resourceName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceName, "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } + + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); tracingParameters.Add("serverFqdn", serverFqdn); tracingParameters.Add("format", format); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListClusterUserCredentials", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListClusterUserCredentials", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (serverFqdn != null) { @@ -1751,25 +1779,24 @@ internal ManagedClustersOperations(ContainerServiceClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1781,55 +1808,56 @@ internal ManagedClustersOperations(ContainerServiceClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1839,9 +1867,10 @@ internal ManagedClustersOperations(ContainerServiceClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -1852,25 +1881,29 @@ internal ManagedClustersOperations(ContainerServiceClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Lists the cluster monitoring user credentials of a managed cluster. /// @@ -1889,13 +1922,13 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -1904,87 +1937,90 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - public async Task> ListClusterMonitoringUserCredentialsWithHttpMessagesAsync(string resourceGroupName, string resourceName, string serverFqdn = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> ListClusterMonitoringUserCredentialsWithHttpMessagesAsync(string resourceGroupName, string resourceName, string serverFqdn = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) + + + + + if (this.Client.ApiVersion == null) { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.SubscriptionId != null) + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } if (resourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceName"); } if (resourceName != null) { if (resourceName.Length > 63) { - throw new ValidationException(ValidationRules.MaxLength, "resourceName", 63); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceName", 63); } if (resourceName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceName, "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); tracingParameters.Add("serverFqdn", serverFqdn); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListClusterMonitoringUserCredentials", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListClusterMonitoringUserCredentials", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterMonitoringUserCredential").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (serverFqdn != null) { @@ -1995,25 +2031,24 @@ internal ManagedClustersOperations(ContainerServiceClient client) _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -2025,55 +2060,56 @@ internal ManagedClustersOperations(ContainerServiceClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -2083,9 +2119,10 @@ internal ManagedClustersOperations(ContainerServiceClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -2096,25 +2133,29 @@ internal ManagedClustersOperations(ContainerServiceClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Gets a managed cluster. /// @@ -2130,13 +2171,13 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -2145,111 +2186,112 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string resourceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) + + + + + if (this.Client.ApiVersion == null) { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.SubscriptionId != null) + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } if (resourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceName"); } if (resourceName != null) { if (resourceName.Length > 63) { - throw new ValidationException(ValidationRules.MaxLength, "resourceName", 63); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceName", 63); } if (resourceName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceName, "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -2261,55 +2303,56 @@ internal ManagedClustersOperations(ContainerServiceClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -2319,9 +2362,10 @@ internal ManagedClustersOperations(ContainerServiceClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -2332,25 +2376,29 @@ internal ManagedClustersOperations(ContainerServiceClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Creates or updates a managed cluster. /// @@ -2364,16 +2412,16 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// The managed cluster to create or update. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, ManagedCluster parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, ManagedCluster parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send Request - AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, resourceName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, resourceName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// @@ -2389,16 +2437,16 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// Resource tags. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> UpdateTagsWithHttpMessagesAsync(string resourceGroupName, string resourceName, IDictionary tags = default(IDictionary), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> UpdateTagsWithHttpMessagesAsync(string resourceGroupName, string resourceName, System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send Request - AzureOperationResponse _response = await BeginUpdateTagsWithHttpMessagesAsync(resourceGroupName, resourceName, tags, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginUpdateTagsWithHttpMessagesAsync(resourceGroupName, resourceName, tags, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// @@ -2411,25 +2459,21 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// The name of the managed cluster resource. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> DeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> DeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationHeaderResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, resourceName, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationHeaderResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, resourceName, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Reset the Service Principal Profile of a managed cluster. + /// This action cannot be performed on a cluster that is not using a service principal /// - /// - /// This action cannot be performed on a cluster that is not using a service - /// principal - /// /// /// The name of the resource group. The name is case insensitive. /// @@ -2440,26 +2484,21 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// The service principal profile to set on the managed cluster. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> ResetServicePrincipalProfileWithHttpMessagesAsync(string resourceGroupName, string resourceName, ManagedClusterServicePrincipalProfile parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> ResetServicePrincipalProfileWithHttpMessagesAsync(string resourceGroupName, string resourceName, ManagedClusterServicePrincipalProfile parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationHeaderResponse _response = await BeginResetServicePrincipalProfileWithHttpMessagesAsync(resourceGroupName, resourceName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationHeaderResponse _response = await BeginResetServicePrincipalProfileWithHttpMessagesAsync(resourceGroupName, resourceName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Reset the AAD Profile of a managed cluster. + /// **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. /// - /// - /// **WARNING**: This API will be deprecated. Please see [AKS-managed Azure - /// Active Directory integration](https://aka.ms/aks-managed-aad) to update - /// your cluster with AKS-managed Azure AD. - /// /// /// The name of the resource group. The name is case insensitive. /// @@ -2470,27 +2509,21 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// The AAD profile to set on the Managed Cluster /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - [System.Obsolete("This operation is deprecated. Please do not use it any longer.")] - public async Task> ResetAADProfileWithHttpMessagesAsync(string resourceGroupName, string resourceName, ManagedClusterAADProfile parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> ResetAADProfileWithHttpMessagesAsync(string resourceGroupName, string resourceName, ManagedClusterAADProfile parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationHeaderResponse _response = await BeginResetAADProfileWithHttpMessagesAsync(resourceGroupName, resourceName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationHeaderResponse _response = await BeginResetAADProfileWithHttpMessagesAsync(resourceGroupName, resourceName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Rotates the certificates of a managed cluster. + /// See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about rotating managed cluster certificates. /// - /// - /// See [Certificate - /// rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for - /// more details about rotating managed cluster certificates. - /// /// /// The name of the resource group. The name is case insensitive. /// @@ -2498,27 +2531,21 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// The name of the managed cluster resource. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> RotateClusterCertificatesWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> RotateClusterCertificatesWithHttpMessagesAsync(string resourceGroupName, string resourceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationHeaderResponse _response = await BeginRotateClusterCertificatesWithHttpMessagesAsync(resourceGroupName, resourceName, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationHeaderResponse _response = await BeginRotateClusterCertificatesWithHttpMessagesAsync(resourceGroupName, resourceName, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Aborts last operation running on managed cluster. + /// Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, a 409 error code is returned. /// - /// - /// Aborts the currently running operation on the managed cluster. The Managed - /// Cluster will be moved to a Canceling state and eventually to a Canceled - /// state when cancellation finishes. If the operation completes before - /// cancellation can take place, a 409 error code is returned. - /// /// /// The name of the resource group. The name is case insensitive. /// @@ -2526,16 +2553,16 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// The name of the managed cluster resource. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> AbortLatestOperationWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> AbortLatestOperationWithHttpMessagesAsync(string resourceGroupName, string resourceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationHeaderResponse _response = await BeginAbortLatestOperationWithHttpMessagesAsync(resourceGroupName, resourceName, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationHeaderResponse _response = await BeginAbortLatestOperationWithHttpMessagesAsync(resourceGroupName, resourceName, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// @@ -2548,29 +2575,21 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// The name of the managed cluster resource. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> RotateServiceAccountSigningKeysWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> RotateServiceAccountSigningKeysWithHttpMessagesAsync(string resourceGroupName, string resourceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationHeaderResponse _response = await BeginRotateServiceAccountSigningKeysWithHttpMessagesAsync(resourceGroupName, resourceName, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationHeaderResponse _response = await BeginRotateServiceAccountSigningKeysWithHttpMessagesAsync(resourceGroupName, resourceName, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Stops a Managed Cluster + /// This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about stopping a cluster. /// - /// - /// This can only be performed on Azure Virtual Machine Scale set backed - /// clusters. Stopping a cluster stops the control plane and agent nodes - /// entirely, while maintaining all object and cluster state. A cluster does - /// not accrue charges while it is stopped. See [stopping a - /// cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more - /// details about stopping a cluster. - /// /// /// The name of the resource group. The name is case insensitive. /// @@ -2578,26 +2597,21 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// The name of the managed cluster resource. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> StopWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> StopWithHttpMessagesAsync(string resourceGroupName, string resourceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationHeaderResponse _response = await BeginStopWithHttpMessagesAsync(resourceGroupName, resourceName, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationHeaderResponse _response = await BeginStopWithHttpMessagesAsync(resourceGroupName, resourceName, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Starts a previously stopped Managed Cluster + /// See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting a cluster. /// - /// - /// See [starting a - /// cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more - /// details about starting a cluster. - /// /// /// The name of the resource group. The name is case insensitive. /// @@ -2605,26 +2619,21 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// The name of the managed cluster resource. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> StartWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> StartWithHttpMessagesAsync(string resourceGroupName, string resourceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationHeaderResponse _response = await BeginStartWithHttpMessagesAsync(resourceGroupName, resourceName, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationHeaderResponse _response = await BeginStartWithHttpMessagesAsync(resourceGroupName, resourceName, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Submits a command to run against the Managed Cluster. + /// AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). /// - /// - /// AKS will create a pod to run the command. This is primarily useful for - /// private clusters. For more information see [AKS Run - /// Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). - /// /// /// The name of the resource group. The name is case insensitive. /// @@ -2635,16 +2644,16 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// The run command request /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task> RunCommandWithHttpMessagesAsync(string resourceGroupName, string resourceName, RunCommandRequest requestPayload, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> RunCommandWithHttpMessagesAsync(string resourceGroupName, string resourceName, RunCommandRequest requestPayload, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginRunCommandWithHttpMessagesAsync(resourceGroupName, resourceName, requestPayload, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginRunCommandWithHttpMessagesAsync(resourceGroupName, resourceName, requestPayload, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// @@ -2665,13 +2674,13 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -2680,117 +2689,119 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetCommandResultWithHttpMessagesAsync(string resourceGroupName, string resourceName, string commandId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetCommandResultWithHttpMessagesAsync(string resourceGroupName, string resourceName, string commandId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) + + + + + if (this.Client.ApiVersion == null) { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.SubscriptionId != null) + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } if (resourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceName"); } if (resourceName != null) { if (resourceName.Length > 63) { - throw new ValidationException(ValidationRules.MaxLength, "resourceName", 63); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceName", 63); } if (resourceName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceName, "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } if (commandId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "commandId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "commandId"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); tracingParameters.Add("commandId", commandId); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetCommandResult", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "GetCommandResult", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/commandResults/{commandId}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); _url = _url.Replace("{commandId}", System.Uri.EscapeDataString(commandId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -2802,55 +2813,56 @@ internal ManagedClustersOperations(ContainerServiceClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -2860,9 +2872,10 @@ internal ManagedClustersOperations(ContainerServiceClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -2873,47 +2886,45 @@ internal ManagedClustersOperations(ContainerServiceClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } try { - _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Gets a list of egress endpoints (network endpoints of all outbound - /// dependencies) in the specified managed cluster. + /// Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed cluster. The operation returns properties of each egress endpoint. /// - /// - /// Gets a list of egress endpoints (network endpoints of all outbound - /// dependencies) in the specified managed cluster. The operation returns - /// properties of each egress endpoint. - /// /// /// The name of the resource group. The name is case insensitive. /// @@ -2926,13 +2937,13 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -2941,111 +2952,112 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListOutboundNetworkDependenciesEndpointsWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListOutboundNetworkDependenciesEndpointsWithHttpMessagesAsync(string resourceGroupName, string resourceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) + + + + + if (this.Client.ApiVersion == null) { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.SubscriptionId != null) + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } if (resourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceName"); } if (resourceName != null) { if (resourceName.Length > 63) { - throw new ValidationException(ValidationRules.MaxLength, "resourceName", 63); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceName", 63); } if (resourceName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceName, "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListOutboundNetworkDependenciesEndpoints", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListOutboundNetworkDependenciesEndpoints", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/outboundNetworkDependenciesEndpoints").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -3057,55 +3069,56 @@ internal ManagedClustersOperations(ContainerServiceClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -3115,9 +3128,10 @@ internal ManagedClustersOperations(ContainerServiceClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -3128,25 +3142,29 @@ internal ManagedClustersOperations(ContainerServiceClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Creates or updates a managed cluster. /// @@ -3165,13 +3183,13 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -3180,120 +3198,121 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, ManagedCluster parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, ManagedCluster parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (parameters == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); } - if (Client.ApiVersion != null) + if (parameters != null) { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + parameters.Validate(); } - if (Client.SubscriptionId == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId != null) + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } if (resourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceName"); } if (resourceName != null) { if (resourceName.Length > 63) { - throw new ValidationException(ValidationRules.MaxLength, "resourceName", 63); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceName", 63); } if (resourceName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceName, "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } - if (parameters == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); - } - if (parameters != null) - { - parameters.Validate(); - } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdate", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdate", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PUT"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -3305,61 +3324,62 @@ internal ManagedClustersOperations(ContainerServiceClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(parameters != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 201) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -3369,9 +3389,10 @@ internal ManagedClustersOperations(ContainerServiceClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -3382,16 +3403,16 @@ internal ManagedClustersOperations(ContainerServiceClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } // Deserialize Response @@ -3400,25 +3421,29 @@ internal ManagedClustersOperations(ContainerServiceClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Updates tags on a managed cluster. /// @@ -3437,13 +3462,13 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -3452,117 +3477,118 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginUpdateTagsWithHttpMessagesAsync(string resourceGroupName, string resourceName, IDictionary tags = default(IDictionary), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginUpdateTagsWithHttpMessagesAsync(string resourceGroupName, string resourceName, System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) + + + + + if (this.Client.ApiVersion == null) { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.SubscriptionId != null) + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } if (resourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceName"); } if (resourceName != null) { if (resourceName.Length > 63) { - throw new ValidationException(ValidationRules.MaxLength, "resourceName", 63); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceName", 63); } if (resourceName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceName, "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } TagsObject parameters = new TagsObject(); - if (tags != null) + if(tags != null) { parameters.Tags = tags; } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginUpdateTags", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginUpdateTags", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PATCH"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PATCH"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -3574,61 +3600,62 @@ internal ManagedClustersOperations(ContainerServiceClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(parameters != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -3638,9 +3665,10 @@ internal ManagedClustersOperations(ContainerServiceClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -3651,25 +3679,29 @@ internal ManagedClustersOperations(ContainerServiceClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Deletes a managed cluster. /// @@ -3685,10 +3717,10 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -3697,111 +3729,112 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) + + + + + if (this.Client.ApiVersion == null) { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.SubscriptionId != null) + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } if (resourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceName"); } if (resourceName != null) { if (resourceName.Length > 63) { - throw new ValidationException(ValidationRules.MaxLength, "resourceName", 63); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceName", 63); } if (resourceName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceName, "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("DELETE"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -3813,55 +3846,56 @@ internal ManagedClustersOperations(ContainerServiceClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 202 && (int)_statusCode != 204) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -3871,40 +3905,41 @@ internal ManagedClustersOperations(ContainerServiceClient client) throw ex; } // Create Result - var _result = new AzureOperationHeaderResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationHeaderResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } try { - _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Reset the Service Principal Profile of a managed cluster. + /// This action cannot be performed on a cluster that is not using a service principal /// - /// - /// This action cannot be performed on a cluster that is not using a service - /// principal - /// /// /// The name of the resource group. The name is case insensitive. /// @@ -3920,10 +3955,10 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -3932,120 +3967,121 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginResetServicePrincipalProfileWithHttpMessagesAsync(string resourceGroupName, string resourceName, ManagedClusterServicePrincipalProfile parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginResetServicePrincipalProfileWithHttpMessagesAsync(string resourceGroupName, string resourceName, ManagedClusterServicePrincipalProfile parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (parameters == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); } - if (Client.ApiVersion != null) + if (parameters != null) { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + parameters.Validate(); } - if (Client.SubscriptionId == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId != null) + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } if (resourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceName"); } if (resourceName != null) { if (resourceName.Length > 63) { - throw new ValidationException(ValidationRules.MaxLength, "resourceName", 63); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceName", 63); } if (resourceName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceName, "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } - if (parameters == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); - } - if (parameters != null) - { - parameters.Validate(); - } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginResetServicePrincipalProfile", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginResetServicePrincipalProfile", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -4057,61 +4093,62 @@ internal ManagedClustersOperations(ContainerServiceClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(parameters != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -4121,41 +4158,41 @@ internal ManagedClustersOperations(ContainerServiceClient client) throw ex; } // Create Result - var _result = new AzureOperationHeaderResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationHeaderResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } try { - _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Reset the AAD Profile of a managed cluster. + /// **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. /// - /// - /// **WARNING**: This API will be deprecated. Please see [AKS-managed Azure - /// Active Directory integration](https://aka.ms/aks-managed-aad) to update - /// your cluster with AKS-managed Azure AD. - /// /// /// The name of the resource group. The name is case insensitive. /// @@ -4171,10 +4208,10 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -4183,117 +4220,118 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - [System.Obsolete("This operation is deprecated. Please do not use it any longer.")] - public async Task> BeginResetAADProfileWithHttpMessagesAsync(string resourceGroupName, string resourceName, ManagedClusterAADProfile parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginResetAADProfileWithHttpMessagesAsync(string resourceGroupName, string resourceName, ManagedClusterAADProfile parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (parameters == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); } - if (Client.ApiVersion != null) + + if (this.Client.ApiVersion == null) { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.SubscriptionId != null) + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } if (resourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceName"); } if (resourceName != null) { if (resourceName.Length > 63) { - throw new ValidationException(ValidationRules.MaxLength, "resourceName", 63); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceName", 63); } if (resourceName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceName, "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } - if (parameters == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); - } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginResetAADProfile", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginResetAADProfile", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -4305,61 +4343,62 @@ internal ManagedClustersOperations(ContainerServiceClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(parameters != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -4369,41 +4408,41 @@ internal ManagedClustersOperations(ContainerServiceClient client) throw ex; } // Create Result - var _result = new AzureOperationHeaderResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationHeaderResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } try { - _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Rotates the certificates of a managed cluster. + /// See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about rotating managed cluster certificates. /// - /// - /// See [Certificate - /// rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for - /// more details about rotating managed cluster certificates. - /// /// /// The name of the resource group. The name is case insensitive. /// @@ -4416,10 +4455,10 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -4428,111 +4467,112 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginRotateClusterCertificatesWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginRotateClusterCertificatesWithHttpMessagesAsync(string resourceGroupName, string resourceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) + + + + + if (this.Client.ApiVersion == null) { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.SubscriptionId != null) + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } if (resourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceName"); } if (resourceName != null) { if (resourceName.Length > 63) { - throw new ValidationException(ValidationRules.MaxLength, "resourceName", 63); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceName", 63); } if (resourceName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceName, "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginRotateClusterCertificates", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginRotateClusterCertificates", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -4544,55 +4584,56 @@ internal ManagedClustersOperations(ContainerServiceClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 202 && (int)_statusCode != 204) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -4602,42 +4643,41 @@ internal ManagedClustersOperations(ContainerServiceClient client) throw ex; } // Create Result - var _result = new AzureOperationHeaderResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationHeaderResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } try { - _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Aborts last operation running on managed cluster. + /// Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, a 409 error code is returned. /// - /// - /// Aborts the currently running operation on the managed cluster. The Managed - /// Cluster will be moved to a Canceling state and eventually to a Canceled - /// state when cancellation finishes. If the operation completes before - /// cancellation can take place, a 409 error code is returned. - /// /// /// The name of the resource group. The name is case insensitive. /// @@ -4650,10 +4690,10 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -4662,111 +4702,112 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginAbortLatestOperationWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginAbortLatestOperationWithHttpMessagesAsync(string resourceGroupName, string resourceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) + + + + + if (this.Client.ApiVersion == null) { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.SubscriptionId != null) + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } if (resourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceName"); } if (resourceName != null) { if (resourceName.Length > 63) { - throw new ValidationException(ValidationRules.MaxLength, "resourceName", 63); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceName", 63); } if (resourceName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceName, "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginAbortLatestOperation", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginAbortLatestOperation", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclusters/{resourceName}/abort").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -4778,55 +4819,56 @@ internal ManagedClustersOperations(ContainerServiceClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 202 && (int)_statusCode != 204) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -4836,33 +4878,38 @@ internal ManagedClustersOperations(ContainerServiceClient client) throw ex; } // Create Result - var _result = new AzureOperationHeaderResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationHeaderResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } try { - _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Rotates the service account signing keys of a managed cluster. /// @@ -4878,10 +4925,10 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -4890,111 +4937,112 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginRotateServiceAccountSigningKeysWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginRotateServiceAccountSigningKeysWithHttpMessagesAsync(string resourceGroupName, string resourceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) + + + + + if (this.Client.ApiVersion == null) { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.SubscriptionId != null) + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } if (resourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceName"); } if (resourceName != null) { if (resourceName.Length > 63) { - throw new ValidationException(ValidationRules.MaxLength, "resourceName", 63); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceName", 63); } if (resourceName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceName, "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginRotateServiceAccountSigningKeys", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginRotateServiceAccountSigningKeys", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateServiceAccountSigningKeys").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -5006,55 +5054,56 @@ internal ManagedClustersOperations(ContainerServiceClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 202 && (int)_statusCode != 204) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -5064,44 +5113,41 @@ internal ManagedClustersOperations(ContainerServiceClient client) throw ex; } // Create Result - var _result = new AzureOperationHeaderResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationHeaderResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } try { - _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Stops a Managed Cluster + /// This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about stopping a cluster. /// - /// - /// This can only be performed on Azure Virtual Machine Scale set backed - /// clusters. Stopping a cluster stops the control plane and agent nodes - /// entirely, while maintaining all object and cluster state. A cluster does - /// not accrue charges while it is stopped. See [stopping a - /// cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more - /// details about stopping a cluster. - /// /// /// The name of the resource group. The name is case insensitive. /// @@ -5114,10 +5160,10 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -5126,111 +5172,112 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginStopWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginStopWithHttpMessagesAsync(string resourceGroupName, string resourceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) + + + + + if (this.Client.ApiVersion == null) { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.SubscriptionId != null) + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } if (resourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceName"); } if (resourceName != null) { if (resourceName.Length > 63) { - throw new ValidationException(ValidationRules.MaxLength, "resourceName", 63); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceName", 63); } if (resourceName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceName, "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginStop", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginStop", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -5242,55 +5289,56 @@ internal ManagedClustersOperations(ContainerServiceClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 202 && (int)_statusCode != 204) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -5300,41 +5348,41 @@ internal ManagedClustersOperations(ContainerServiceClient client) throw ex; } // Create Result - var _result = new AzureOperationHeaderResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationHeaderResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } try { - _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Starts a previously stopped Managed Cluster + /// See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting a cluster. /// - /// - /// See [starting a - /// cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more - /// details about starting a cluster. - /// /// /// The name of the resource group. The name is case insensitive. /// @@ -5347,10 +5395,10 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -5359,111 +5407,112 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginStartWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginStartWithHttpMessagesAsync(string resourceGroupName, string resourceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) + + + + + if (this.Client.ApiVersion == null) { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.SubscriptionId != null) + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } if (resourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceName"); } if (resourceName != null) { if (resourceName.Length > 63) { - throw new ValidationException(ValidationRules.MaxLength, "resourceName", 63); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceName", 63); } if (resourceName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceName, "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginStart", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginStart", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -5475,55 +5524,56 @@ internal ManagedClustersOperations(ContainerServiceClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 202 && (int)_statusCode != 204) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -5533,41 +5583,41 @@ internal ManagedClustersOperations(ContainerServiceClient client) throw ex; } // Create Result - var _result = new AzureOperationHeaderResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationHeaderResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } try { - _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Submits a command to run against the Managed Cluster. + /// AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). /// - /// - /// AKS will create a pod to run the command. This is primarily useful for - /// private clusters. For more information see [AKS Run - /// Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). - /// /// /// The name of the resource group. The name is case insensitive. /// @@ -5583,13 +5633,13 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -5598,120 +5648,121 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginRunCommandWithHttpMessagesAsync(string resourceGroupName, string resourceName, RunCommandRequest requestPayload, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> BeginRunCommandWithHttpMessagesAsync(string resourceGroupName, string resourceName, RunCommandRequest requestPayload, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (requestPayload == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "requestPayload"); } - if (Client.ApiVersion != null) + if (requestPayload != null) { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + requestPayload.Validate(); + } + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.SubscriptionId != null) + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } if (resourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceName"); } if (resourceName != null) { if (resourceName.Length > 63) { - throw new ValidationException(ValidationRules.MaxLength, "resourceName", 63); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceName", 63); } if (resourceName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceName, "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } - if (requestPayload == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "requestPayload"); - } - if (requestPayload != null) - { - requestPayload.Validate(); - } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); + tracingParameters.Add("requestPayload", requestPayload); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginRunCommand", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginRunCommand", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/runCommand").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -5723,61 +5774,62 @@ internal ManagedClustersOperations(ContainerServiceClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(requestPayload != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(requestPayload, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(requestPayload, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -5787,9 +5839,10 @@ internal ManagedClustersOperations(ContainerServiceClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -5800,38 +5853,42 @@ internal ManagedClustersOperations(ContainerServiceClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } try { - _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Gets a list of managed clusters in the specified subscription. /// @@ -5844,13 +5901,13 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -5859,51 +5916,53 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -5915,55 +5974,56 @@ internal ManagedClustersOperations(ContainerServiceClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -5973,9 +6033,10 @@ internal ManagedClustersOperations(ContainerServiceClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -5986,25 +6047,29 @@ internal ManagedClustersOperations(ContainerServiceClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Lists managed clusters in the specified subscription and resource group. /// @@ -6017,13 +6082,13 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -6032,51 +6097,53 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroupNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroupNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -6088,55 +6155,56 @@ internal ManagedClustersOperations(ContainerServiceClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -6146,9 +6214,10 @@ internal ManagedClustersOperations(ContainerServiceClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -6159,34 +6228,32 @@ internal ManagedClustersOperations(ContainerServiceClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Gets a list of egress endpoints (network endpoints of all outbound - /// dependencies) in the specified managed cluster. + /// Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed cluster. The operation returns properties of each egress endpoint. /// - /// - /// Gets a list of egress endpoints (network endpoints of all outbound - /// dependencies) in the specified managed cluster. The operation returns - /// properties of each egress endpoint. - /// /// /// The NextLink from the previous successful call to List operation. /// @@ -6196,13 +6263,13 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -6211,51 +6278,53 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListOutboundNetworkDependenciesEndpointsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListOutboundNetworkDependenciesEndpointsNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListOutboundNetworkDependenciesEndpointsNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListOutboundNetworkDependenciesEndpointsNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -6267,55 +6336,56 @@ internal ManagedClustersOperations(ContainerServiceClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -6325,9 +6395,10 @@ internal ManagedClustersOperations(ContainerServiceClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -6338,24 +6409,28 @@ internal ManagedClustersOperations(ContainerServiceClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/ManagedClustersOperationsExtensions.cs b/src/Aks/Aks.Sdk/Generated/ManagedClustersOperationsExtensions.cs index 217607bf1143..83430efd2e19 100644 --- a/src/Aks/Aks.Sdk/Generated/ManagedClustersOperationsExtensions.cs +++ b/src/Aks/Aks.Sdk/Generated/ManagedClustersOperationsExtensions.cs @@ -1,1773 +1,1453 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for ManagedClustersOperations. + /// Extension methods for ManagedClustersOperations /// public static partial class ManagedClustersOperationsExtensions { - /// - /// Gets supported OS options in the specified subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of Azure region. - /// - /// - /// The resource type for which the OS options needs to be returned - /// - public static OSOptionProfile GetOSOptions(this IManagedClustersOperations operations, string location, string resourceType = default(string)) - { - return operations.GetOSOptionsAsync(location, resourceType).GetAwaiter().GetResult(); - } - - /// - /// Gets supported OS options in the specified subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of Azure region. - /// - /// - /// The resource type for which the OS options needs to be returned - /// - /// - /// The cancellation token. - /// - public static async Task GetOSOptionsAsync(this IManagedClustersOperations operations, string location, string resourceType = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetOSOptionsWithHttpMessagesAsync(location, resourceType, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a list of supported Kubernetes versions in the specified subscription. - /// - /// - /// Contains extra metadata on the version, including supported patch versions, - /// capabilities, available upgrades, and details on preview status of the - /// version - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of Azure region. - /// - public static KubernetesVersionListResult ListKubernetesVersions(this IManagedClustersOperations operations, string location) - { - return operations.ListKubernetesVersionsAsync(location).GetAwaiter().GetResult(); - } - - /// - /// Gets a list of supported Kubernetes versions in the specified subscription. - /// - /// - /// Contains extra metadata on the version, including supported patch versions, - /// capabilities, available upgrades, and details on preview status of the - /// version - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of Azure region. - /// - /// - /// The cancellation token. - /// - public static async Task ListKubernetesVersionsAsync(this IManagedClustersOperations operations, string location, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListKubernetesVersionsWithHttpMessagesAsync(location, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a list of managed clusters in the specified subscription. - /// - /// - /// The operations group for this extension method. - /// - public static IPage List(this IManagedClustersOperations operations) - { - return operations.ListAsync().GetAwaiter().GetResult(); - } - - /// - /// Gets a list of managed clusters in the specified subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IManagedClustersOperations operations, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Lists managed clusters in the specified subscription and resource group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - public static IPage ListByResourceGroup(this IManagedClustersOperations operations, string resourceGroupName) - { - return operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult(); - } - - /// - /// Lists managed clusters in the specified subscription and resource group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The cancellation token. - /// - public static async Task> ListByResourceGroupAsync(this IManagedClustersOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the upgrade profile of a managed cluster. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - public static ManagedClusterUpgradeProfile GetUpgradeProfile(this IManagedClustersOperations operations, string resourceGroupName, string resourceName) - { - return operations.GetUpgradeProfileAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); - } - - /// - /// Gets the upgrade profile of a managed cluster. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The cancellation token. - /// - public static async Task GetUpgradeProfileAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetUpgradeProfileWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets an access profile of a managed cluster. - /// - /// - /// **WARNING**: This API will be deprecated. Instead use - /// [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) - /// or - /// [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) - /// . - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The name of the role for managed cluster accessProfile resource. - /// - [System.Obsolete("This operation is deprecated. Please do not use it any longer.")] - public static ManagedClusterAccessProfile GetAccessProfile(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, string roleName) - { - return operations.GetAccessProfileAsync(resourceGroupName, resourceName, roleName).GetAwaiter().GetResult(); - } - - /// - /// Gets an access profile of a managed cluster. - /// - /// - /// **WARNING**: This API will be deprecated. Instead use - /// [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) - /// or - /// [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) - /// . - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The name of the role for managed cluster accessProfile resource. - /// - /// - /// The cancellation token. - /// - [System.Obsolete("This operation is deprecated. Please do not use it any longer.")] - public static async Task GetAccessProfileAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, string roleName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetAccessProfileWithHttpMessagesAsync(resourceGroupName, resourceName, roleName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Lists the admin credentials of a managed cluster. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// server fqdn type for credentials to be returned - /// - public static CredentialResults ListClusterAdminCredentials(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, string serverFqdn = default(string)) - { - return operations.ListClusterAdminCredentialsAsync(resourceGroupName, resourceName, serverFqdn).GetAwaiter().GetResult(); - } - - /// - /// Lists the admin credentials of a managed cluster. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// server fqdn type for credentials to be returned - /// - /// - /// The cancellation token. - /// - public static async Task ListClusterAdminCredentialsAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, string serverFqdn = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListClusterAdminCredentialsWithHttpMessagesAsync(resourceGroupName, resourceName, serverFqdn, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Lists the user credentials of a managed cluster. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// server fqdn type for credentials to be returned - /// - /// - /// Only apply to AAD clusters, specifies the format of returned kubeconfig. - /// Format 'azure' will return azure auth-provider kubeconfig; format 'exec' - /// will return exec format kubeconfig, which requires kubelogin binary in the - /// path. Possible values include: 'azure', 'exec' - /// - public static CredentialResults ListClusterUserCredentials(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, string serverFqdn = default(string), string format = default(string)) - { - return operations.ListClusterUserCredentialsAsync(resourceGroupName, resourceName, serverFqdn, format).GetAwaiter().GetResult(); - } - - /// - /// Lists the user credentials of a managed cluster. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// server fqdn type for credentials to be returned - /// - /// - /// Only apply to AAD clusters, specifies the format of returned kubeconfig. - /// Format 'azure' will return azure auth-provider kubeconfig; format 'exec' - /// will return exec format kubeconfig, which requires kubelogin binary in the - /// path. Possible values include: 'azure', 'exec' - /// - /// - /// The cancellation token. - /// - public static async Task ListClusterUserCredentialsAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, string serverFqdn = default(string), string format = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListClusterUserCredentialsWithHttpMessagesAsync(resourceGroupName, resourceName, serverFqdn, format, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Lists the cluster monitoring user credentials of a managed cluster. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// server fqdn type for credentials to be returned - /// - public static CredentialResults ListClusterMonitoringUserCredentials(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, string serverFqdn = default(string)) - { - return operations.ListClusterMonitoringUserCredentialsAsync(resourceGroupName, resourceName, serverFqdn).GetAwaiter().GetResult(); - } - - /// - /// Lists the cluster monitoring user credentials of a managed cluster. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// server fqdn type for credentials to be returned - /// - /// - /// The cancellation token. - /// - public static async Task ListClusterMonitoringUserCredentialsAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, string serverFqdn = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListClusterMonitoringUserCredentialsWithHttpMessagesAsync(resourceGroupName, resourceName, serverFqdn, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a managed cluster. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - public static ManagedCluster Get(this IManagedClustersOperations operations, string resourceGroupName, string resourceName) - { - return operations.GetAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); - } - - /// - /// Gets a managed cluster. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Creates or updates a managed cluster. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The managed cluster to create or update. - /// - public static ManagedCluster CreateOrUpdate(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, ManagedCluster parameters) - { - return operations.CreateOrUpdateAsync(resourceGroupName, resourceName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Creates or updates a managed cluster. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The managed cluster to create or update. - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, ManagedCluster parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, resourceName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Updates tags on a managed cluster. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// Resource tags. - /// - public static ManagedCluster UpdateTags(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, IDictionary tags = default(IDictionary)) - { - return operations.UpdateTagsAsync(resourceGroupName, resourceName, tags).GetAwaiter().GetResult(); - } - - /// - /// Updates tags on a managed cluster. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// Resource tags. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateTagsAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, IDictionary tags = default(IDictionary), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateTagsWithHttpMessagesAsync(resourceGroupName, resourceName, tags, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes a managed cluster. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - public static ManagedClustersDeleteHeaders Delete(this IManagedClustersOperations operations, string resourceGroupName, string resourceName) - { - return operations.DeleteAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); - } - - /// - /// Deletes a managed cluster. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.DeleteWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Headers; - } - } - - /// - /// Reset the Service Principal Profile of a managed cluster. - /// - /// - /// This action cannot be performed on a cluster that is not using a service - /// principal - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The service principal profile to set on the managed cluster. - /// - public static ManagedClustersResetServicePrincipalProfileHeaders ResetServicePrincipalProfile(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, ManagedClusterServicePrincipalProfile parameters) - { - return operations.ResetServicePrincipalProfileAsync(resourceGroupName, resourceName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Reset the Service Principal Profile of a managed cluster. - /// - /// - /// This action cannot be performed on a cluster that is not using a service - /// principal - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The service principal profile to set on the managed cluster. - /// - /// - /// The cancellation token. - /// - public static async Task ResetServicePrincipalProfileAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, ManagedClusterServicePrincipalProfile parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ResetServicePrincipalProfileWithHttpMessagesAsync(resourceGroupName, resourceName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Headers; - } - } - - /// - /// Reset the AAD Profile of a managed cluster. - /// - /// - /// **WARNING**: This API will be deprecated. Please see [AKS-managed Azure - /// Active Directory integration](https://aka.ms/aks-managed-aad) to update - /// your cluster with AKS-managed Azure AD. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The AAD profile to set on the Managed Cluster - /// - [System.Obsolete("This operation is deprecated. Please do not use it any longer.")] - public static ManagedClustersResetAADProfileHeaders ResetAADProfile(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, ManagedClusterAADProfile parameters) - { - return operations.ResetAADProfileAsync(resourceGroupName, resourceName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Reset the AAD Profile of a managed cluster. - /// - /// - /// **WARNING**: This API will be deprecated. Please see [AKS-managed Azure - /// Active Directory integration](https://aka.ms/aks-managed-aad) to update - /// your cluster with AKS-managed Azure AD. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The AAD profile to set on the Managed Cluster - /// - /// - /// The cancellation token. - /// - [System.Obsolete("This operation is deprecated. Please do not use it any longer.")] - public static async Task ResetAADProfileAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, ManagedClusterAADProfile parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ResetAADProfileWithHttpMessagesAsync(resourceGroupName, resourceName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Headers; - } - } - - /// - /// Rotates the certificates of a managed cluster. - /// - /// - /// See [Certificate - /// rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for - /// more details about rotating managed cluster certificates. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - public static ManagedClustersRotateClusterCertificatesHeaders RotateClusterCertificates(this IManagedClustersOperations operations, string resourceGroupName, string resourceName) - { - return operations.RotateClusterCertificatesAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); - } - - /// - /// Rotates the certificates of a managed cluster. - /// - /// - /// See [Certificate - /// rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for - /// more details about rotating managed cluster certificates. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The cancellation token. - /// - public static async Task RotateClusterCertificatesAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.RotateClusterCertificatesWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Headers; - } - } - - /// - /// Aborts last operation running on managed cluster. - /// - /// - /// Aborts the currently running operation on the managed cluster. The Managed - /// Cluster will be moved to a Canceling state and eventually to a Canceled - /// state when cancellation finishes. If the operation completes before - /// cancellation can take place, a 409 error code is returned. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - public static ManagedClustersAbortLatestOperationHeaders AbortLatestOperation(this IManagedClustersOperations operations, string resourceGroupName, string resourceName) - { - return operations.AbortLatestOperationAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); - } - - /// - /// Aborts last operation running on managed cluster. - /// - /// - /// Aborts the currently running operation on the managed cluster. The Managed - /// Cluster will be moved to a Canceling state and eventually to a Canceled - /// state when cancellation finishes. If the operation completes before - /// cancellation can take place, a 409 error code is returned. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The cancellation token. - /// - public static async Task AbortLatestOperationAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.AbortLatestOperationWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Headers; - } - } - - /// - /// Rotates the service account signing keys of a managed cluster. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - public static ManagedClustersRotateServiceAccountSigningKeysHeaders RotateServiceAccountSigningKeys(this IManagedClustersOperations operations, string resourceGroupName, string resourceName) - { - return operations.RotateServiceAccountSigningKeysAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); - } - - /// - /// Rotates the service account signing keys of a managed cluster. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The cancellation token. - /// - public static async Task RotateServiceAccountSigningKeysAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.RotateServiceAccountSigningKeysWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Headers; - } - } - - /// - /// Stops a Managed Cluster - /// - /// - /// This can only be performed on Azure Virtual Machine Scale set backed - /// clusters. Stopping a cluster stops the control plane and agent nodes - /// entirely, while maintaining all object and cluster state. A cluster does - /// not accrue charges while it is stopped. See [stopping a - /// cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more - /// details about stopping a cluster. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - public static ManagedClustersStopHeaders Stop(this IManagedClustersOperations operations, string resourceGroupName, string resourceName) - { - return operations.StopAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); - } - - /// - /// Stops a Managed Cluster - /// - /// - /// This can only be performed on Azure Virtual Machine Scale set backed - /// clusters. Stopping a cluster stops the control plane and agent nodes - /// entirely, while maintaining all object and cluster state. A cluster does - /// not accrue charges while it is stopped. See [stopping a - /// cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more - /// details about stopping a cluster. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The cancellation token. - /// - public static async Task StopAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.StopWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Headers; - } - } - - /// - /// Starts a previously stopped Managed Cluster - /// - /// - /// See [starting a - /// cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more - /// details about starting a cluster. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - public static ManagedClustersStartHeaders Start(this IManagedClustersOperations operations, string resourceGroupName, string resourceName) - { - return operations.StartAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); - } - - /// - /// Starts a previously stopped Managed Cluster - /// - /// - /// See [starting a - /// cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more - /// details about starting a cluster. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The cancellation token. - /// - public static async Task StartAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.StartWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Headers; - } - } - - /// - /// Submits a command to run against the Managed Cluster. - /// - /// - /// AKS will create a pod to run the command. This is primarily useful for - /// private clusters. For more information see [AKS Run - /// Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The run command request - /// - public static RunCommandResult RunCommand(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, RunCommandRequest requestPayload) - { - return operations.RunCommandAsync(resourceGroupName, resourceName, requestPayload).GetAwaiter().GetResult(); - } - - /// - /// Submits a command to run against the Managed Cluster. - /// - /// - /// AKS will create a pod to run the command. This is primarily useful for - /// private clusters. For more information see [AKS Run - /// Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The run command request - /// - /// - /// The cancellation token. - /// - public static async Task RunCommandAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, RunCommandRequest requestPayload, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.RunCommandWithHttpMessagesAsync(resourceGroupName, resourceName, requestPayload, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the results of a command which has been run on the Managed Cluster. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// Id of the command. - /// - public static RunCommandResult GetCommandResult(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, string commandId) - { - return operations.GetCommandResultAsync(resourceGroupName, resourceName, commandId).GetAwaiter().GetResult(); - } - - /// - /// Gets the results of a command which has been run on the Managed Cluster. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// Id of the command. - /// - /// - /// The cancellation token. - /// - public static async Task GetCommandResultAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, string commandId, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetCommandResultWithHttpMessagesAsync(resourceGroupName, resourceName, commandId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a list of egress endpoints (network endpoints of all outbound - /// dependencies) in the specified managed cluster. - /// - /// - /// Gets a list of egress endpoints (network endpoints of all outbound - /// dependencies) in the specified managed cluster. The operation returns - /// properties of each egress endpoint. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - public static IPage ListOutboundNetworkDependenciesEndpoints(this IManagedClustersOperations operations, string resourceGroupName, string resourceName) - { - return operations.ListOutboundNetworkDependenciesEndpointsAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); - } - - /// - /// Gets a list of egress endpoints (network endpoints of all outbound - /// dependencies) in the specified managed cluster. - /// - /// - /// Gets a list of egress endpoints (network endpoints of all outbound - /// dependencies) in the specified managed cluster. The operation returns - /// properties of each egress endpoint. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The cancellation token. - /// - public static async Task> ListOutboundNetworkDependenciesEndpointsAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListOutboundNetworkDependenciesEndpointsWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Creates or updates a managed cluster. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The managed cluster to create or update. - /// - public static ManagedCluster BeginCreateOrUpdate(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, ManagedCluster parameters) - { - return operations.BeginCreateOrUpdateAsync(resourceGroupName, resourceName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Creates or updates a managed cluster. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The managed cluster to create or update. - /// - /// - /// The cancellation token. - /// - public static async Task BeginCreateOrUpdateAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, ManagedCluster parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, resourceName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Updates tags on a managed cluster. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// Resource tags. - /// - public static ManagedCluster BeginUpdateTags(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, IDictionary tags = default(IDictionary)) - { - return operations.BeginUpdateTagsAsync(resourceGroupName, resourceName, tags).GetAwaiter().GetResult(); - } - - /// - /// Updates tags on a managed cluster. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// Resource tags. - /// - /// - /// The cancellation token. - /// - public static async Task BeginUpdateTagsAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, IDictionary tags = default(IDictionary), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginUpdateTagsWithHttpMessagesAsync(resourceGroupName, resourceName, tags, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes a managed cluster. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - public static ManagedClustersDeleteHeaders BeginDelete(this IManagedClustersOperations operations, string resourceGroupName, string resourceName) - { - return operations.BeginDeleteAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); - } - - /// - /// Deletes a managed cluster. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The cancellation token. - /// - public static async Task BeginDeleteAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Headers; - } - } - - /// - /// Reset the Service Principal Profile of a managed cluster. - /// - /// - /// This action cannot be performed on a cluster that is not using a service - /// principal - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The service principal profile to set on the managed cluster. - /// - public static ManagedClustersResetServicePrincipalProfileHeaders BeginResetServicePrincipalProfile(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, ManagedClusterServicePrincipalProfile parameters) - { - return operations.BeginResetServicePrincipalProfileAsync(resourceGroupName, resourceName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Reset the Service Principal Profile of a managed cluster. - /// - /// - /// This action cannot be performed on a cluster that is not using a service - /// principal - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The service principal profile to set on the managed cluster. - /// - /// - /// The cancellation token. - /// - public static async Task BeginResetServicePrincipalProfileAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, ManagedClusterServicePrincipalProfile parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginResetServicePrincipalProfileWithHttpMessagesAsync(resourceGroupName, resourceName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Headers; - } - } - - /// - /// Reset the AAD Profile of a managed cluster. - /// - /// - /// **WARNING**: This API will be deprecated. Please see [AKS-managed Azure - /// Active Directory integration](https://aka.ms/aks-managed-aad) to update - /// your cluster with AKS-managed Azure AD. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The AAD profile to set on the Managed Cluster - /// - [System.Obsolete("This operation is deprecated. Please do not use it any longer.")] - public static ManagedClustersResetAADProfileHeaders BeginResetAADProfile(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, ManagedClusterAADProfile parameters) - { - return operations.BeginResetAADProfileAsync(resourceGroupName, resourceName, parameters).GetAwaiter().GetResult(); - } - - /// - /// Reset the AAD Profile of a managed cluster. - /// - /// - /// **WARNING**: This API will be deprecated. Please see [AKS-managed Azure - /// Active Directory integration](https://aka.ms/aks-managed-aad) to update - /// your cluster with AKS-managed Azure AD. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The AAD profile to set on the Managed Cluster - /// - /// - /// The cancellation token. - /// - [System.Obsolete("This operation is deprecated. Please do not use it any longer.")] - public static async Task BeginResetAADProfileAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, ManagedClusterAADProfile parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginResetAADProfileWithHttpMessagesAsync(resourceGroupName, resourceName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Headers; - } - } - - /// - /// Rotates the certificates of a managed cluster. - /// - /// - /// See [Certificate - /// rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for - /// more details about rotating managed cluster certificates. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - public static ManagedClustersRotateClusterCertificatesHeaders BeginRotateClusterCertificates(this IManagedClustersOperations operations, string resourceGroupName, string resourceName) - { - return operations.BeginRotateClusterCertificatesAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); - } - - /// - /// Rotates the certificates of a managed cluster. - /// - /// - /// See [Certificate - /// rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for - /// more details about rotating managed cluster certificates. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The cancellation token. - /// - public static async Task BeginRotateClusterCertificatesAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginRotateClusterCertificatesWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Headers; - } - } - - /// - /// Aborts last operation running on managed cluster. - /// - /// - /// Aborts the currently running operation on the managed cluster. The Managed - /// Cluster will be moved to a Canceling state and eventually to a Canceled - /// state when cancellation finishes. If the operation completes before - /// cancellation can take place, a 409 error code is returned. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - public static ManagedClustersAbortLatestOperationHeaders BeginAbortLatestOperation(this IManagedClustersOperations operations, string resourceGroupName, string resourceName) - { - return operations.BeginAbortLatestOperationAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); - } - - /// - /// Aborts last operation running on managed cluster. - /// - /// - /// Aborts the currently running operation on the managed cluster. The Managed - /// Cluster will be moved to a Canceling state and eventually to a Canceled - /// state when cancellation finishes. If the operation completes before - /// cancellation can take place, a 409 error code is returned. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The cancellation token. - /// - public static async Task BeginAbortLatestOperationAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginAbortLatestOperationWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Headers; - } - } - - /// - /// Rotates the service account signing keys of a managed cluster. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - public static ManagedClustersRotateServiceAccountSigningKeysHeaders BeginRotateServiceAccountSigningKeys(this IManagedClustersOperations operations, string resourceGroupName, string resourceName) - { - return operations.BeginRotateServiceAccountSigningKeysAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); - } - - /// - /// Rotates the service account signing keys of a managed cluster. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The cancellation token. - /// - public static async Task BeginRotateServiceAccountSigningKeysAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginRotateServiceAccountSigningKeysWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Headers; - } - } - - /// - /// Stops a Managed Cluster - /// - /// - /// This can only be performed on Azure Virtual Machine Scale set backed - /// clusters. Stopping a cluster stops the control plane and agent nodes - /// entirely, while maintaining all object and cluster state. A cluster does - /// not accrue charges while it is stopped. See [stopping a - /// cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more - /// details about stopping a cluster. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - public static ManagedClustersStopHeaders BeginStop(this IManagedClustersOperations operations, string resourceGroupName, string resourceName) - { - return operations.BeginStopAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); - } - - /// - /// Stops a Managed Cluster - /// - /// - /// This can only be performed on Azure Virtual Machine Scale set backed - /// clusters. Stopping a cluster stops the control plane and agent nodes - /// entirely, while maintaining all object and cluster state. A cluster does - /// not accrue charges while it is stopped. See [stopping a - /// cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more - /// details about stopping a cluster. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The cancellation token. - /// - public static async Task BeginStopAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginStopWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Headers; - } - } - - /// - /// Starts a previously stopped Managed Cluster - /// - /// - /// See [starting a - /// cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more - /// details about starting a cluster. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - public static ManagedClustersStartHeaders BeginStart(this IManagedClustersOperations operations, string resourceGroupName, string resourceName) - { - return operations.BeginStartAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); - } - - /// - /// Starts a previously stopped Managed Cluster - /// - /// - /// See [starting a - /// cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more - /// details about starting a cluster. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The cancellation token. - /// - public static async Task BeginStartAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginStartWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Headers; - } - } - - /// - /// Submits a command to run against the Managed Cluster. - /// - /// - /// AKS will create a pod to run the command. This is primarily useful for - /// private clusters. For more information see [AKS Run - /// Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The run command request - /// - public static RunCommandResult BeginRunCommand(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, RunCommandRequest requestPayload) - { - return operations.BeginRunCommandAsync(resourceGroupName, resourceName, requestPayload).GetAwaiter().GetResult(); - } - - /// - /// Submits a command to run against the Managed Cluster. - /// - /// - /// AKS will create a pod to run the command. This is primarily useful for - /// private clusters. For more information see [AKS Run - /// Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The run command request - /// - /// - /// The cancellation token. - /// - public static async Task BeginRunCommandAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, RunCommandRequest requestPayload, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginRunCommandWithHttpMessagesAsync(resourceGroupName, resourceName, requestPayload, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a list of managed clusters in the specified subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IManagedClustersOperations operations, string nextPageLink) - { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets a list of managed clusters in the specified subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListNextAsync(this IManagedClustersOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Lists managed clusters in the specified subscription and resource group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListByResourceGroupNext(this IManagedClustersOperations operations, string nextPageLink) - { - return operations.ListByResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Lists managed clusters in the specified subscription and resource group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListByResourceGroupNextAsync(this IManagedClustersOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByResourceGroupNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a list of egress endpoints (network endpoints of all outbound - /// dependencies) in the specified managed cluster. - /// - /// - /// Gets a list of egress endpoints (network endpoints of all outbound - /// dependencies) in the specified managed cluster. The operation returns - /// properties of each egress endpoint. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListOutboundNetworkDependenciesEndpointsNext(this IManagedClustersOperations operations, string nextPageLink) - { - return operations.ListOutboundNetworkDependenciesEndpointsNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets a list of egress endpoints (network endpoints of all outbound - /// dependencies) in the specified managed cluster. - /// - /// - /// Gets a list of egress endpoints (network endpoints of all outbound - /// dependencies) in the specified managed cluster. The operation returns - /// properties of each egress endpoint. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListOutboundNetworkDependenciesEndpointsNextAsync(this IManagedClustersOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListOutboundNetworkDependenciesEndpointsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - + /// + /// Gets supported OS options in the specified subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of Azure region. + /// + /// + /// The resource type for which the OS options needs to be returned + /// + public static OSOptionProfile GetOSOptions(this IManagedClustersOperations operations, string location, string resourceType = default(string)) + { + return ((IManagedClustersOperations)operations).GetOSOptionsAsync(location, resourceType).GetAwaiter().GetResult(); + } + + /// + /// Gets supported OS options in the specified subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of Azure region. + /// + /// + /// The resource type for which the OS options needs to be returned + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetOSOptionsAsync(this IManagedClustersOperations operations, string location, string resourceType = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetOSOptionsWithHttpMessagesAsync(location, resourceType, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and details on preview status of the version + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of Azure region. + /// + public static KubernetesVersionListResult ListKubernetesVersions(this IManagedClustersOperations operations, string location) + { + return ((IManagedClustersOperations)operations).ListKubernetesVersionsAsync(location).GetAwaiter().GetResult(); + } + + /// + /// Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and details on preview status of the version + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of Azure region. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task ListKubernetesVersionsAsync(this IManagedClustersOperations operations, string location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListKubernetesVersionsWithHttpMessagesAsync(location, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets a list of managed clusters in the specified subscription. + /// + /// + /// The operations group for this extension method. + /// + public static Microsoft.Rest.Azure.IPage List(this IManagedClustersOperations operations) + { + return ((IManagedClustersOperations)operations).ListAsync().GetAwaiter().GetResult(); + } + + /// + /// Gets a list of managed clusters in the specified subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this IManagedClustersOperations operations, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Lists managed clusters in the specified subscription and resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + public static Microsoft.Rest.Azure.IPage ListByResourceGroup(this IManagedClustersOperations operations, string resourceGroupName) + { + return ((IManagedClustersOperations)operations).ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult(); + } + + /// + /// Lists managed clusters in the specified subscription and resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListByResourceGroupAsync(this IManagedClustersOperations operations, string resourceGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets the upgrade profile of a managed cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + public static ManagedClusterUpgradeProfile GetUpgradeProfile(this IManagedClustersOperations operations, string resourceGroupName, string resourceName) + { + return ((IManagedClustersOperations)operations).GetUpgradeProfileAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); + } + + /// + /// Gets the upgrade profile of a managed cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetUpgradeProfileAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetUpgradeProfileWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// **WARNING**: This API will be deprecated. Instead use [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) or [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) . + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the role for managed cluster accessProfile resource. + /// + public static ManagedClusterAccessProfile GetAccessProfile(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, string roleName) + { + return ((IManagedClustersOperations)operations).GetAccessProfileAsync(resourceGroupName, resourceName, roleName).GetAwaiter().GetResult(); + } + + /// + /// **WARNING**: This API will be deprecated. Instead use [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) or [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) . + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the role for managed cluster accessProfile resource. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAccessProfileAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, string roleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetAccessProfileWithHttpMessagesAsync(resourceGroupName, resourceName, roleName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Lists the admin credentials of a managed cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// server fqdn type for credentials to be returned + /// + public static CredentialResults ListClusterAdminCredentials(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, string serverFqdn = default(string)) + { + return ((IManagedClustersOperations)operations).ListClusterAdminCredentialsAsync(resourceGroupName, resourceName, serverFqdn).GetAwaiter().GetResult(); + } + + /// + /// Lists the admin credentials of a managed cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// server fqdn type for credentials to be returned + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task ListClusterAdminCredentialsAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, string serverFqdn = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListClusterAdminCredentialsWithHttpMessagesAsync(resourceGroupName, resourceName, serverFqdn, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Lists the user credentials of a managed cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// server fqdn type for credentials to be returned + /// + /// + /// Only apply to AAD clusters, specifies the format of returned kubeconfig. Format 'azure' will return azure auth-provider kubeconfig; format 'exec' will return exec format kubeconfig, which requires kubelogin binary in the path. + /// + public static CredentialResults ListClusterUserCredentials(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, string serverFqdn = default(string), string format = default(string)) + { + return ((IManagedClustersOperations)operations).ListClusterUserCredentialsAsync(resourceGroupName, resourceName, serverFqdn, format).GetAwaiter().GetResult(); + } + + /// + /// Lists the user credentials of a managed cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// server fqdn type for credentials to be returned + /// + /// + /// Only apply to AAD clusters, specifies the format of returned kubeconfig. Format 'azure' will return azure auth-provider kubeconfig; format 'exec' will return exec format kubeconfig, which requires kubelogin binary in the path. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task ListClusterUserCredentialsAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, string serverFqdn = default(string), string format = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListClusterUserCredentialsWithHttpMessagesAsync(resourceGroupName, resourceName, serverFqdn, format, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Lists the cluster monitoring user credentials of a managed cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// server fqdn type for credentials to be returned + /// + public static CredentialResults ListClusterMonitoringUserCredentials(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, string serverFqdn = default(string)) + { + return ((IManagedClustersOperations)operations).ListClusterMonitoringUserCredentialsAsync(resourceGroupName, resourceName, serverFqdn).GetAwaiter().GetResult(); + } + + /// + /// Lists the cluster monitoring user credentials of a managed cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// server fqdn type for credentials to be returned + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task ListClusterMonitoringUserCredentialsAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, string serverFqdn = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListClusterMonitoringUserCredentialsWithHttpMessagesAsync(resourceGroupName, resourceName, serverFqdn, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets a managed cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + public static ManagedCluster Get(this IManagedClustersOperations operations, string resourceGroupName, string resourceName) + { + return ((IManagedClustersOperations)operations).GetAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); + } + + /// + /// Gets a managed cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Creates or updates a managed cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + public static ManagedCluster CreateOrUpdate(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, ManagedCluster parameters) + { + return ((IManagedClustersOperations)operations).CreateOrUpdateAsync(resourceGroupName, resourceName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates a managed cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CreateOrUpdateAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, ManagedCluster parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, resourceName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Updates tags on a managed cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + public static ManagedCluster UpdateTags(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary)) + { + return ((IManagedClustersOperations)operations).UpdateTagsAsync(resourceGroupName, resourceName, tags).GetAwaiter().GetResult(); + } + + /// + /// Updates tags on a managed cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task UpdateTagsAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.UpdateTagsWithHttpMessagesAsync(resourceGroupName, resourceName, tags, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Deletes a managed cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + public static ManagedClustersDeleteHeaders Delete(this IManagedClustersOperations operations, string resourceGroupName, string resourceName) + { + return ((IManagedClustersOperations)operations).DeleteAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); + } + + /// + /// Deletes a managed cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task DeleteAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.DeleteWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Headers; + } + } + /// + /// This action cannot be performed on a cluster that is not using a service principal + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + public static ManagedClustersResetServicePrincipalProfileHeaders ResetServicePrincipalProfile(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, ManagedClusterServicePrincipalProfile parameters) + { + return ((IManagedClustersOperations)operations).ResetServicePrincipalProfileAsync(resourceGroupName, resourceName, parameters).GetAwaiter().GetResult(); + } + + /// + /// This action cannot be performed on a cluster that is not using a service principal + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task ResetServicePrincipalProfileAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, ManagedClusterServicePrincipalProfile parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ResetServicePrincipalProfileWithHttpMessagesAsync(resourceGroupName, resourceName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Headers; + } + } + /// + /// **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + public static ManagedClustersResetAadProfileHeaders ResetAADProfile(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, ManagedClusterAADProfile parameters) + { + return ((IManagedClustersOperations)operations).ResetAADProfileAsync(resourceGroupName, resourceName, parameters).GetAwaiter().GetResult(); + } + + /// + /// **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task ResetAADProfileAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, ManagedClusterAADProfile parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ResetAADProfileWithHttpMessagesAsync(resourceGroupName, resourceName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Headers; + } + } + /// + /// See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about rotating managed cluster certificates. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + public static ManagedClustersRotateClusterCertificatesHeaders RotateClusterCertificates(this IManagedClustersOperations operations, string resourceGroupName, string resourceName) + { + return ((IManagedClustersOperations)operations).RotateClusterCertificatesAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); + } + + /// + /// See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about rotating managed cluster certificates. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task RotateClusterCertificatesAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.RotateClusterCertificatesWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Headers; + } + } + /// + /// Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, a 409 error code is returned. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + public static ManagedClustersAbortLatestOperationHeaders AbortLatestOperation(this IManagedClustersOperations operations, string resourceGroupName, string resourceName) + { + return ((IManagedClustersOperations)operations).AbortLatestOperationAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); + } + + /// + /// Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, a 409 error code is returned. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task AbortLatestOperationAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.AbortLatestOperationWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Headers; + } + } + /// + /// Rotates the service account signing keys of a managed cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + public static ManagedClustersRotateServiceAccountSigningKeysHeaders RotateServiceAccountSigningKeys(this IManagedClustersOperations operations, string resourceGroupName, string resourceName) + { + return ((IManagedClustersOperations)operations).RotateServiceAccountSigningKeysAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); + } + + /// + /// Rotates the service account signing keys of a managed cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task RotateServiceAccountSigningKeysAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.RotateServiceAccountSigningKeysWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Headers; + } + } + /// + /// This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about stopping a cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + public static ManagedClustersStopHeaders Stop(this IManagedClustersOperations operations, string resourceGroupName, string resourceName) + { + return ((IManagedClustersOperations)operations).StopAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); + } + + /// + /// This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about stopping a cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task StopAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.StopWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Headers; + } + } + /// + /// See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting a cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + public static ManagedClustersStartHeaders Start(this IManagedClustersOperations operations, string resourceGroupName, string resourceName) + { + return ((IManagedClustersOperations)operations).StartAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); + } + + /// + /// See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting a cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task StartAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.StartWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Headers; + } + } + /// + /// AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + public static RunCommandResult RunCommand(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, RunCommandRequest requestPayload) + { + return ((IManagedClustersOperations)operations).RunCommandAsync(resourceGroupName, resourceName, requestPayload).GetAwaiter().GetResult(); + } + + /// + /// AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task RunCommandAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, RunCommandRequest requestPayload, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.RunCommandWithHttpMessagesAsync(resourceGroupName, resourceName, requestPayload, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets the results of a command which has been run on the Managed Cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// Id of the command. + /// + public static RunCommandResult GetCommandResult(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, string commandId) + { + return ((IManagedClustersOperations)operations).GetCommandResultAsync(resourceGroupName, resourceName, commandId).GetAwaiter().GetResult(); + } + + /// + /// Gets the results of a command which has been run on the Managed Cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// Id of the command. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetCommandResultAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, string commandId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetCommandResultWithHttpMessagesAsync(resourceGroupName, resourceName, commandId, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed cluster. The operation returns properties of each egress endpoint. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + public static Microsoft.Rest.Azure.IPage ListOutboundNetworkDependenciesEndpoints(this IManagedClustersOperations operations, string resourceGroupName, string resourceName) + { + return ((IManagedClustersOperations)operations).ListOutboundNetworkDependenciesEndpointsAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); + } + + /// + /// Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed cluster. The operation returns properties of each egress endpoint. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListOutboundNetworkDependenciesEndpointsAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListOutboundNetworkDependenciesEndpointsWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Creates or updates a managed cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + public static ManagedCluster BeginCreateOrUpdate(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, ManagedCluster parameters) + { + return ((IManagedClustersOperations)operations).BeginCreateOrUpdateAsync(resourceGroupName, resourceName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates a managed cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginCreateOrUpdateAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, ManagedCluster parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, resourceName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Updates tags on a managed cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + public static ManagedCluster BeginUpdateTags(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary)) + { + return ((IManagedClustersOperations)operations).BeginUpdateTagsAsync(resourceGroupName, resourceName, tags).GetAwaiter().GetResult(); + } + + /// + /// Updates tags on a managed cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginUpdateTagsAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginUpdateTagsWithHttpMessagesAsync(resourceGroupName, resourceName, tags, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Deletes a managed cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + public static ManagedClustersDeleteHeaders BeginDelete(this IManagedClustersOperations operations, string resourceGroupName, string resourceName) + { + return ((IManagedClustersOperations)operations).BeginDeleteAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); + } + + /// + /// Deletes a managed cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginDeleteAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Headers; + } + } + /// + /// This action cannot be performed on a cluster that is not using a service principal + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + public static ManagedClustersResetServicePrincipalProfileHeaders BeginResetServicePrincipalProfile(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, ManagedClusterServicePrincipalProfile parameters) + { + return ((IManagedClustersOperations)operations).BeginResetServicePrincipalProfileAsync(resourceGroupName, resourceName, parameters).GetAwaiter().GetResult(); + } + + /// + /// This action cannot be performed on a cluster that is not using a service principal + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginResetServicePrincipalProfileAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, ManagedClusterServicePrincipalProfile parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginResetServicePrincipalProfileWithHttpMessagesAsync(resourceGroupName, resourceName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Headers; + } + } + /// + /// **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + public static ManagedClustersResetAadProfileHeaders BeginResetAADProfile(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, ManagedClusterAADProfile parameters) + { + return ((IManagedClustersOperations)operations).BeginResetAADProfileAsync(resourceGroupName, resourceName, parameters).GetAwaiter().GetResult(); + } + + /// + /// **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginResetAADProfileAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, ManagedClusterAADProfile parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginResetAADProfileWithHttpMessagesAsync(resourceGroupName, resourceName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Headers; + } + } + /// + /// See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about rotating managed cluster certificates. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + public static ManagedClustersRotateClusterCertificatesHeaders BeginRotateClusterCertificates(this IManagedClustersOperations operations, string resourceGroupName, string resourceName) + { + return ((IManagedClustersOperations)operations).BeginRotateClusterCertificatesAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); + } + + /// + /// See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about rotating managed cluster certificates. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginRotateClusterCertificatesAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginRotateClusterCertificatesWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Headers; + } + } + /// + /// Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, a 409 error code is returned. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + public static ManagedClustersAbortLatestOperationHeaders BeginAbortLatestOperation(this IManagedClustersOperations operations, string resourceGroupName, string resourceName) + { + return ((IManagedClustersOperations)operations).BeginAbortLatestOperationAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); + } + + /// + /// Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, a 409 error code is returned. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginAbortLatestOperationAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginAbortLatestOperationWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Headers; + } + } + /// + /// Rotates the service account signing keys of a managed cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + public static ManagedClustersRotateServiceAccountSigningKeysHeaders BeginRotateServiceAccountSigningKeys(this IManagedClustersOperations operations, string resourceGroupName, string resourceName) + { + return ((IManagedClustersOperations)operations).BeginRotateServiceAccountSigningKeysAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); + } + + /// + /// Rotates the service account signing keys of a managed cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginRotateServiceAccountSigningKeysAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginRotateServiceAccountSigningKeysWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Headers; + } + } + /// + /// This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about stopping a cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + public static ManagedClustersStopHeaders BeginStop(this IManagedClustersOperations operations, string resourceGroupName, string resourceName) + { + return ((IManagedClustersOperations)operations).BeginStopAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); + } + + /// + /// This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about stopping a cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginStopAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginStopWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Headers; + } + } + /// + /// See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting a cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + public static ManagedClustersStartHeaders BeginStart(this IManagedClustersOperations operations, string resourceGroupName, string resourceName) + { + return ((IManagedClustersOperations)operations).BeginStartAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); + } + + /// + /// See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting a cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginStartAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginStartWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Headers; + } + } + /// + /// AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + public static RunCommandResult BeginRunCommand(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, RunCommandRequest requestPayload) + { + return ((IManagedClustersOperations)operations).BeginRunCommandAsync(resourceGroupName, resourceName, requestPayload).GetAwaiter().GetResult(); + } + + /// + /// AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginRunCommandAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, RunCommandRequest requestPayload, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginRunCommandWithHttpMessagesAsync(resourceGroupName, resourceName, requestPayload, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets a list of managed clusters in the specified subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListNext(this IManagedClustersOperations operations, string nextPageLink) + { + return ((IManagedClustersOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets a list of managed clusters in the specified subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListNextAsync(this IManagedClustersOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Lists managed clusters in the specified subscription and resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListByResourceGroupNext(this IManagedClustersOperations operations, string nextPageLink) + { + return ((IManagedClustersOperations)operations).ListByResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists managed clusters in the specified subscription and resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListByResourceGroupNextAsync(this IManagedClustersOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListByResourceGroupNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed cluster. The operation returns properties of each egress endpoint. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListOutboundNetworkDependenciesEndpointsNext(this IManagedClustersOperations operations, string nextPageLink) + { + return ((IManagedClustersOperations)operations).ListOutboundNetworkDependenciesEndpointsNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed cluster. The operation returns properties of each egress endpoint. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListOutboundNetworkDependenciesEndpointsNextAsync(this IManagedClustersOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListOutboundNetworkDependenciesEndpointsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } } } diff --git a/src/Aks/Aks.Sdk/Generated/Models/AccessProfile.cs b/src/Aks/Aks.Sdk/Generated/Models/AccessProfile.cs new file mode 100644 index 000000000000..eff4972beb28 --- /dev/null +++ b/src/Aks/Aks.Sdk/Generated/Models/AccessProfile.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.ContainerService.Models +{ + using System.Linq; + + /// + /// Profile for enabling a user to access a managed cluster. + /// + public partial class AccessProfile + { + /// + /// Initializes a new instance of the AccessProfile class. + /// + public AccessProfile() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AccessProfile class. + /// + + /// Base64-encoded Kubernetes configuration file. + /// + public AccessProfile(byte[] kubeConfig = default(byte[])) + + { + this.KubeConfig = kubeConfig; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets base64-encoded Kubernetes configuration file. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "kubeConfig")] + public byte[] KubeConfig {get; set; } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/AgentPool.cs b/src/Aks/Aks.Sdk/Generated/Models/AgentPool.cs index 451c16c9273f..cb4471f72fd3 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/AgentPool.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/AgentPool.cs @@ -1,26 +1,16 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// /// Agent Pool. /// - [Rest.Serialization.JsonTransformation] + [Microsoft.Rest.Serialization.JsonTransformation] public partial class AgentPool : SubResource { /// @@ -34,140 +24,246 @@ public AgentPool() /// /// Initializes a new instance of the AgentPool class. /// - /// Resource ID. - /// The name of the resource that is unique within a - /// resource group. This name can be used to access the - /// resource. - /// Resource type - /// Number of agents (VMs) to host docker - /// containers. Allowed values must be in the range of 0 to 1000 - /// (inclusive) for user pools and in the range of 1 to 1000 - /// (inclusive) for system pools. The default value is 1. - /// The size of the agent pool VMs. - /// Possible values include: 'Managed', - /// 'Ephemeral' - /// Possible values include: 'OS', - /// 'Temporary' - /// Possible values include: - /// 'OCIContainer', 'WasmWasi' - /// The ID of the subnet which agent pool - /// nodes and optionally pods will join on startup. - /// The ID of the subnet which pods will join - /// when launched. - /// The maximum number of pods that can run on a - /// node. - /// Possible values include: 'Linux', - /// 'Windows' - /// Possible values include: 'Ubuntu', - /// 'AzureLinux', 'CBLMariner', 'Windows2019', 'Windows2022' - /// The maximum number of nodes for - /// auto-scaling - /// The minimum number of nodes for - /// auto-scaling - /// Whether to enable - /// auto-scaler - /// The scale down mode to use when scaling - /// the Agent Pool. - /// Possible values include: - /// 'VirtualMachineScaleSets', 'AvailabilitySet' - /// Possible values include: 'System', - /// 'User' - /// The version of Kubernetes - /// specified by the user. - /// The version of Kubernetes - /// the Agent Pool is running. - /// The version of node image - /// Settings for upgrading the - /// agentpool - /// The current deployment or - /// provisioning state. - /// Whether the Agent Pool is running or - /// stopped. - /// The list of Availability zones to - /// use for nodes. This can only be specified if the AgentPoolType - /// property is 'VirtualMachineScaleSets'. - /// Whether each node is allocated its - /// own public IP. - /// The public IP prefix ID which VM - /// nodes should use IPs from. - /// The Virtual Machine Scale Set - /// priority. If not specified, the default is 'Regular'. Possible - /// values include: 'Spot', 'Regular' - /// The Virtual Machine Scale Set - /// eviction policy to use. - /// The max price (in US Dollars) you are - /// willing to pay for spot instances. Possible values are any decimal - /// value greater than zero or -1 which indicates default price to be - /// up-to on-demand. - /// The tags to be persisted on the agent pool - /// virtual machine scale set. - /// The node labels to be persisted across all - /// nodes in agent pool. - /// The taints added to new nodes during node - /// pool create and scale. For example, key=value:NoSchedule. - /// The ID for Proximity - /// Placement Group. - /// The Kubelet configuration on the agent - /// pool nodes. - /// The OS configuration of Linux agent - /// nodes. - /// Whether to enable host based - /// OS and data drive encryption. - /// Whether to enable UltraSSD - /// Whether to use a FIPS-enabled OS. - /// GPUInstanceProfile to be used to - /// specify GPU MIG instance profile for supported GPU VM SKU. Possible - /// values include: 'MIG1g', 'MIG2g', 'MIG3g', 'MIG4g', 'MIG7g' - /// CreationData to be used to specify the - /// source Snapshot ID if the node pool will be created/upgraded using - /// a snapshot. - /// The fully qualified resource ID of the - /// Dedicated Host Group to provision virtual machines from, used only - /// in creation scenario and not allowed to changed once set. - public AgentPool(string id = default(string), string name = default(string), string type = default(string), int? count = default(int?), string vmSize = default(string), int? osDiskSizeGB = default(int?), string osDiskType = default(string), string kubeletDiskType = default(string), string workloadRuntime = default(string), string vnetSubnetID = default(string), string podSubnetID = default(string), int? maxPods = default(int?), string osType = default(string), string osSKU = default(string), int? maxCount = default(int?), int? minCount = default(int?), bool? enableAutoScaling = default(bool?), string scaleDownMode = default(string), string agentPoolType = default(string), string mode = default(string), string orchestratorVersion = default(string), string currentOrchestratorVersion = default(string), string nodeImageVersion = default(string), AgentPoolUpgradeSettings upgradeSettings = default(AgentPoolUpgradeSettings), string provisioningState = default(string), PowerState powerState = default(PowerState), IList availabilityZones = default(IList), bool? enableNodePublicIP = default(bool?), string nodePublicIPPrefixID = default(string), string scaleSetPriority = default(string), string scaleSetEvictionPolicy = default(string), double? spotMaxPrice = default(double?), IDictionary tags = default(IDictionary), IDictionary nodeLabels = default(IDictionary), IList nodeTaints = default(IList), string proximityPlacementGroupID = default(string), KubeletConfig kubeletConfig = default(KubeletConfig), LinuxOSConfig linuxOSConfig = default(LinuxOSConfig), bool? enableEncryptionAtHost = default(bool?), bool? enableUltraSSD = default(bool?), bool? enableFIPS = default(bool?), string gpuInstanceProfile = default(string), CreationData creationData = default(CreationData), string hostGroupID = default(string)) - : base(id, name, type) + + /// Resource ID. + /// + + /// The name of the resource that is unique within a resource group. This name + /// can be used to access the resource. + /// + + /// Resource type + /// + + /// Determines the type of workload a node can run. + /// Possible values include: 'OCIContainer', 'WasmWasi' + + /// The operating system type. The default is Linux. + /// Possible values include: 'Linux', 'Windows' + + /// When an Agent Pool is first created it is initially Running. The Agent Pool + /// can be stopped by setting this field to Stopped. A stopped Agent Pool stops + /// all of its VMs and does not accrue billing charges. An Agent Pool can only + /// be stopped if it is Running and provisioning state is Succeeded + /// + + /// The Kubelet configuration on the agent pool nodes. + /// + + /// CreationData to be used to specify the source Snapshot ID if the node pool + /// will be created/upgraded using a snapshot. + /// + + /// Number of agents (VMs) to host docker containers. Allowed values must be in + /// the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to + /// 1000 (inclusive) for system pools. The default value is 1. + /// + + /// VM size availability varies by region. If a node contains insufficient + /// compute resources (memory, cpu, etc) pods might fail to run correctly. For + /// more details on restricted VM sizes, see: + /// https://docs.microsoft.com/azure/aks/quotas-skus-regions + /// + + /// OS Disk Size in GB to be used to specify the disk size for every machine in + /// the master/agent pool. If you specify 0, it will apply the default osDisk + /// size according to the vmSize specified. + /// + + /// The default is 'Ephemeral' if the VM supports it and has a cache disk + /// larger than the requested OSDiskSizeGB. Otherwise, defaults to 'Managed'. + /// May not be changed after creation. For more information see [Ephemeral + /// OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os). + /// Possible values include: 'Managed', 'Ephemeral' + + /// Determines the placement of emptyDir volumes, container runtime data root, + /// and Kubelet ephemeral storage. + /// Possible values include: 'OS', 'Temporary' + + /// If this is not specified, a VNET and subnet will be generated and used. If + /// no podSubnetID is specified, this applies to nodes and pods, otherwise it + /// applies to just nodes. This is of the form: + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName} + /// + + /// If omitted, pod IPs are statically assigned on the node subnet (see + /// vnetSubnetID for more details). This is of the form: + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName} + /// + + /// The maximum number of pods that can run on a node. + /// + + /// Specifies the OS SKU used by the agent pool. The default is Ubuntu if + /// OSType is Linux. The default is Windows2019 when Kubernetes <= 1.24 or + /// Windows2022 when Kubernetes >= 1.25 if OSType is Windows. + /// Possible values include: 'Ubuntu', 'AzureLinux', 'CBLMariner', + /// 'Windows2019', 'Windows2022' + + /// The maximum number of nodes for auto-scaling + /// + + /// The minimum number of nodes for auto-scaling + /// + + /// Whether to enable auto-scaler + /// + + /// This also effects the cluster autoscaler behavior. If not specified, it + /// defaults to Delete. + /// Possible values include: 'Delete', 'Deallocate' + + /// The type of Agent Pool. + /// Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' + + /// A cluster must have at least one 'System' Agent Pool at all times. For + /// additional information on agent pool restrictions and best practices, see: + /// https://docs.microsoft.com/azure/aks/use-system-pools + /// Possible values include: 'System', 'User' + + /// Both patch version (major.minor.patch) (e.g. 1.20.13) and (major.minor) + /// (e.g. 1.20) are supported. When (major.minor) is specified, the latest + /// supported GA patch version is chosen automatically. Updating the cluster + /// with the same (major.minor) once it has been created (e.g. 1.14.x -) 1.14) + /// will not trigger an upgrade, even if a newer patch version is available. As + /// a best practice, you should upgrade all node pools in an AKS cluster to the + /// same Kubernetes version. The node pool version must have the same major + /// version as the control plane. The node pool minor version must be within + /// two minor versions of the control plane version. The node pool version + /// cannot be greater than the control plane version. For more information see + /// [upgrading a node + /// pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). + /// + + /// If orchestratorVersion is a fully specified version (major.minor.patch), + /// this field will be exactly equal to it. If orchestratorVersion is + /// (major.minor), this field will contain the full (major.minor.patch) version + /// being used. + /// + + /// The version of node image + /// + + /// Settings for upgrading the agentpool + /// + + /// The current deployment or provisioning state. + /// + + /// The list of Availability zones to use for nodes. This can only be specified + /// if the AgentPoolType property is 'VirtualMachineScaleSets'. + /// + + /// Some scenarios may require nodes in a node pool to receive their own + /// dedicated public IP addresses. A common scenario is for gaming workloads, + /// where a console needs to make a direct connection to a cloud virtual + /// machine to minimize hops. For more information see [assigning a public IP + /// per + /// node](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#assign-a-public-ip-per-node-for-your-node-pools). + /// The default is false. + /// + + /// This is of the form: + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName} + /// + + /// The Virtual Machine Scale Set priority. If not specified, the default is + /// 'Regular'. + /// Possible values include: 'Spot', 'Regular' + + /// This cannot be specified unless the scaleSetPriority is 'Spot'. If not + /// specified, the default is 'Delete'. + /// Possible values include: 'Delete', 'Deallocate' + + /// Possible values are any decimal value greater than zero or -1 which + /// indicates the willingness to pay any on-demand price. For more details on + /// spot pricing, see [spot VMs + /// pricing](https://docs.microsoft.com/azure/virtual-machines/spot-vms#pricing) + /// + + /// The tags to be persisted on the agent pool virtual machine scale set. + /// + + /// The node labels to be persisted across all nodes in agent pool. + /// + + /// The taints added to new nodes during node pool create and scale. For + /// example, key=value:NoSchedule. + /// + + /// The ID for Proximity Placement Group. + /// + + /// The OS configuration of Linux agent nodes. + /// + + /// This is only supported on certain VM sizes and in certain Azure regions. + /// For more information, see: + /// https://docs.microsoft.com/azure/aks/enable-host-encryption + /// + + /// Whether to enable UltraSSD + /// + + /// See [Add a FIPS-enabled node + /// pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#add-a-fips-enabled-node-pool-preview) + /// for more details. + /// + + /// GPUInstanceProfile to be used to specify GPU MIG instance profile for + /// supported GPU VM SKU. + /// Possible values include: 'MIG1g', 'MIG2g', 'MIG3g', 'MIG4g', 'MIG7g' + + /// This is of the form: + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. + /// For more information see [Azure dedicated + /// hosts](https://docs.microsoft.com/azure/virtual-machines/dedicated-hosts). + /// + public AgentPool(string id = default(string), string name = default(string), string type = default(string), string workloadRuntime = default(string), string osType = default(string), PowerState powerState = default(PowerState), KubeletConfig kubeletConfig = default(KubeletConfig), CreationData creationData = default(CreationData), int? count = default(int?), string vmSize = default(string), int? osDiskSizeGb = default(int?), string osDiskType = default(string), string kubeletDiskType = default(string), string vnetSubnetId = default(string), string podSubnetId = default(string), int? maxPods = default(int?), string osSku = default(string), int? maxCount = default(int?), int? minCount = default(int?), bool? enableAutoScaling = default(bool?), string scaleDownMode = default(string), string agentPoolType = default(string), string mode = default(string), string orchestratorVersion = default(string), string currentOrchestratorVersion = default(string), string nodeImageVersion = default(string), AgentPoolUpgradeSettings upgradeSettings = default(AgentPoolUpgradeSettings), string provisioningState = default(string), System.Collections.Generic.IList availabilityZones = default(System.Collections.Generic.IList), bool? enableNodePublicIP = default(bool?), string nodePublicIPPrefixId = default(string), string scaleSetPriority = default(string), string scaleSetEvictionPolicy = default(string), double? spotMaxPrice = default(double?), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), System.Collections.Generic.IDictionary nodeLabels = default(System.Collections.Generic.IDictionary), System.Collections.Generic.IList nodeTaints = default(System.Collections.Generic.IList), string proximityPlacementGroupId = default(string), LinuxOSConfig linuxOSConfig = default(LinuxOSConfig), bool? enableEncryptionAtHost = default(bool?), bool? enableUltraSsd = default(bool?), bool? enableFips = default(bool?), string gpuInstanceProfile = default(string), string hostGroupId = default(string)) + + : base(id, name, type) { - Count = count; - VmSize = vmSize; - OsDiskSizeGB = osDiskSizeGB; - OsDiskType = osDiskType; - KubeletDiskType = kubeletDiskType; - WorkloadRuntime = workloadRuntime; - VnetSubnetID = vnetSubnetID; - PodSubnetID = podSubnetID; - MaxPods = maxPods; - OsType = osType; - OsSKU = osSKU; - MaxCount = maxCount; - MinCount = minCount; - EnableAutoScaling = enableAutoScaling; - ScaleDownMode = scaleDownMode; - AgentPoolType = agentPoolType; - Mode = mode; - OrchestratorVersion = orchestratorVersion; - CurrentOrchestratorVersion = currentOrchestratorVersion; - NodeImageVersion = nodeImageVersion; - UpgradeSettings = upgradeSettings; - ProvisioningState = provisioningState; - PowerState = powerState; - AvailabilityZones = availabilityZones; - EnableNodePublicIP = enableNodePublicIP; - NodePublicIPPrefixID = nodePublicIPPrefixID; - ScaleSetPriority = scaleSetPriority; - ScaleSetEvictionPolicy = scaleSetEvictionPolicy; - SpotMaxPrice = spotMaxPrice; - Tags = tags; - NodeLabels = nodeLabels; - NodeTaints = nodeTaints; - ProximityPlacementGroupID = proximityPlacementGroupID; - KubeletConfig = kubeletConfig; - LinuxOSConfig = linuxOSConfig; - EnableEncryptionAtHost = enableEncryptionAtHost; - EnableUltraSSD = enableUltraSSD; - EnableFIPS = enableFIPS; - GpuInstanceProfile = gpuInstanceProfile; - CreationData = creationData; - HostGroupID = hostGroupID; + this.WorkloadRuntime = workloadRuntime; + this.OSType = osType; + this.PowerState = powerState; + this.KubeletConfig = kubeletConfig; + this.CreationData = creationData; + this.Count = count; + this.VMSize = vmSize; + this.OSDiskSizeGb = osDiskSizeGb; + this.OSDiskType = osDiskType; + this.KubeletDiskType = kubeletDiskType; + this.VnetSubnetId = vnetSubnetId; + this.PodSubnetId = podSubnetId; + this.MaxPods = maxPods; + this.OSSku = osSku; + this.MaxCount = maxCount; + this.MinCount = minCount; + this.EnableAutoScaling = enableAutoScaling; + this.ScaleDownMode = scaleDownMode; + this.AgentPoolType = agentPoolType; + this.Mode = mode; + this.OrchestratorVersion = orchestratorVersion; + this.CurrentOrchestratorVersion = currentOrchestratorVersion; + this.NodeImageVersion = nodeImageVersion; + this.UpgradeSettings = upgradeSettings; + this.ProvisioningState = provisioningState; + this.AvailabilityZones = availabilityZones; + this.EnableNodePublicIP = enableNodePublicIP; + this.NodePublicIPPrefixId = nodePublicIPPrefixId; + this.ScaleSetPriority = scaleSetPriority; + this.ScaleSetEvictionPolicy = scaleSetEvictionPolicy; + this.SpotMaxPrice = spotMaxPrice; + this.Tags = tags; + this.NodeLabels = nodeLabels; + this.NodeTaints = nodeTaints; + this.ProximityPlacementGroupId = proximityPlacementGroupId; + this.LinuxOSConfig = linuxOSConfig; + this.EnableEncryptionAtHost = enableEncryptionAtHost; + this.EnableUltraSsd = enableUltraSsd; + this.EnableFips = enableFips; + this.GpuInstanceProfile = gpuInstanceProfile; + this.HostGroupId = hostGroupId; CustomInit(); } @@ -176,378 +272,370 @@ public AgentPool() /// partial void CustomInit(); + /// - /// Gets or sets number of agents (VMs) to host docker containers. - /// Allowed values must be in the range of 0 to 1000 (inclusive) for - /// user pools and in the range of 1 to 1000 (inclusive) for system - /// pools. The default value is 1. + /// Gets or sets determines the type of workload a node can run. Possible values include: 'OCIContainer', 'WasmWasi' /// - [JsonProperty(PropertyName = "properties.count")] - public int? Count { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.workloadRuntime")] + public string WorkloadRuntime {get; set; } /// - /// Gets or sets the size of the agent pool VMs. + /// Gets or sets the operating system type. The default is Linux. Possible values include: 'Linux', 'Windows' /// - /// - /// VM size availability varies by region. If a node contains - /// insufficient compute resources (memory, cpu, etc) pods might fail - /// to run correctly. For more details on restricted VM sizes, see: - /// https://docs.microsoft.com/azure/aks/quotas-skus-regions - /// - [JsonProperty(PropertyName = "properties.vmSize")] - public string VmSize { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.osType")] + public string OSType {get; set; } /// + /// Gets or sets when an Agent Pool is first created it is initially Running. + /// The Agent Pool can be stopped by setting this field to Stopped. A stopped + /// Agent Pool stops all of its VMs and does not accrue billing charges. An + /// Agent Pool can only be stopped if it is Running and provisioning state is + /// Succeeded /// - [JsonProperty(PropertyName = "properties.osDiskSizeGB")] - public int? OsDiskSizeGB { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.powerState")] + public PowerState PowerState {get; set; } /// - /// Gets or sets possible values include: 'Managed', 'Ephemeral' + /// Gets or sets the Kubelet configuration on the agent pool nodes. /// - [JsonProperty(PropertyName = "properties.osDiskType")] - public string OsDiskType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.kubeletConfig")] + public KubeletConfig KubeletConfig {get; set; } /// - /// Gets or sets possible values include: 'OS', 'Temporary' + /// Gets or sets creationData to be used to specify the source Snapshot ID if + /// the node pool will be created/upgraded using a snapshot. /// - [JsonProperty(PropertyName = "properties.kubeletDiskType")] - public string KubeletDiskType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.creationData")] + public CreationData CreationData {get; set; } /// - /// Gets or sets possible values include: 'OCIContainer', 'WasmWasi' + /// Gets or sets number of agents (VMs) to host docker containers. Allowed + /// values must be in the range of 0 to 1000 (inclusive) for user pools and in + /// the range of 1 to 1000 (inclusive) for system pools. The default value is + /// 1. /// - [JsonProperty(PropertyName = "properties.workloadRuntime")] - public string WorkloadRuntime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.count")] + public int? Count {get; set; } /// - /// Gets or sets the ID of the subnet which agent pool nodes and - /// optionally pods will join on startup. + /// Gets or sets vM size availability varies by region. If a node contains + /// insufficient compute resources (memory, cpu, etc) pods might fail to run + /// correctly. For more details on restricted VM sizes, see: + /// https://docs.microsoft.com/azure/aks/quotas-skus-regions /// - /// - /// If this is not specified, a VNET and subnet will be generated and - /// used. If no podSubnetID is specified, this applies to nodes and - /// pods, otherwise it applies to just nodes. This is of the form: - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName} - /// - [JsonProperty(PropertyName = "properties.vnetSubnetID")] - public string VnetSubnetID { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.vmSize")] + public string VMSize {get; set; } /// - /// Gets or sets the ID of the subnet which pods will join when - /// launched. + /// Gets or sets oS Disk Size in GB to be used to specify the disk size for + /// every machine in the master/agent pool. If you specify 0, it will apply the + /// default osDisk size according to the vmSize specified. /// - /// - /// If omitted, pod IPs are statically assigned on the node subnet (see - /// vnetSubnetID for more details). This is of the form: + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.osDiskSizeGB")] + public int? OSDiskSizeGb {get; set; } + + /// + /// Gets or sets the default is 'Ephemeral' if the VM supports it and has a + /// cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults to + /// 'Managed'. May not be changed after creation. For more information see + /// [Ephemeral + /// OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os). Possible values include: 'Managed', 'Ephemeral' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.osDiskType")] + public string OSDiskType {get; set; } + + /// + /// Gets or sets determines the placement of emptyDir volumes, container + /// runtime data root, and Kubelet ephemeral storage. Possible values include: 'OS', 'Temporary' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.kubeletDiskType")] + public string KubeletDiskType {get; set; } + + /// + /// Gets or sets if this is not specified, a VNET and subnet will be generated + /// and used. If no podSubnetID is specified, this applies to nodes and pods, + /// otherwise it applies to just nodes. This is of the form: /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName} - /// - [JsonProperty(PropertyName = "properties.podSubnetID")] - public string PodSubnetID { get; set; } + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.vnetSubnetID")] + public string VnetSubnetId {get; set; } /// - /// Gets or sets the maximum number of pods that can run on a node. + /// Gets or sets if omitted, pod IPs are statically assigned on the node subnet + /// (see vnetSubnetID for more details). This is of the form: + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName} /// - [JsonProperty(PropertyName = "properties.maxPods")] - public int? MaxPods { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.podSubnetID")] + public string PodSubnetId {get; set; } /// - /// Gets or sets possible values include: 'Linux', 'Windows' + /// Gets or sets the maximum number of pods that can run on a node. /// - [JsonProperty(PropertyName = "properties.osType")] - public string OsType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.maxPods")] + public int? MaxPods {get; set; } /// - /// Gets or sets possible values include: 'Ubuntu', 'AzureLinux', - /// 'CBLMariner', 'Windows2019', 'Windows2022' + /// Gets or sets specifies the OS SKU used by the agent pool. The default is + /// Ubuntu if OSType is Linux. The default is Windows2019 when Kubernetes <= + /// 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is Windows. Possible values include: 'Ubuntu', 'AzureLinux', 'CBLMariner', 'Windows2019', 'Windows2022' /// - [JsonProperty(PropertyName = "properties.osSKU")] - public string OsSKU { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.osSKU")] + public string OSSku {get; set; } /// /// Gets or sets the maximum number of nodes for auto-scaling /// - [JsonProperty(PropertyName = "properties.maxCount")] - public int? MaxCount { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.maxCount")] + public int? MaxCount {get; set; } /// /// Gets or sets the minimum number of nodes for auto-scaling /// - [JsonProperty(PropertyName = "properties.minCount")] - public int? MinCount { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.minCount")] + public int? MinCount {get; set; } /// /// Gets or sets whether to enable auto-scaler /// - [JsonProperty(PropertyName = "properties.enableAutoScaling")] - public bool? EnableAutoScaling { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.enableAutoScaling")] + public bool? EnableAutoScaling {get; set; } /// - /// Gets or sets the scale down mode to use when scaling the Agent - /// Pool. + /// Gets or sets this also effects the cluster autoscaler behavior. If not + /// specified, it defaults to Delete. Possible values include: 'Delete', 'Deallocate' /// - /// - /// This also effects the cluster autoscaler behavior. If not - /// specified, it defaults to Delete. Possible values include: - /// 'Delete', 'Deallocate' - /// - [JsonProperty(PropertyName = "properties.scaleDownMode")] - public string ScaleDownMode { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.scaleDownMode")] + public string ScaleDownMode {get; set; } /// - /// Gets or sets possible values include: 'VirtualMachineScaleSets', - /// 'AvailabilitySet' + /// Gets or sets the type of Agent Pool. Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' /// - [JsonProperty(PropertyName = "properties.type")] - public string AgentPoolType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.type")] + public string AgentPoolType {get; set; } /// - /// Gets or sets possible values include: 'System', 'User' + /// Gets or sets a cluster must have at least one 'System' Agent Pool at all + /// times. For additional information on agent pool restrictions and best + /// practices, see: https://docs.microsoft.com/azure/aks/use-system-pools Possible values include: 'System', 'User' /// - [JsonProperty(PropertyName = "properties.mode")] - public string Mode { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.mode")] + public string Mode {get; set; } /// - /// Gets or sets the version of Kubernetes specified by the user. - /// - /// - /// Both patch version (major.minor.patch) (e.g. 1.20.13) and - /// (major.minor) (e.g. 1.20) are supported. When (major.minor) is - /// specified, the latest supported GA patch version is chosen - /// automatically. Updating the cluster with the same (major.minor) - /// once it has been created (e.g. 1.14.x -) 1.14) will not trigger an - /// upgrade, even if a newer patch version is available. As a best - /// practice, you should upgrade all node pools in an AKS cluster to - /// the same Kubernetes version. The node pool version must have the - /// same major version as the control plane. The node pool minor - /// version must be within two minor versions of the control plane - /// version. The node pool version cannot be greater than the control - /// plane version. For more information see [upgrading a node + /// Gets or sets both patch version (major.minor.patch) (e.g. 1.20.13) and + /// (major.minor) (e.g. 1.20) are supported. When (major.minor) is specified, + /// the latest supported GA patch version is chosen automatically. Updating the + /// cluster with the same (major.minor) once it has been created (e.g. 1.14.x + /// -) 1.14) will not trigger an upgrade, even if a newer patch version is + /// available. As a best practice, you should upgrade all node pools in an AKS + /// cluster to the same Kubernetes version. The node pool version must have the + /// same major version as the control plane. The node pool minor version must + /// be within two minor versions of the control plane version. The node pool + /// version cannot be greater than the control plane version. For more + /// information see [upgrading a node /// pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). - /// - [JsonProperty(PropertyName = "properties.orchestratorVersion")] - public string OrchestratorVersion { get; set; } + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.orchestratorVersion")] + public string OrchestratorVersion {get; set; } /// - /// Gets the version of Kubernetes the Agent Pool is running. - /// - /// - /// If orchestratorVersion is a fully specified version + /// Gets if orchestratorVersion is a fully specified version /// (major.minor.patch), this field will be exactly equal to it. If - /// orchestratorVersion is (major.minor), this field will contain the - /// full (major.minor.patch) version being used. - /// - [JsonProperty(PropertyName = "properties.currentOrchestratorVersion")] - public string CurrentOrchestratorVersion { get; private set; } + /// orchestratorVersion is (major.minor), this field will contain the full + /// (major.minor.patch) version being used. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.currentOrchestratorVersion")] + public string CurrentOrchestratorVersion {get; private set; } /// /// Gets the version of node image /// - [JsonProperty(PropertyName = "properties.nodeImageVersion")] - public string NodeImageVersion { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.nodeImageVersion")] + public string NodeImageVersion {get; private set; } /// /// Gets or sets settings for upgrading the agentpool /// - [JsonProperty(PropertyName = "properties.upgradeSettings")] - public AgentPoolUpgradeSettings UpgradeSettings { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.upgradeSettings")] + public AgentPoolUpgradeSettings UpgradeSettings {get; set; } /// /// Gets the current deployment or provisioning state. /// - [JsonProperty(PropertyName = "properties.provisioningState")] - public string ProvisioningState { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.provisioningState")] + public string ProvisioningState {get; private set; } /// - /// Gets or sets whether the Agent Pool is running or stopped. + /// Gets or sets the list of Availability zones to use for nodes. This can only + /// be specified if the AgentPoolType property is 'VirtualMachineScaleSets'. /// - /// - /// When an Agent Pool is first created it is initially Running. The - /// Agent Pool can be stopped by setting this field to Stopped. A - /// stopped Agent Pool stops all of its VMs and does not accrue billing - /// charges. An Agent Pool can only be stopped if it is Running and - /// provisioning state is Succeeded - /// - [JsonProperty(PropertyName = "properties.powerState")] - public PowerState PowerState { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.availabilityZones")] + public System.Collections.Generic.IList AvailabilityZones {get; set; } /// - /// Gets or sets the list of Availability zones to use for nodes. This - /// can only be specified if the AgentPoolType property is - /// 'VirtualMachineScaleSets'. - /// - [JsonProperty(PropertyName = "properties.availabilityZones")] - public IList AvailabilityZones { get; set; } - - /// - /// Gets or sets whether each node is allocated its own public IP. - /// - /// - /// Some scenarios may require nodes in a node pool to receive their - /// own dedicated public IP addresses. A common scenario is for gaming - /// workloads, where a console needs to make a direct connection to a - /// cloud virtual machine to minimize hops. For more information see - /// [assigning a public IP per + /// Gets or sets some scenarios may require nodes in a node pool to receive + /// their own dedicated public IP addresses. A common scenario is for gaming + /// workloads, where a console needs to make a direct connection to a cloud + /// virtual machine to minimize hops. For more information see [assigning a + /// public IP per /// node](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#assign-a-public-ip-per-node-for-your-node-pools). /// The default is false. - /// - [JsonProperty(PropertyName = "properties.enableNodePublicIP")] - public bool? EnableNodePublicIP { get; set; } + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.enableNodePublicIP")] + public bool? EnableNodePublicIP {get; set; } /// - /// Gets or sets the public IP prefix ID which VM nodes should use IPs - /// from. - /// - /// - /// This is of the form: + /// Gets or sets this is of the form: /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName} - /// - [JsonProperty(PropertyName = "properties.nodePublicIPPrefixID")] - public string NodePublicIPPrefixID { get; set; } + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.nodePublicIPPrefixID")] + public string NodePublicIPPrefixId {get; set; } /// - /// Gets or sets the Virtual Machine Scale Set priority. If not - /// specified, the default is 'Regular'. Possible values include: - /// 'Spot', 'Regular' + /// Gets or sets the Virtual Machine Scale Set priority. If not specified, the + /// default is 'Regular'. Possible values include: 'Spot', 'Regular' /// - [JsonProperty(PropertyName = "properties.scaleSetPriority")] - public string ScaleSetPriority { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.scaleSetPriority")] + public string ScaleSetPriority {get; set; } /// - /// Gets or sets the Virtual Machine Scale Set eviction policy to use. + /// Gets or sets this cannot be specified unless the scaleSetPriority is + /// 'Spot'. If not specified, the default is 'Delete'. Possible values include: 'Delete', 'Deallocate' /// - /// - /// This cannot be specified unless the scaleSetPriority is 'Spot'. If - /// not specified, the default is 'Delete'. Possible values include: - /// 'Delete', 'Deallocate' - /// - [JsonProperty(PropertyName = "properties.scaleSetEvictionPolicy")] - public string ScaleSetEvictionPolicy { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.scaleSetEvictionPolicy")] + public string ScaleSetEvictionPolicy {get; set; } /// - /// Gets or sets the max price (in US Dollars) you are willing to pay - /// for spot instances. Possible values are any decimal value greater - /// than zero or -1 which indicates default price to be up-to - /// on-demand. - /// - /// - /// Possible values are any decimal value greater than zero or -1 which - /// indicates the willingness to pay any on-demand price. For more + /// Gets or sets possible values are any decimal value greater than zero or -1 + /// which indicates the willingness to pay any on-demand price. For more /// details on spot pricing, see [spot VMs /// pricing](https://docs.microsoft.com/azure/virtual-machines/spot-vms#pricing) - /// - [JsonProperty(PropertyName = "properties.spotMaxPrice")] - public double? SpotMaxPrice { get; set; } - - /// - /// Gets or sets the tags to be persisted on the agent pool virtual - /// machine scale set. /// - [JsonProperty(PropertyName = "properties.tags")] - public IDictionary Tags { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.spotMaxPrice")] + public double? SpotMaxPrice {get; set; } /// - /// Gets or sets the node labels to be persisted across all nodes in - /// agent pool. + /// Gets or sets the tags to be persisted on the agent pool virtual machine + /// scale set. /// - [JsonProperty(PropertyName = "properties.nodeLabels")] - public IDictionary NodeLabels { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.tags")] + public System.Collections.Generic.IDictionary Tags {get; set; } /// - /// Gets or sets the taints added to new nodes during node pool create - /// and scale. For example, key=value:NoSchedule. + /// Gets or sets the node labels to be persisted across all nodes in agent + /// pool. /// - [JsonProperty(PropertyName = "properties.nodeTaints")] - public IList NodeTaints { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.nodeLabels")] + public System.Collections.Generic.IDictionary NodeLabels {get; set; } /// - /// Gets or sets the ID for Proximity Placement Group. + /// Gets or sets the taints added to new nodes during node pool create and + /// scale. For example, key=value:NoSchedule. /// - [JsonProperty(PropertyName = "properties.proximityPlacementGroupID")] - public string ProximityPlacementGroupID { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.nodeTaints")] + public System.Collections.Generic.IList NodeTaints {get; set; } /// - /// Gets or sets the Kubelet configuration on the agent pool nodes. + /// Gets or sets the ID for Proximity Placement Group. /// - [JsonProperty(PropertyName = "properties.kubeletConfig")] - public KubeletConfig KubeletConfig { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.proximityPlacementGroupID")] + public string ProximityPlacementGroupId {get; set; } /// /// Gets or sets the OS configuration of Linux agent nodes. /// - [JsonProperty(PropertyName = "properties.linuxOSConfig")] - public LinuxOSConfig LinuxOSConfig { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.linuxOSConfig")] + public LinuxOSConfig LinuxOSConfig {get; set; } /// - /// Gets or sets whether to enable host based OS and data drive - /// encryption. - /// - /// - /// This is only supported on certain VM sizes and in certain Azure - /// regions. For more information, see: + /// Gets or sets this is only supported on certain VM sizes and in certain + /// Azure regions. For more information, see: /// https://docs.microsoft.com/azure/aks/enable-host-encryption - /// - [JsonProperty(PropertyName = "properties.enableEncryptionAtHost")] - public bool? EnableEncryptionAtHost { get; set; } + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.enableEncryptionAtHost")] + public bool? EnableEncryptionAtHost {get; set; } /// /// Gets or sets whether to enable UltraSSD /// - [JsonProperty(PropertyName = "properties.enableUltraSSD")] - public bool? EnableUltraSSD { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.enableUltraSSD")] + public bool? EnableUltraSsd {get; set; } /// - /// Gets or sets whether to use a FIPS-enabled OS. - /// - /// - /// See [Add a FIPS-enabled node + /// Gets or sets see [Add a FIPS-enabled node /// pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#add-a-fips-enabled-node-pool-preview) /// for more details. - /// - [JsonProperty(PropertyName = "properties.enableFIPS")] - public bool? EnableFIPS { get; set; } - - /// - /// Gets or sets gPUInstanceProfile to be used to specify GPU MIG - /// instance profile for supported GPU VM SKU. Possible values include: - /// 'MIG1g', 'MIG2g', 'MIG3g', 'MIG4g', 'MIG7g' /// - [JsonProperty(PropertyName = "properties.gpuInstanceProfile")] - public string GpuInstanceProfile { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.enableFIPS")] + public bool? EnableFips {get; set; } /// - /// Gets or sets creationData to be used to specify the source Snapshot - /// ID if the node pool will be created/upgraded using a snapshot. + /// Gets or sets gPUInstanceProfile to be used to specify GPU MIG instance + /// profile for supported GPU VM SKU. Possible values include: 'MIG1g', 'MIG2g', 'MIG3g', 'MIG4g', 'MIG7g' /// - [JsonProperty(PropertyName = "properties.creationData")] - public CreationData CreationData { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.gpuInstanceProfile")] + public string GpuInstanceProfile {get; set; } /// - /// Gets or sets the fully qualified resource ID of the Dedicated Host - /// Group to provision virtual machines from, used only in creation - /// scenario and not allowed to changed once set. - /// - /// - /// This is of the form: + /// Gets or sets this is of the form: /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. /// For more information see [Azure dedicated /// hosts](https://docs.microsoft.com/azure/virtual-machines/dedicated-hosts). - /// - [JsonProperty(PropertyName = "properties.hostGroupID")] - public string HostGroupID { get; set; } - + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.hostGroupID")] + public string HostGroupId {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (KubeletConfig != null) + + + + if (this.KubeletConfig != null) + { + this.KubeletConfig.Validate(); + } + + + if (this.OSDiskSizeGb != null) { - KubeletConfig.Validate(); + if (this.OSDiskSizeGb > 2048) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.InclusiveMaximum, "OSDiskSizeGb", 2048); + } + if (this.OSDiskSizeGb < 0) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.InclusiveMinimum, "OSDiskSizeGb", 0); + } } + + + + + + + + + + + + + + + + + + + + + + + + } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/AgentPoolAvailableVersions.cs b/src/Aks/Aks.Sdk/Generated/Models/AgentPoolAvailableVersions.cs index 45b6877f4dbb..4d7312aa5d6d 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/AgentPoolAvailableVersions.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/AgentPoolAvailableVersions.cs @@ -1,26 +1,16 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// /// The list of available versions for an agent pool. /// - [Rest.Serialization.JsonTransformation] + [Microsoft.Rest.Serialization.JsonTransformation] public partial class AgentPoolAvailableVersions { /// @@ -34,17 +24,25 @@ public AgentPoolAvailableVersions() /// /// Initializes a new instance of the AgentPoolAvailableVersions class. /// - /// The ID of the agent pool version list. - /// The name of the agent pool version list. - /// Type of the agent pool version list. - /// List of versions available for - /// agent pool. - public AgentPoolAvailableVersions(string id = default(string), string name = default(string), string type = default(string), IList agentPoolVersions = default(IList)) + + /// The ID of the agent pool version list. + /// + + /// The name of the agent pool version list. + /// + + /// Type of the agent pool version list. + /// + + /// List of versions available for agent pool. + /// + public AgentPoolAvailableVersions(string id = default(string), string name = default(string), string type = default(string), System.Collections.Generic.IList agentPoolVersions = default(System.Collections.Generic.IList)) + { - Id = id; - Name = name; - Type = type; - AgentPoolVersions = agentPoolVersions; + this.Id = id; + this.Name = name; + this.Type = type; + this.AgentPoolVersions = agentPoolVersions; CustomInit(); } @@ -53,29 +51,29 @@ public AgentPoolAvailableVersions() /// partial void CustomInit(); + /// /// Gets the ID of the agent pool version list. /// - [JsonProperty(PropertyName = "id")] - public string Id { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "id")] + public string Id {get; private set; } /// /// Gets the name of the agent pool version list. /// - [JsonProperty(PropertyName = "name")] - public string Name { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; private set; } /// /// Gets type of the agent pool version list. /// - [JsonProperty(PropertyName = "type")] - public string Type { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public string Type {get; private set; } /// /// Gets or sets list of versions available for agent pool. /// - [JsonProperty(PropertyName = "properties.agentPoolVersions")] - public IList AgentPoolVersions { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.agentPoolVersions")] + public System.Collections.Generic.IList AgentPoolVersions {get; set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/AgentPoolAvailableVersionsProperties.cs b/src/Aks/Aks.Sdk/Generated/Models/AgentPoolAvailableVersionsProperties.cs new file mode 100644 index 000000000000..368f87ede562 --- /dev/null +++ b/src/Aks/Aks.Sdk/Generated/Models/AgentPoolAvailableVersionsProperties.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.ContainerService.Models +{ + using System.Linq; + + /// + /// The list of available agent pool versions. + /// + public partial class AgentPoolAvailableVersionsProperties + { + /// + /// Initializes a new instance of the AgentPoolAvailableVersionsProperties class. + /// + public AgentPoolAvailableVersionsProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AgentPoolAvailableVersionsProperties class. + /// + + /// List of versions available for agent pool. + /// + public AgentPoolAvailableVersionsProperties(System.Collections.Generic.IList agentPoolVersions = default(System.Collections.Generic.IList)) + + { + this.AgentPoolVersions = agentPoolVersions; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets list of versions available for agent pool. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "agentPoolVersions")] + public System.Collections.Generic.IList AgentPoolVersions {get; set; } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.cs b/src/Aks/Aks.Sdk/Generated/Models/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.cs index 36db10a23d0b..7afef134b413 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.cs @@ -1,23 +1,16 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; using System.Linq; public partial class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem { /// - /// Initializes a new instance of the - /// AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem class. + /// Initializes a new instance of the AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem class. /// public AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem() { @@ -25,20 +18,23 @@ public AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem() } /// - /// Initializes a new instance of the - /// AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem class. + /// Initializes a new instance of the AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem class. /// - /// Whether this version is the default - /// agent pool version. - /// The Kubernetes version - /// (major.minor.patch). - /// Whether Kubernetes version is currently in - /// preview. + + /// Whether this version is the default agent pool version. + /// + + /// The Kubernetes version (major.minor.patch). + /// + + /// Whether Kubernetes version is currently in preview. + /// public AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(bool? defaultProperty = default(bool?), string kubernetesVersion = default(string), bool? isPreview = default(bool?)) + { - DefaultProperty = defaultProperty; - KubernetesVersion = kubernetesVersion; - IsPreview = isPreview; + this.DefaultProperty = defaultProperty; + this.KubernetesVersion = kubernetesVersion; + this.IsPreview = isPreview; CustomInit(); } @@ -47,24 +43,23 @@ public AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem() /// partial void CustomInit(); + /// - /// Gets or sets whether this version is the default agent pool - /// version. + /// Gets or sets whether this version is the default agent pool version. /// - [JsonProperty(PropertyName = "default")] - public bool? DefaultProperty { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "default")] + public bool? DefaultProperty {get; set; } /// /// Gets or sets the Kubernetes version (major.minor.patch). /// - [JsonProperty(PropertyName = "kubernetesVersion")] - public string KubernetesVersion { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "kubernetesVersion")] + public string KubernetesVersion {get; set; } /// /// Gets or sets whether Kubernetes version is currently in preview. /// - [JsonProperty(PropertyName = "isPreview")] - public bool? IsPreview { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "isPreview")] + public bool? IsPreview {get; set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/AgentPoolMode.cs b/src/Aks/Aks.Sdk/Generated/Models/AgentPoolMode.cs index 184ed2de99a5..f1db6711ffea 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/AgentPoolMode.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/AgentPoolMode.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { @@ -14,13 +9,12 @@ namespace Microsoft.Azure.Management.ContainerService.Models /// /// Defines values for AgentPoolMode. /// + + public static class AgentPoolMode { /// - /// System agent pools are primarily for hosting critical system pods - /// such as CoreDNS and metrics-server. System agent pools osType must - /// be Linux. System agent pools VM SKU must have at least 2vCPUs and - /// 4GB of memory. + /// System agent pools are primarily for hosting critical system pods such as CoreDNS and metrics-server. System agent pools osType must be Linux. System agent pools VM SKU must have at least 2vCPUs and 4GB of memory. /// public const string System = "System"; /// @@ -28,4 +22,4 @@ public static class AgentPoolMode /// public const string User = "User"; } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/AgentPoolType.cs b/src/Aks/Aks.Sdk/Generated/Models/AgentPoolType.cs index 254c206222fd..b500f023daf4 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/AgentPoolType.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/AgentPoolType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.ContainerService.Models /// /// Defines values for AgentPoolType. /// + + public static class AgentPoolType { /// @@ -25,4 +22,4 @@ public static class AgentPoolType /// public const string AvailabilitySet = "AvailabilitySet"; } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/AgentPoolUpgradeProfile.cs b/src/Aks/Aks.Sdk/Generated/Models/AgentPoolUpgradeProfile.cs index 6eeb818182ee..732670515209 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/AgentPoolUpgradeProfile.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/AgentPoolUpgradeProfile.cs @@ -1,26 +1,16 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// /// The list of available upgrades for an agent pool. /// - [Rest.Serialization.JsonTransformation] + [Microsoft.Rest.Serialization.JsonTransformation] public partial class AgentPoolUpgradeProfile { /// @@ -34,28 +24,37 @@ public AgentPoolUpgradeProfile() /// /// Initializes a new instance of the AgentPoolUpgradeProfile class. /// - /// The Kubernetes version - /// (major.minor.patch). - /// Possible values include: 'Linux', - /// 'Windows' - /// The ID of the agent pool upgrade profile. - /// The name of the agent pool upgrade - /// profile. - /// The type of the agent pool upgrade - /// profile. - /// List of orchestrator types and versions - /// available for upgrade. - /// The latest AKS supported node - /// image version. - public AgentPoolUpgradeProfile(string kubernetesVersion, string osType, string id = default(string), string name = default(string), string type = default(string), IList upgrades = default(IList), string latestNodeImageVersion = default(string)) + + /// The ID of the agent pool upgrade profile. + /// + + /// The name of the agent pool upgrade profile. + /// + + /// The type of the agent pool upgrade profile. + /// + + /// The operating system type. The default is Linux. + /// Possible values include: 'Linux', 'Windows' + + /// The Kubernetes version (major.minor.patch). + /// + + /// List of orchestrator types and versions available for upgrade. + /// + + /// The latest AKS supported node image version. + /// + public AgentPoolUpgradeProfile(string osType, string kubernetesVersion, string id = default(string), string name = default(string), string type = default(string), System.Collections.Generic.IList upgrades = default(System.Collections.Generic.IList), string latestNodeImageVersion = default(string)) + { - Id = id; - Name = name; - Type = type; - KubernetesVersion = kubernetesVersion; - OsType = osType; - Upgrades = upgrades; - LatestNodeImageVersion = latestNodeImageVersion; + this.Id = id; + this.Name = name; + this.Type = type; + this.OSType = osType; + this.KubernetesVersion = kubernetesVersion; + this.Upgrades = upgrades; + this.LatestNodeImageVersion = latestNodeImageVersion; CustomInit(); } @@ -64,65 +63,71 @@ public AgentPoolUpgradeProfile() /// partial void CustomInit(); + /// /// Gets the ID of the agent pool upgrade profile. /// - [JsonProperty(PropertyName = "id")] - public string Id { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "id")] + public string Id {get; private set; } /// /// Gets the name of the agent pool upgrade profile. /// - [JsonProperty(PropertyName = "name")] - public string Name { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; private set; } /// /// Gets the type of the agent pool upgrade profile. /// - [JsonProperty(PropertyName = "type")] - public string Type { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public string Type {get; private set; } /// - /// Gets or sets the Kubernetes version (major.minor.patch). + /// Gets or sets the operating system type. The default is Linux. Possible values include: 'Linux', 'Windows' /// - [JsonProperty(PropertyName = "properties.kubernetesVersion")] - public string KubernetesVersion { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.osType")] + public string OSType {get; set; } /// - /// Gets or sets possible values include: 'Linux', 'Windows' + /// Gets or sets the Kubernetes version (major.minor.patch). /// - [JsonProperty(PropertyName = "properties.osType")] - public string OsType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.kubernetesVersion")] + public string KubernetesVersion {get; set; } /// - /// Gets or sets list of orchestrator types and versions available for - /// upgrade. + /// Gets or sets list of orchestrator types and versions available for upgrade. /// - [JsonProperty(PropertyName = "properties.upgrades")] - public IList Upgrades { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.upgrades")] + public System.Collections.Generic.IList Upgrades {get; set; } /// /// Gets or sets the latest AKS supported node image version. /// - [JsonProperty(PropertyName = "properties.latestNodeImageVersion")] - public string LatestNodeImageVersion { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.latestNodeImageVersion")] + public string LatestNodeImageVersion {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (KubernetesVersion == null) + if (this.OSType == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "KubernetesVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "OSType"); } - if (OsType == null) + if (this.KubernetesVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "OsType"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "KubernetesVersion"); } + + + + + + + } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/AgentPoolUpgradeProfileProperties.cs b/src/Aks/Aks.Sdk/Generated/Models/AgentPoolUpgradeProfileProperties.cs new file mode 100644 index 000000000000..89505a0935e9 --- /dev/null +++ b/src/Aks/Aks.Sdk/Generated/Models/AgentPoolUpgradeProfileProperties.cs @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.ContainerService.Models +{ + using System.Linq; + + /// + /// The list of available upgrade versions. + /// + public partial class AgentPoolUpgradeProfileProperties + { + /// + /// Initializes a new instance of the AgentPoolUpgradeProfileProperties class. + /// + public AgentPoolUpgradeProfileProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AgentPoolUpgradeProfileProperties class. + /// + + /// The Kubernetes version (major.minor.patch). + /// + + /// The operating system type. The default is Linux. + /// Possible values include: 'Linux', 'Windows' + + /// List of orchestrator types and versions available for upgrade. + /// + + /// The latest AKS supported node image version. + /// + public AgentPoolUpgradeProfileProperties(string kubernetesVersion, string osType, System.Collections.Generic.IList upgrades = default(System.Collections.Generic.IList), string latestNodeImageVersion = default(string)) + + { + this.KubernetesVersion = kubernetesVersion; + this.OSType = osType; + this.Upgrades = upgrades; + this.LatestNodeImageVersion = latestNodeImageVersion; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the Kubernetes version (major.minor.patch). + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "kubernetesVersion")] + public string KubernetesVersion {get; set; } + + /// + /// Gets or sets the operating system type. The default is Linux. Possible values include: 'Linux', 'Windows' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "osType")] + public string OSType {get; set; } + + /// + /// Gets or sets list of orchestrator types and versions available for upgrade. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "upgrades")] + public System.Collections.Generic.IList Upgrades {get; set; } + + /// + /// Gets or sets the latest AKS supported node image version. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "latestNodeImageVersion")] + public string LatestNodeImageVersion {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.KubernetesVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "KubernetesVersion"); + } + if (this.OSType == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "OSType"); + } + + + + + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/AgentPoolUpgradeProfilePropertiesUpgradesItem.cs b/src/Aks/Aks.Sdk/Generated/Models/AgentPoolUpgradeProfilePropertiesUpgradesItem.cs index 7050cca7ee8b..52d6ee8696ca 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/AgentPoolUpgradeProfilePropertiesUpgradesItem.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/AgentPoolUpgradeProfilePropertiesUpgradesItem.cs @@ -1,23 +1,16 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; using System.Linq; public partial class AgentPoolUpgradeProfilePropertiesUpgradesItem { /// - /// Initializes a new instance of the - /// AgentPoolUpgradeProfilePropertiesUpgradesItem class. + /// Initializes a new instance of the AgentPoolUpgradeProfilePropertiesUpgradesItem class. /// public AgentPoolUpgradeProfilePropertiesUpgradesItem() { @@ -25,17 +18,19 @@ public AgentPoolUpgradeProfilePropertiesUpgradesItem() } /// - /// Initializes a new instance of the - /// AgentPoolUpgradeProfilePropertiesUpgradesItem class. + /// Initializes a new instance of the AgentPoolUpgradeProfilePropertiesUpgradesItem class. /// - /// The Kubernetes version - /// (major.minor.patch). - /// Whether the Kubernetes version is currently - /// in preview. + + /// The Kubernetes version (major.minor.patch). + /// + + /// Whether the Kubernetes version is currently in preview. + /// public AgentPoolUpgradeProfilePropertiesUpgradesItem(string kubernetesVersion = default(string), bool? isPreview = default(bool?)) + { - KubernetesVersion = kubernetesVersion; - IsPreview = isPreview; + this.KubernetesVersion = kubernetesVersion; + this.IsPreview = isPreview; CustomInit(); } @@ -44,18 +39,17 @@ public AgentPoolUpgradeProfilePropertiesUpgradesItem() /// partial void CustomInit(); + /// /// Gets or sets the Kubernetes version (major.minor.patch). /// - [JsonProperty(PropertyName = "kubernetesVersion")] - public string KubernetesVersion { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "kubernetesVersion")] + public string KubernetesVersion {get; set; } /// - /// Gets or sets whether the Kubernetes version is currently in - /// preview. + /// Gets or sets whether the Kubernetes version is currently in preview. /// - [JsonProperty(PropertyName = "isPreview")] - public bool? IsPreview { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "isPreview")] + public bool? IsPreview {get; set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/AgentPoolUpgradeSettings.cs b/src/Aks/Aks.Sdk/Generated/Models/AgentPoolUpgradeSettings.cs index 852c8ba1d251..a3261cff67a0 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/AgentPoolUpgradeSettings.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/AgentPoolUpgradeSettings.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,11 +23,18 @@ public AgentPoolUpgradeSettings() /// /// Initializes a new instance of the AgentPoolUpgradeSettings class. /// - /// The maximum number or percentage of nodes - /// that are surged during upgrade. + + /// This can either be set to an integer (e.g. '5') or a percentage (e.g. + /// '50%'). If a percentage is specified, it is the percentage of the total + /// agent pool size at the time of the upgrade. For percentages, fractional + /// nodes are rounded up. If not specified, the default is 1. For more + /// information, including best practices, see: + /// https://docs.microsoft.com/azure/aks/upgrade-cluster#customize-node-surge-upgrade + /// public AgentPoolUpgradeSettings(string maxSurge = default(string)) + { - MaxSurge = maxSurge; + this.MaxSurge = maxSurge; CustomInit(); } @@ -42,20 +43,16 @@ public AgentPoolUpgradeSettings() /// partial void CustomInit(); + /// - /// Gets or sets the maximum number or percentage of nodes that are - /// surged during upgrade. - /// - /// - /// This can either be set to an integer (e.g. '5') or a percentage - /// (e.g. '50%'). If a percentage is specified, it is the percentage of - /// the total agent pool size at the time of the upgrade. For - /// percentages, fractional nodes are rounded up. If not specified, the - /// default is 1. For more information, including best practices, see: + /// Gets or sets this can either be set to an integer (e.g. '5') or a + /// percentage (e.g. '50%'). If a percentage is specified, it is the percentage + /// of the total agent pool size at the time of the upgrade. For percentages, + /// fractional nodes are rounded up. If not specified, the default is 1. For + /// more information, including best practices, see: /// https://docs.microsoft.com/azure/aks/upgrade-cluster#customize-node-surge-upgrade - /// - [JsonProperty(PropertyName = "maxSurge")] - public string MaxSurge { get; set; } - + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "maxSurge")] + public string MaxSurge {get; set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/AgentPoolsAbortLatestOperationHeaders.cs b/src/Aks/Aks.Sdk/Generated/Models/AgentPoolsAbortLatestOperationHeaders.cs index 5486c06e13ef..670838e41c24 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/AgentPoolsAbortLatestOperationHeaders.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/AgentPoolsAbortLatestOperationHeaders.cs @@ -1,26 +1,16 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; using System.Linq; - /// - /// Defines headers for AbortLatestOperation operation. - /// public partial class AgentPoolsAbortLatestOperationHeaders { /// - /// Initializes a new instance of the - /// AgentPoolsAbortLatestOperationHeaders class. + /// Initializes a new instance of the AgentPoolsAbortLatestOperationHeaders class. /// public AgentPoolsAbortLatestOperationHeaders() { @@ -28,17 +18,19 @@ public AgentPoolsAbortLatestOperationHeaders() } /// - /// Initializes a new instance of the - /// AgentPoolsAbortLatestOperationHeaders class. + /// Initializes a new instance of the AgentPoolsAbortLatestOperationHeaders class. /// - /// URL to query for status of the - /// operation. - /// URL to query for status of the - /// operation. + + /// + /// + + /// + /// public AgentPoolsAbortLatestOperationHeaders(string location = default(string), string azureAsyncOperation = default(string)) + { - Location = location; - AzureAsyncOperation = azureAsyncOperation; + this.Location = location; + this.AzureAsyncOperation = azureAsyncOperation; CustomInit(); } @@ -47,17 +39,17 @@ public AgentPoolsAbortLatestOperationHeaders() /// partial void CustomInit(); + /// - /// Gets or sets URL to query for status of the operation. + /// Gets or sets /// - [JsonProperty(PropertyName = "location")] - public string Location { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "location")] + public string Location {get; set; } /// - /// Gets or sets URL to query for status of the operation. + /// Gets or sets /// - [JsonProperty(PropertyName = "Azure-AsyncOperation")] - public string AzureAsyncOperation { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "Azure-AsyncOperation")] + public string AzureAsyncOperation {get; set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/AgentPoolsDeleteHeaders.cs b/src/Aks/Aks.Sdk/Generated/Models/AgentPoolsDeleteHeaders.cs index 370e0660d72c..f9cc52470af8 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/AgentPoolsDeleteHeaders.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/AgentPoolsDeleteHeaders.cs @@ -1,21 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; using System.Linq; - /// - /// Defines headers for Delete operation. - /// public partial class AgentPoolsDeleteHeaders { /// @@ -29,11 +20,13 @@ public AgentPoolsDeleteHeaders() /// /// Initializes a new instance of the AgentPoolsDeleteHeaders class. /// - /// URL to query for status of the - /// operation. + + /// + /// public AgentPoolsDeleteHeaders(string location = default(string)) + { - Location = location; + this.Location = location; CustomInit(); } @@ -42,11 +35,11 @@ public AgentPoolsDeleteHeaders() /// partial void CustomInit(); + /// - /// Gets or sets URL to query for status of the operation. + /// Gets or sets /// - [JsonProperty(PropertyName = "Location")] - public string Location { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "Location")] + public string Location {get; set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/AgentPoolsUpgradeNodeImageVersionHeaders.cs b/src/Aks/Aks.Sdk/Generated/Models/AgentPoolsUpgradeNodeImageVersionHeaders.cs index 6b8f401fe88f..086380d1fa0a 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/AgentPoolsUpgradeNodeImageVersionHeaders.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/AgentPoolsUpgradeNodeImageVersionHeaders.cs @@ -1,26 +1,16 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; using System.Linq; - /// - /// Defines headers for UpgradeNodeImageVersion operation. - /// public partial class AgentPoolsUpgradeNodeImageVersionHeaders { /// - /// Initializes a new instance of the - /// AgentPoolsUpgradeNodeImageVersionHeaders class. + /// Initializes a new instance of the AgentPoolsUpgradeNodeImageVersionHeaders class. /// public AgentPoolsUpgradeNodeImageVersionHeaders() { @@ -28,14 +18,15 @@ public AgentPoolsUpgradeNodeImageVersionHeaders() } /// - /// Initializes a new instance of the - /// AgentPoolsUpgradeNodeImageVersionHeaders class. + /// Initializes a new instance of the AgentPoolsUpgradeNodeImageVersionHeaders class. /// - /// URL to query for status of the - /// operation. + + /// + /// public AgentPoolsUpgradeNodeImageVersionHeaders(string azureAsyncOperation = default(string)) + { - AzureAsyncOperation = azureAsyncOperation; + this.AzureAsyncOperation = azureAsyncOperation; CustomInit(); } @@ -44,11 +35,11 @@ public AgentPoolsUpgradeNodeImageVersionHeaders() /// partial void CustomInit(); + /// - /// Gets or sets URL to query for status of the operation. + /// Gets or sets /// - [JsonProperty(PropertyName = "Azure-AsyncOperation")] - public string AzureAsyncOperation { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "Azure-AsyncOperation")] + public string AzureAsyncOperation {get; set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/AzureEntityResource.cs b/src/Aks/Aks.Sdk/Generated/Models/AzureEntityResource.cs deleted file mode 100644 index 48921d711c78..000000000000 --- a/src/Aks/Aks.Sdk/Generated/Models/AzureEntityResource.cs +++ /dev/null @@ -1,64 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.ContainerService.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Entity Resource - /// - /// - /// The resource model definition for an Azure Resource Manager resource - /// with an etag. - /// - public partial class AzureEntityResource : Resource - { - /// - /// Initializes a new instance of the AzureEntityResource class. - /// - public AzureEntityResource() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the AzureEntityResource class. - /// - /// Fully qualified resource ID for the resource. Ex - - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - /// The name of the resource - /// The type of the resource. E.g. - /// "Microsoft.Compute/virtualMachines" or - /// "Microsoft.Storage/storageAccounts" - /// Azure Resource Manager metadata containing - /// createdBy and modifiedBy information. - /// Resource Etag. - public AzureEntityResource(string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string etag = default(string)) - : base(id, name, type, systemData) - { - Etag = etag; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets resource Etag. - /// - [JsonProperty(PropertyName = "etag")] - public string Etag { get; private set; } - - } -} diff --git a/src/Aks/Aks.Sdk/Generated/Models/AzureKeyVaultKms.cs b/src/Aks/Aks.Sdk/Generated/Models/AzureKeyVaultKms.cs index 8529f513d7f1..5d5e9fcd7752 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/AzureKeyVaultKms.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/AzureKeyVaultKms.cs @@ -1,21 +1,14 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; using System.Linq; /// - /// Azure Key Vault key management service settings for the security - /// profile. + /// Azure Key Vault key management service settings for the security profile. /// public partial class AzureKeyVaultKms { @@ -30,27 +23,35 @@ public AzureKeyVaultKms() /// /// Initializes a new instance of the AzureKeyVaultKms class. /// - /// Whether to enable Azure Key Vault key - /// management service. The default is false. - /// Identifier of Azure Key Vault key. See [key - /// identifier + + /// Whether to enable Azure Key Vault key management service. The default is + /// false. + /// + + /// Identifier of Azure Key Vault key. See [key identifier /// format](https://docs.microsoft.com/en-us/azure/key-vault/general/about-keys-secrets-certificates#vault-name-and-object-name) - /// for more details. When Azure Key Vault key management service is - /// enabled, this field is required and must be a valid key identifier. - /// When Azure Key Vault key management service is disabled, leave the - /// field empty. - /// Network access of the key - /// vault - /// Resource ID of key vault. When - /// keyVaultNetworkAccess is `Private`, this field is required and must - /// be a valid resource ID. When keyVaultNetworkAccess is `Public`, - /// leave the field empty. + /// for more details. When Azure Key Vault key management service is enabled, + /// this field is required and must be a valid key identifier. When Azure Key + /// Vault key management service is disabled, leave the field empty. + /// + + /// Network access of key vault. The possible values are `Public` and + /// `Private`. `Public` means the key vault allows public access from all + /// networks. `Private` means the key vault disables public access and enables + /// private link. The default value is `Public`. + /// Possible values include: 'Public', 'Private' + + /// Resource ID of key vault. When keyVaultNetworkAccess is `Private`, this + /// field is required and must be a valid resource ID. When + /// keyVaultNetworkAccess is `Public`, leave the field empty. + /// public AzureKeyVaultKms(bool? enabled = default(bool?), string keyId = default(string), string keyVaultNetworkAccess = default(string), string keyVaultResourceId = default(string)) + { - Enabled = enabled; - KeyId = keyId; - KeyVaultNetworkAccess = keyVaultNetworkAccess; - KeyVaultResourceId = keyVaultResourceId; + this.Enabled = enabled; + this.KeyId = keyId; + this.KeyVaultNetworkAccess = keyVaultNetworkAccess; + this.KeyVaultResourceId = keyVaultResourceId; CustomInit(); } @@ -59,44 +60,39 @@ public AzureKeyVaultKms() /// partial void CustomInit(); + /// - /// Gets or sets whether to enable Azure Key Vault key management - /// service. The default is false. + /// Gets or sets whether to enable Azure Key Vault key management service. The + /// default is false. /// - [JsonProperty(PropertyName = "enabled")] - public bool? Enabled { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "enabled")] + public bool? Enabled {get; set; } /// /// Gets or sets identifier of Azure Key Vault key. See [key identifier /// format](https://docs.microsoft.com/en-us/azure/key-vault/general/about-keys-secrets-certificates#vault-name-and-object-name) - /// for more details. When Azure Key Vault key management service is - /// enabled, this field is required and must be a valid key identifier. - /// When Azure Key Vault key management service is disabled, leave the - /// field empty. + /// for more details. When Azure Key Vault key management service is enabled, + /// this field is required and must be a valid key identifier. When Azure Key + /// Vault key management service is disabled, leave the field empty. /// - [JsonProperty(PropertyName = "keyId")] - public string KeyId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "keyId")] + public string KeyId {get; set; } /// - /// Gets or sets network access of the key vault + /// Gets or sets network access of key vault. The possible values are `Public` + /// and `Private`. `Public` means the key vault allows public access from all + /// networks. `Private` means the key vault disables public access and enables + /// private link. The default value is `Public`. Possible values include: 'Public', 'Private' /// - /// - /// Network access of key vault. The possible values are `Public` and - /// `Private`. `Public` means the key vault allows public access from - /// all networks. `Private` means the key vault disables public access - /// and enables private link. The default value is `Public`. Possible - /// values include: 'Public', 'Private' - /// - [JsonProperty(PropertyName = "keyVaultNetworkAccess")] - public string KeyVaultNetworkAccess { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "keyVaultNetworkAccess")] + public string KeyVaultNetworkAccess {get; set; } /// - /// Gets or sets resource ID of key vault. When keyVaultNetworkAccess - /// is `Private`, this field is required and must be a valid resource - /// ID. When keyVaultNetworkAccess is `Public`, leave the field empty. + /// Gets or sets resource ID of key vault. When keyVaultNetworkAccess is + /// `Private`, this field is required and must be a valid resource ID. When + /// keyVaultNetworkAccess is `Public`, leave the field empty. /// - [JsonProperty(PropertyName = "keyVaultResourceId")] - public string KeyVaultResourceId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "keyVaultResourceId")] + public string KeyVaultResourceId {get; set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/Code.cs b/src/Aks/Aks.Sdk/Generated/Models/Code.cs index 496ce3931d3c..c2d54489286d 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/Code.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/Code.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.ContainerService.Models /// /// Defines values for Code. /// + + public static class Code { /// @@ -25,4 +22,4 @@ public static class Code /// public const string Stopped = "Stopped"; } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/CommandResultProperties.cs b/src/Aks/Aks.Sdk/Generated/Models/CommandResultProperties.cs new file mode 100644 index 000000000000..1beb3509e35e --- /dev/null +++ b/src/Aks/Aks.Sdk/Generated/Models/CommandResultProperties.cs @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.ContainerService.Models +{ + using System.Linq; + + /// + /// The results of a run command + /// + public partial class CommandResultProperties + { + /// + /// Initializes a new instance of the CommandResultProperties class. + /// + public CommandResultProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CommandResultProperties class. + /// + + /// provisioning State + /// + + /// The exit code of the command + /// + + /// The time when the command started. + /// + + /// The time when the command finished. + /// + + /// The command output. + /// + + /// An explanation of why provisioningState is set to failed (if so). + /// + public CommandResultProperties(string provisioningState = default(string), int? exitCode = default(int?), System.DateTime? startedAt = default(System.DateTime?), System.DateTime? finishedAt = default(System.DateTime?), string logs = default(string), string reason = default(string)) + + { + this.ProvisioningState = provisioningState; + this.ExitCode = exitCode; + this.StartedAt = startedAt; + this.FinishedAt = finishedAt; + this.Logs = logs; + this.Reason = reason; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets provisioning State + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "provisioningState")] + public string ProvisioningState {get; private set; } + + /// + /// Gets the exit code of the command + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "exitCode")] + public int? ExitCode {get; private set; } + + /// + /// Gets the time when the command started. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "startedAt")] + public System.DateTime? StartedAt {get; private set; } + + /// + /// Gets the time when the command finished. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "finishedAt")] + public System.DateTime? FinishedAt {get; private set; } + + /// + /// Gets the command output. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "logs")] + public string Logs {get; private set; } + + /// + /// Gets an explanation of why provisioningState is set to failed (if so). + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "reason")] + public string Reason {get; private set; } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ConnectionStatus.cs b/src/Aks/Aks.Sdk/Generated/Models/ConnectionStatus.cs index a6da9d46d2a3..8c660d6775ff 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ConnectionStatus.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ConnectionStatus.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.ContainerService.Models /// /// Defines values for ConnectionStatus. /// + + public static class ConnectionStatus { public const string Pending = "Pending"; @@ -21,4 +18,4 @@ public static class ConnectionStatus public const string Rejected = "Rejected"; public const string Disconnected = "Disconnected"; } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ContainerServiceLinuxProfile.cs b/src/Aks/Aks.Sdk/Generated/Models/ContainerServiceLinuxProfile.cs index a8e8f73252b2..1b5c5cdd4b93 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ContainerServiceLinuxProfile.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ContainerServiceLinuxProfile.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +13,7 @@ namespace Microsoft.Azure.Management.ContainerService.Models public partial class ContainerServiceLinuxProfile { /// - /// Initializes a new instance of the ContainerServiceLinuxProfile - /// class. + /// Initializes a new instance of the ContainerServiceLinuxProfile class. /// public ContainerServiceLinuxProfile() { @@ -29,17 +21,19 @@ public ContainerServiceLinuxProfile() } /// - /// Initializes a new instance of the ContainerServiceLinuxProfile - /// class. + /// Initializes a new instance of the ContainerServiceLinuxProfile class. /// - /// The administrator username to use for - /// Linux VMs. - /// The SSH configuration for Linux-based VMs running - /// on Azure. + + /// The administrator username to use for Linux VMs. + /// + + /// The SSH configuration for Linux-based VMs running on Azure. + /// public ContainerServiceLinuxProfile(string adminUsername, ContainerServiceSshConfiguration ssh) + { - AdminUsername = adminUsername; - Ssh = ssh; + this.AdminUsername = adminUsername; + this.Ssh = ssh; CustomInit(); } @@ -48,46 +42,45 @@ public ContainerServiceLinuxProfile(string adminUsername, ContainerServiceSshCon /// partial void CustomInit(); + /// /// Gets or sets the administrator username to use for Linux VMs. /// - [JsonProperty(PropertyName = "adminUsername")] - public string AdminUsername { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "adminUsername")] + public string AdminUsername {get; set; } /// - /// Gets or sets the SSH configuration for Linux-based VMs running on - /// Azure. + /// Gets or sets the SSH configuration for Linux-based VMs running on Azure. /// - [JsonProperty(PropertyName = "ssh")] - public ContainerServiceSshConfiguration Ssh { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "ssh")] + public ContainerServiceSshConfiguration Ssh {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (AdminUsername == null) + if (this.AdminUsername == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "AdminUsername"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "AdminUsername"); } - if (Ssh == null) + if (this.Ssh == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "Ssh"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Ssh"); } - if (AdminUsername != null) + if (this.AdminUsername != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(AdminUsername, "^[A-Za-z][-A-Za-z0-9_]*$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(this.AdminUsername, "^[A-Za-z][-A-Za-z0-9_]*$")) { - throw new ValidationException(ValidationRules.Pattern, "AdminUsername", "^[A-Za-z][-A-Za-z0-9_]*$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "AdminUsername", "^[A-Za-z][-A-Za-z0-9_]*$"); } } - if (Ssh != null) + if (this.Ssh != null) { - Ssh.Validate(); + this.Ssh.Validate(); } } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ContainerServiceNetworkProfile.cs b/src/Aks/Aks.Sdk/Generated/Models/ContainerServiceNetworkProfile.cs index b087ef745405..79754b855261 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ContainerServiceNetworkProfile.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ContainerServiceNetworkProfile.cs @@ -1,19 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -22,8 +13,7 @@ namespace Microsoft.Azure.Management.ContainerService.Models public partial class ContainerServiceNetworkProfile { /// - /// Initializes a new instance of the ContainerServiceNetworkProfile - /// class. + /// Initializes a new instance of the ContainerServiceNetworkProfile class. /// public ContainerServiceNetworkProfile() { @@ -31,61 +21,83 @@ public ContainerServiceNetworkProfile() } /// - /// Initializes a new instance of the ContainerServiceNetworkProfile - /// class. + /// Initializes a new instance of the ContainerServiceNetworkProfile class. /// - /// Network plugin used for building the - /// Kubernetes network. Possible values include: 'azure', 'kubenet', - /// 'none' - /// The mode the network plugin should - /// use. Possible values include: 'overlay' - /// Network policy used for building the - /// Kubernetes network. Possible values include: 'calico', 'azure', - /// 'cilium' - /// The network mode Azure CNI is configured - /// with. - /// Network dataplane used in the - /// Kubernetes cluster. Possible values include: 'azure', - /// 'cilium' - /// A CIDR notation IP range from which to assign - /// pod IPs when kubenet is used. - /// A CIDR notation IP range from which to - /// assign service cluster IPs. It must not overlap with any Subnet IP - /// ranges. - /// An IP address assigned to the Kubernetes - /// DNS service. It must be within the Kubernetes service address range - /// specified in serviceCidr. - /// The outbound (egress) routing - /// method. - /// The load balancer sku for the managed - /// cluster. - /// Profile of the cluster load - /// balancer. - /// Profile of the cluster NAT - /// gateway. - /// The CIDR notation IP ranges from which to - /// assign pod IPs. - /// The CIDR notation IP ranges from which - /// to assign service cluster IPs. - /// The IP families used to specify IP - /// versions available to the cluster. - public ContainerServiceNetworkProfile(string networkPlugin = default(string), string networkPluginMode = default(string), string networkPolicy = default(string), string networkMode = default(string), string networkDataplane = default(string), string podCidr = default(string), string serviceCidr = default(string), string dnsServiceIP = default(string), string outboundType = default(string), string loadBalancerSku = default(string), ManagedClusterLoadBalancerProfile loadBalancerProfile = default(ManagedClusterLoadBalancerProfile), ManagedClusterNATGatewayProfile natGatewayProfile = default(ManagedClusterNATGatewayProfile), IList podCidrs = default(IList), IList serviceCidrs = default(IList), IList ipFamilies = default(IList)) + + /// Network plugin used for building the Kubernetes network. + /// Possible values include: 'azure', 'kubenet', 'none' + + /// The mode the network plugin should use. + /// Possible values include: 'overlay' + + /// Network policy used for building the Kubernetes network. + /// Possible values include: 'calico', 'azure', 'cilium' + + /// This cannot be specified if networkPlugin is anything other than 'azure'. + /// Possible values include: 'transparent', 'bridge' + + /// Network dataplane used in the Kubernetes cluster. + /// Possible values include: 'azure', 'cilium' + + /// A CIDR notation IP range from which to assign pod IPs when kubenet is used. + /// + + /// A CIDR notation IP range from which to assign service cluster IPs. It must + /// not overlap with any Subnet IP ranges. + /// + + /// An IP address assigned to the Kubernetes DNS service. It must be within the + /// Kubernetes service address range specified in serviceCidr. + /// + + /// This can only be set at cluster creation time and cannot be changed later. + /// For more information see [egress outbound + /// type](https://docs.microsoft.com/azure/aks/egress-outboundtype). + /// Possible values include: 'loadBalancer', 'userDefinedRouting', + /// 'managedNATGateway', 'userAssignedNATGateway' + + /// The default is 'standard'. See [Azure Load Balancer + /// SKUs](https://docs.microsoft.com/azure/load-balancer/skus) for more + /// information about the differences between load balancer SKUs. + /// Possible values include: 'standard', 'basic' + + /// Profile of the cluster load balancer. + /// + + /// Profile of the cluster NAT gateway. + /// + + /// One IPv4 CIDR is expected for single-stack networking. Two CIDRs, one for + /// each IP family (IPv4/IPv6), is expected for dual-stack networking. + /// + + /// One IPv4 CIDR is expected for single-stack networking. Two CIDRs, one for + /// each IP family (IPv4/IPv6), is expected for dual-stack networking. They + /// must not overlap with any Subnet IP ranges. + /// + + /// IP families are used to determine single-stack or dual-stack clusters. For + /// single-stack, the expected value is IPv4. For dual-stack, the expected + /// values are IPv4 and IPv6. + /// + public ContainerServiceNetworkProfile(string networkPlugin = default(string), string networkPluginMode = default(string), string networkPolicy = default(string), string networkMode = default(string), string networkDataplane = default(string), string podCidr = default(string), string serviceCidr = default(string), string dnsServiceIP = default(string), string outboundType = default(string), string loadBalancerSku = default(string), ManagedClusterLoadBalancerProfile loadBalancerProfile = default(ManagedClusterLoadBalancerProfile), ManagedClusterNATGatewayProfile natGatewayProfile = default(ManagedClusterNATGatewayProfile), System.Collections.Generic.IList podCidrs = default(System.Collections.Generic.IList), System.Collections.Generic.IList serviceCidrs = default(System.Collections.Generic.IList), System.Collections.Generic.IList ipFamilies = default(System.Collections.Generic.IList)) + { - NetworkPlugin = networkPlugin; - NetworkPluginMode = networkPluginMode; - NetworkPolicy = networkPolicy; - NetworkMode = networkMode; - NetworkDataplane = networkDataplane; - PodCidr = podCidr; - ServiceCidr = serviceCidr; - DnsServiceIP = dnsServiceIP; - OutboundType = outboundType; - LoadBalancerSku = loadBalancerSku; - LoadBalancerProfile = loadBalancerProfile; - NatGatewayProfile = natGatewayProfile; - PodCidrs = podCidrs; - ServiceCidrs = serviceCidrs; - IpFamilies = ipFamilies; + this.NetworkPlugin = networkPlugin; + this.NetworkPluginMode = networkPluginMode; + this.NetworkPolicy = networkPolicy; + this.NetworkMode = networkMode; + this.NetworkDataplane = networkDataplane; + this.PodCidr = podCidr; + this.ServiceCidr = serviceCidr; + this.DnsServiceIP = dnsServiceIP; + this.OutboundType = outboundType; + this.LoadBalancerSku = loadBalancerSku; + this.LoadBalancerProfile = loadBalancerProfile; + this.NatGatewayProfile = natGatewayProfile; + this.PodCidrs = podCidrs; + this.ServiceCidrs = serviceCidrs; + this.IPFamilies = ipFamilies; CustomInit(); } @@ -94,176 +106,157 @@ public ContainerServiceNetworkProfile() /// partial void CustomInit(); + /// - /// Gets or sets network plugin used for building the Kubernetes - /// network. Possible values include: 'azure', 'kubenet', 'none' + /// Gets or sets network plugin used for building the Kubernetes network. Possible values include: 'azure', 'kubenet', 'none' /// - [JsonProperty(PropertyName = "networkPlugin")] - public string NetworkPlugin { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "networkPlugin")] + public string NetworkPlugin {get; set; } /// - /// Gets or sets the mode the network plugin should use. Possible - /// values include: 'overlay' + /// Gets or sets the mode the network plugin should use. Possible values include: 'overlay' /// - [JsonProperty(PropertyName = "networkPluginMode")] - public string NetworkPluginMode { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "networkPluginMode")] + public string NetworkPluginMode {get; set; } /// - /// Gets or sets network policy used for building the Kubernetes - /// network. Possible values include: 'calico', 'azure', 'cilium' + /// Gets or sets network policy used for building the Kubernetes network. Possible values include: 'calico', 'azure', 'cilium' /// - [JsonProperty(PropertyName = "networkPolicy")] - public string NetworkPolicy { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "networkPolicy")] + public string NetworkPolicy {get; set; } /// - /// Gets or sets the network mode Azure CNI is configured with. + /// Gets or sets this cannot be specified if networkPlugin is anything other + /// than 'azure'. Possible values include: 'transparent', 'bridge' /// - /// - /// This cannot be specified if networkPlugin is anything other than - /// 'azure'. Possible values include: 'transparent', 'bridge' - /// - [JsonProperty(PropertyName = "networkMode")] - public string NetworkMode { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "networkMode")] + public string NetworkMode {get; set; } /// - /// Gets or sets network dataplane used in the Kubernetes cluster. - /// Possible values include: 'azure', 'cilium' + /// Gets or sets network dataplane used in the Kubernetes cluster. Possible values include: 'azure', 'cilium' /// - [JsonProperty(PropertyName = "networkDataplane")] - public string NetworkDataplane { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "networkDataplane")] + public string NetworkDataplane {get; set; } /// - /// Gets or sets a CIDR notation IP range from which to assign pod IPs - /// when kubenet is used. + /// Gets or sets a CIDR notation IP range from which to assign pod IPs when + /// kubenet is used. /// - [JsonProperty(PropertyName = "podCidr")] - public string PodCidr { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "podCidr")] + public string PodCidr {get; set; } /// - /// Gets or sets a CIDR notation IP range from which to assign service - /// cluster IPs. It must not overlap with any Subnet IP ranges. + /// Gets or sets a CIDR notation IP range from which to assign service cluster + /// IPs. It must not overlap with any Subnet IP ranges. /// - [JsonProperty(PropertyName = "serviceCidr")] - public string ServiceCidr { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "serviceCidr")] + public string ServiceCidr {get; set; } /// - /// Gets or sets an IP address assigned to the Kubernetes DNS service. - /// It must be within the Kubernetes service address range specified in - /// serviceCidr. + /// Gets or sets an IP address assigned to the Kubernetes DNS service. It must + /// be within the Kubernetes service address range specified in serviceCidr. /// - [JsonProperty(PropertyName = "dnsServiceIP")] - public string DnsServiceIP { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "dnsServiceIP")] + public string DnsServiceIP {get; set; } /// - /// Gets or sets the outbound (egress) routing method. + /// Gets or sets this can only be set at cluster creation time and cannot be + /// changed later. For more information see [egress outbound + /// type](https://docs.microsoft.com/azure/aks/egress-outboundtype). Possible values include: 'loadBalancer', 'userDefinedRouting', 'managedNATGateway', 'userAssignedNATGateway' /// - /// - /// This can only be set at cluster creation time and cannot be changed - /// later. For more information see [egress outbound - /// type](https://docs.microsoft.com/azure/aks/egress-outboundtype). - /// Possible values include: 'loadBalancer', 'userDefinedRouting', - /// 'managedNATGateway', 'userAssignedNATGateway' - /// - [JsonProperty(PropertyName = "outboundType")] - public string OutboundType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "outboundType")] + public string OutboundType {get; set; } /// - /// Gets or sets the load balancer sku for the managed cluster. - /// - /// - /// The default is 'standard'. See [Azure Load Balancer + /// Gets or sets the default is 'standard'. See [Azure Load Balancer /// SKUs](https://docs.microsoft.com/azure/load-balancer/skus) for more - /// information about the differences between load balancer SKUs. - /// Possible values include: 'standard', 'basic' - /// - [JsonProperty(PropertyName = "loadBalancerSku")] - public string LoadBalancerSku { get; set; } + /// information about the differences between load balancer SKUs. Possible values include: 'standard', 'basic' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "loadBalancerSku")] + public string LoadBalancerSku {get; set; } /// /// Gets or sets profile of the cluster load balancer. /// - [JsonProperty(PropertyName = "loadBalancerProfile")] - public ManagedClusterLoadBalancerProfile LoadBalancerProfile { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "loadBalancerProfile")] + public ManagedClusterLoadBalancerProfile LoadBalancerProfile {get; set; } /// /// Gets or sets profile of the cluster NAT gateway. /// - [JsonProperty(PropertyName = "natGatewayProfile")] - public ManagedClusterNATGatewayProfile NatGatewayProfile { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "natGatewayProfile")] + public ManagedClusterNATGatewayProfile NatGatewayProfile {get; set; } /// - /// Gets or sets the CIDR notation IP ranges from which to assign pod - /// IPs. - /// - /// - /// One IPv4 CIDR is expected for single-stack networking. Two CIDRs, - /// one for each IP family (IPv4/IPv6), is expected for dual-stack + /// Gets or sets one IPv4 CIDR is expected for single-stack networking. Two + /// CIDRs, one for each IP family (IPv4/IPv6), is expected for dual-stack /// networking. - /// - [JsonProperty(PropertyName = "podCidrs")] - public IList PodCidrs { get; set; } + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "podCidrs")] + public System.Collections.Generic.IList PodCidrs {get; set; } /// - /// Gets or sets the CIDR notation IP ranges from which to assign - /// service cluster IPs. - /// - /// - /// One IPv4 CIDR is expected for single-stack networking. Two CIDRs, - /// one for each IP family (IPv4/IPv6), is expected for dual-stack + /// Gets or sets one IPv4 CIDR is expected for single-stack networking. Two + /// CIDRs, one for each IP family (IPv4/IPv6), is expected for dual-stack /// networking. They must not overlap with any Subnet IP ranges. - /// - [JsonProperty(PropertyName = "serviceCidrs")] - public IList ServiceCidrs { get; set; } + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "serviceCidrs")] + public System.Collections.Generic.IList ServiceCidrs {get; set; } /// - /// Gets or sets the IP families used to specify IP versions available - /// to the cluster. + /// Gets or sets iP families are used to determine single-stack or dual-stack + /// clusters. For single-stack, the expected value is IPv4. For dual-stack, the + /// expected values are IPv4 and IPv6. /// - /// - /// IP families are used to determine single-stack or dual-stack - /// clusters. For single-stack, the expected value is IPv4. For - /// dual-stack, the expected values are IPv4 and IPv6. - /// - [JsonProperty(PropertyName = "ipFamilies")] - public IList IpFamilies { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "ipFamilies")] + public System.Collections.Generic.IList IPFamilies {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (PodCidr != null) + + + + + + if (this.PodCidr != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(PodCidr, "^([0-9]{1,3}\\.){3}[0-9]{1,3}(\\/([0-9]|[1-2][0-9]|3[0-2]))?$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(this.PodCidr, "^([0-9]{1,3}\\.){3}[0-9]{1,3}(\\/([0-9]|[1-2][0-9]|3[0-2]))?$")) { - throw new ValidationException(ValidationRules.Pattern, "PodCidr", "^([0-9]{1,3}\\.){3}[0-9]{1,3}(\\/([0-9]|[1-2][0-9]|3[0-2]))?$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "PodCidr", "^([0-9]{1,3}\\.){3}[0-9]{1,3}(\\/([0-9]|[1-2][0-9]|3[0-2]))?$"); } } - if (ServiceCidr != null) + if (this.ServiceCidr != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(ServiceCidr, "^([0-9]{1,3}\\.){3}[0-9]{1,3}(\\/([0-9]|[1-2][0-9]|3[0-2]))?$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(this.ServiceCidr, "^([0-9]{1,3}\\.){3}[0-9]{1,3}(\\/([0-9]|[1-2][0-9]|3[0-2]))?$")) { - throw new ValidationException(ValidationRules.Pattern, "ServiceCidr", "^([0-9]{1,3}\\.){3}[0-9]{1,3}(\\/([0-9]|[1-2][0-9]|3[0-2]))?$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "ServiceCidr", "^([0-9]{1,3}\\.){3}[0-9]{1,3}(\\/([0-9]|[1-2][0-9]|3[0-2]))?$"); } } - if (DnsServiceIP != null) + if (this.DnsServiceIP != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(DnsServiceIP, "^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(this.DnsServiceIP, "^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$")) { - throw new ValidationException(ValidationRules.Pattern, "DnsServiceIP", "^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "DnsServiceIP", "^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$"); } } - if (LoadBalancerProfile != null) + + + if (this.LoadBalancerProfile != null) { - LoadBalancerProfile.Validate(); + this.LoadBalancerProfile.Validate(); } - if (NatGatewayProfile != null) + if (this.NatGatewayProfile != null) { - NatGatewayProfile.Validate(); + this.NatGatewayProfile.Validate(); } + + + } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ContainerServiceSshConfiguration.cs b/src/Aks/Aks.Sdk/Generated/Models/ContainerServiceSshConfiguration.cs index ef57103574d2..ac9b6d30cb03 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ContainerServiceSshConfiguration.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ContainerServiceSshConfiguration.cs @@ -1,19 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -22,8 +13,7 @@ namespace Microsoft.Azure.Management.ContainerService.Models public partial class ContainerServiceSshConfiguration { /// - /// Initializes a new instance of the ContainerServiceSshConfiguration - /// class. + /// Initializes a new instance of the ContainerServiceSshConfiguration class. /// public ContainerServiceSshConfiguration() { @@ -31,15 +21,16 @@ public ContainerServiceSshConfiguration() } /// - /// Initializes a new instance of the ContainerServiceSshConfiguration - /// class. + /// Initializes a new instance of the ContainerServiceSshConfiguration class. /// - /// The list of SSH public keys used to - /// authenticate with Linux-based VMs. A maximum of 1 key may be - /// specified. - public ContainerServiceSshConfiguration(IList publicKeys) + + /// The list of SSH public keys used to authenticate with Linux-based VMs. A + /// maximum of 1 key may be specified. + /// + public ContainerServiceSshConfiguration(System.Collections.Generic.IList publicKeys) + { - PublicKeys = publicKeys; + this.PublicKeys = publicKeys; CustomInit(); } @@ -48,28 +39,28 @@ public ContainerServiceSshConfiguration(IList publ /// partial void CustomInit(); + /// /// Gets or sets the list of SSH public keys used to authenticate with /// Linux-based VMs. A maximum of 1 key may be specified. /// - [JsonProperty(PropertyName = "publicKeys")] - public IList PublicKeys { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "publicKeys")] + public System.Collections.Generic.IList PublicKeys {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (PublicKeys == null) + if (this.PublicKeys == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "PublicKeys"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "PublicKeys"); } - if (PublicKeys != null) + if (this.PublicKeys != null) { - foreach (var element in PublicKeys) + foreach (var element in this.PublicKeys) { if (element != null) { @@ -79,4 +70,4 @@ public virtual void Validate() } } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ContainerServiceSshPublicKey.cs b/src/Aks/Aks.Sdk/Generated/Models/ContainerServiceSshPublicKey.cs index fbe17b139c83..eaeeb5ce4201 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ContainerServiceSshPublicKey.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ContainerServiceSshPublicKey.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +13,7 @@ namespace Microsoft.Azure.Management.ContainerService.Models public partial class ContainerServiceSshPublicKey { /// - /// Initializes a new instance of the ContainerServiceSshPublicKey - /// class. + /// Initializes a new instance of the ContainerServiceSshPublicKey class. /// public ContainerServiceSshPublicKey() { @@ -29,15 +21,16 @@ public ContainerServiceSshPublicKey() } /// - /// Initializes a new instance of the ContainerServiceSshPublicKey - /// class. + /// Initializes a new instance of the ContainerServiceSshPublicKey class. /// - /// Certificate public key used to authenticate - /// with VMs through SSH. The certificate must be in PEM format with or - /// without headers. + + /// Certificate public key used to authenticate with VMs through SSH. The + /// certificate must be in PEM format with or without headers. + /// public ContainerServiceSshPublicKey(string keyData) + { - KeyData = keyData; + this.KeyData = keyData; CustomInit(); } @@ -46,26 +39,26 @@ public ContainerServiceSshPublicKey(string keyData) /// partial void CustomInit(); + /// - /// Gets or sets certificate public key used to authenticate with VMs - /// through SSH. The certificate must be in PEM format with or without - /// headers. + /// Gets or sets certificate public key used to authenticate with VMs through + /// SSH. The certificate must be in PEM format with or without headers. /// - [JsonProperty(PropertyName = "keyData")] - public string KeyData { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "keyData")] + public string KeyData {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (KeyData == null) + if (this.KeyData == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "KeyData"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "KeyData"); } + } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/CreatedByType.cs b/src/Aks/Aks.Sdk/Generated/Models/CreatedByType.cs index 640ae38ab17e..91748a55acae 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/CreatedByType.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/CreatedByType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.ContainerService.Models /// /// Defines values for CreatedByType. /// + + public static class CreatedByType { public const string User = "User"; @@ -21,4 +18,4 @@ public static class CreatedByType public const string ManagedIdentity = "ManagedIdentity"; public const string Key = "Key"; } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/CreationData.cs b/src/Aks/Aks.Sdk/Generated/Models/CreationData.cs index 64cdf5b5fc75..8e4700dc9699 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/CreationData.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/CreationData.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,11 +23,14 @@ public CreationData() /// /// Initializes a new instance of the CreationData class. /// - /// This is the ARM ID of the source - /// object to be used to create the target object. + + /// This is the ARM ID of the source object to be used to create the target + /// object. + /// public CreationData(string sourceResourceId = default(string)) + { - SourceResourceId = sourceResourceId; + this.SourceResourceId = sourceResourceId; CustomInit(); } @@ -42,12 +39,12 @@ public CreationData() /// partial void CustomInit(); + /// - /// Gets or sets this is the ARM ID of the source object to be used to - /// create the target object. + /// Gets or sets this is the ARM ID of the source object to be used to create + /// the target object. /// - [JsonProperty(PropertyName = "sourceResourceId")] - public string SourceResourceId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "sourceResourceId")] + public string SourceResourceId {get; set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/CredentialResult.cs b/src/Aks/Aks.Sdk/Generated/Models/CredentialResult.cs index bae9ac36ca2b..eca95a8dbb15 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/CredentialResult.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/CredentialResult.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,13 +23,17 @@ public CredentialResult() /// /// Initializes a new instance of the CredentialResult class. /// - /// The name of the credential. - /// Base64-encoded Kubernetes configuration - /// file. + + /// The name of the credential. + /// + + /// Base64-encoded Kubernetes configuration file. + /// public CredentialResult(string name = default(string), byte[] value = default(byte[])) + { - Name = name; - Value = value; + this.Name = name; + this.Value = value; CustomInit(); } @@ -44,17 +42,17 @@ public CredentialResult() /// partial void CustomInit(); + /// /// Gets the name of the credential. /// - [JsonProperty(PropertyName = "name")] - public string Name { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; private set; } /// /// Gets base64-encoded Kubernetes configuration file. /// - [JsonProperty(PropertyName = "value")] - public byte[] Value { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "value")] + public byte[] Value {get; private set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/CredentialResults.cs b/src/Aks/Aks.Sdk/Generated/Models/CredentialResults.cs index 509c9e296168..0c415cbb710a 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/CredentialResults.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/CredentialResults.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,11 +23,13 @@ public CredentialResults() /// /// Initializes a new instance of the CredentialResults class. /// - /// Base64-encoded Kubernetes configuration - /// file. - public CredentialResults(IList kubeconfigs = default(IList)) + + /// Base64-encoded Kubernetes configuration file. + /// + public CredentialResults(System.Collections.Generic.IList kubeconfigs = default(System.Collections.Generic.IList)) + { - Kubeconfigs = kubeconfigs; + this.Kubeconfigs = kubeconfigs; CustomInit(); } @@ -44,11 +38,11 @@ public CredentialResults() /// partial void CustomInit(); + /// /// Gets base64-encoded Kubernetes configuration file. /// - [JsonProperty(PropertyName = "kubeconfigs")] - public IList Kubeconfigs { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "kubeconfigs")] + public System.Collections.Generic.IList Kubeconfigs {get; private set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/EndpointDependency.cs b/src/Aks/Aks.Sdk/Generated/Models/EndpointDependency.cs index 9671184faefd..6f079f65a488 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/EndpointDependency.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/EndpointDependency.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,13 +23,17 @@ public EndpointDependency() /// /// Initializes a new instance of the EndpointDependency class. /// - /// The domain name of the dependency. - /// The Ports and Protocols used when - /// connecting to domainName. - public EndpointDependency(string domainName = default(string), IList endpointDetails = default(IList)) + + /// The domain name of the dependency. + /// + + /// The Ports and Protocols used when connecting to domainName. + /// + public EndpointDependency(string domainName = default(string), System.Collections.Generic.IList endpointDetails = default(System.Collections.Generic.IList)) + { - DomainName = domainName; - EndpointDetails = endpointDetails; + this.DomainName = domainName; + this.EndpointDetails = endpointDetails; CustomInit(); } @@ -46,18 +42,17 @@ public EndpointDependency() /// partial void CustomInit(); + /// /// Gets or sets the domain name of the dependency. /// - [JsonProperty(PropertyName = "domainName")] - public string DomainName { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "domainName")] + public string DomainName {get; set; } /// - /// Gets or sets the Ports and Protocols used when connecting to - /// domainName. + /// Gets or sets the Ports and Protocols used when connecting to domainName. /// - [JsonProperty(PropertyName = "endpointDetails")] - public IList EndpointDetails { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "endpointDetails")] + public System.Collections.Generic.IList EndpointDetails {get; set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/EndpointDetail.cs b/src/Aks/Aks.Sdk/Generated/Models/EndpointDetail.cs index 0af07b5d2feb..b2d60eac525a 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/EndpointDetail.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/EndpointDetail.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,17 +23,25 @@ public EndpointDetail() /// /// Initializes a new instance of the EndpointDetail class. /// - /// An IP Address that Domain Name currently - /// resolves to. - /// The port an endpoint is connected to. - /// The protocol used for connection - /// Description of the detail + + /// An IP Address that Domain Name currently resolves to. + /// + + /// The port an endpoint is connected to. + /// + + /// The protocol used for connection + /// + + /// Description of the detail + /// public EndpointDetail(string ipAddress = default(string), int? port = default(int?), string protocol = default(string), string description = default(string)) + { - IpAddress = ipAddress; - Port = port; - Protocol = protocol; - Description = description; + this.IPAddress = ipAddress; + this.Port = port; + this.Protocol = protocol; + this.Description = description; CustomInit(); } @@ -48,29 +50,29 @@ public EndpointDetail() /// partial void CustomInit(); + /// /// Gets or sets an IP Address that Domain Name currently resolves to. /// - [JsonProperty(PropertyName = "ipAddress")] - public string IpAddress { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "ipAddress")] + public string IPAddress {get; set; } /// /// Gets or sets the port an endpoint is connected to. /// - [JsonProperty(PropertyName = "port")] - public int? Port { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "port")] + public int? Port {get; set; } /// /// Gets or sets the protocol used for connection /// - [JsonProperty(PropertyName = "protocol")] - public string Protocol { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "protocol")] + public string Protocol {get; set; } /// /// Gets or sets description of the detail /// - [JsonProperty(PropertyName = "description")] - public string Description { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "description")] + public string Description {get; set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/Expander.cs b/src/Aks/Aks.Sdk/Generated/Models/Expander.cs index c18a808e183f..532fbf884547 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/Expander.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/Expander.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { @@ -14,34 +9,25 @@ namespace Microsoft.Azure.Management.ContainerService.Models /// /// Defines values for Expander. /// + + public static class Expander { /// - /// Selects the node group that will have the least idle CPU (if tied, - /// unused memory) after scale-up. This is useful when you have - /// different classes of nodes, for example, high CPU or high memory - /// nodes, and only want to expand those when there are pending pods - /// that need a lot of those resources. + /// Selects the node group that will have the least idle CPU (if tied, unused memory) after scale-up. This is useful when you have different classes of nodes, for example, high CPU or high memory nodes, and only want to expand those when there are pending pods that need a lot of those resources. /// public const string LeastWaste = "least-waste"; /// - /// Selects the node group that would be able to schedule the most pods - /// when scaling up. This is useful when you are using nodeSelector to - /// make sure certain pods land on certain nodes. Note that this won't - /// cause the autoscaler to select bigger nodes vs. smaller, as it can - /// add multiple smaller nodes at once. + /// Selects the node group that would be able to schedule the most pods when scaling up. This is useful when you are using nodeSelector to make sure certain pods land on certain nodes. Note that this won't cause the autoscaler to select bigger nodes vs. smaller, as it can add multiple smaller nodes at once. /// public const string MostPods = "most-pods"; /// - /// Selects the node group that has the highest priority assigned by - /// the user. It's configuration is described in more details - /// [here](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/expander/priority/readme.md). + /// Selects the node group that has the highest priority assigned by the user. It's configuration is described in more details [here](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/expander/priority/readme.md). /// public const string Priority = "priority"; /// - /// Used when you don't have a particular need for the node groups to - /// scale differently. + /// Used when you don't have a particular need for the node groups to scale differently. /// public const string Random = "random"; } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ExtendedLocation.cs b/src/Aks/Aks.Sdk/Generated/Models/ExtendedLocation.cs index e07ba84fad18..1aedca09ff62 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ExtendedLocation.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ExtendedLocation.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,13 +23,17 @@ public ExtendedLocation() /// /// Initializes a new instance of the ExtendedLocation class. /// - /// The name of the extended location. - /// The type of the extended location. Possible - /// values include: 'EdgeZone' + + /// The name of the extended location. + /// + + /// The type of the extended location. + /// Possible values include: 'EdgeZone' public ExtendedLocation(string name = default(string), string type = default(string)) + { - Name = name; - Type = type; + this.Name = name; + this.Type = type; CustomInit(); } @@ -44,18 +42,17 @@ public ExtendedLocation() /// partial void CustomInit(); + /// /// Gets or sets the name of the extended location. /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; set; } /// - /// Gets or sets the type of the extended location. Possible values - /// include: 'EdgeZone' + /// Gets or sets the type of the extended location. Possible values include: 'EdgeZone' /// - [JsonProperty(PropertyName = "type")] - public string Type { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public string Type {get; set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ExtendedLocationTypes.cs b/src/Aks/Aks.Sdk/Generated/Models/ExtendedLocationTypes.cs index e46ac4f66b97..29291ea7e4c5 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ExtendedLocationTypes.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ExtendedLocationTypes.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { @@ -14,8 +9,10 @@ namespace Microsoft.Azure.Management.ContainerService.Models /// /// Defines values for ExtendedLocationTypes. /// + + public static class ExtendedLocationTypes { public const string EdgeZone = "EdgeZone"; } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/Format.cs b/src/Aks/Aks.Sdk/Generated/Models/Format.cs index 87c61daf1a5c..024015b3b402 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/Format.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/Format.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { @@ -14,18 +9,17 @@ namespace Microsoft.Azure.Management.ContainerService.Models /// /// Defines values for Format. /// + + public static class Format { /// - /// Return azure auth-provider kubeconfig. This format is deprecated in - /// v1.22 and will be fully removed in v1.26. See: - /// https://aka.ms/k8s/changes-1-26. + /// Return azure auth-provider kubeconfig. This format is deprecated in v1.22 and will be fully removed in v1.26. See: https://aka.ms/k8s/changes-1-26. /// public const string Azure = "azure"; /// - /// Return exec format kubeconfig. This format requires kubelogin - /// binary in the path. + /// Return exec format kubeconfig. This format requires kubelogin binary in the path. /// public const string Exec = "exec"; } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/GPUInstanceProfile.cs b/src/Aks/Aks.Sdk/Generated/Models/GPUInstanceProfile.cs index 1b9f50bdc5f0..fd2bc811a96f 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/GPUInstanceProfile.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/GPUInstanceProfile.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { @@ -14,12 +9,14 @@ namespace Microsoft.Azure.Management.ContainerService.Models /// /// Defines values for GPUInstanceProfile. /// + + public static class GPUInstanceProfile { - public const string MIG1g = "MIG1g"; - public const string MIG2g = "MIG2g"; - public const string MIG3g = "MIG3g"; - public const string MIG4g = "MIG4g"; - public const string MIG7g = "MIG7g"; + public const string MIG1G = "MIG1g"; + public const string MIG2G = "MIG2g"; + public const string MIG3G = "MIG3g"; + public const string MIG4G = "MIG4g"; + public const string MIG7G = "MIG7g"; } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/Identity.cs b/src/Aks/Aks.Sdk/Generated/Models/Identity.cs deleted file mode 100644 index 84813127cfa6..000000000000 --- a/src/Aks/Aks.Sdk/Generated/Models/Identity.cs +++ /dev/null @@ -1,70 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.ContainerService.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Identity for the resource. - /// - public partial class Identity - { - /// - /// Initializes a new instance of the Identity class. - /// - public Identity() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the Identity class. - /// - /// The principal ID of resource - /// identity. - /// The tenant ID of resource. - /// The identity type. Possible values include: - /// 'SystemAssigned' - public Identity(string principalId = default(string), string tenantId = default(string), ResourceIdentityTypeForCommonTypes? type = default(ResourceIdentityTypeForCommonTypes?)) - { - PrincipalId = principalId; - TenantId = tenantId; - Type = type; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets the principal ID of resource identity. - /// - [JsonProperty(PropertyName = "principalId")] - public string PrincipalId { get; private set; } - - /// - /// Gets the tenant ID of resource. - /// - [JsonProperty(PropertyName = "tenantId")] - public string TenantId { get; private set; } - - /// - /// Gets or sets the identity type. Possible values include: - /// 'SystemAssigned' - /// - [JsonProperty(PropertyName = "type")] - public ResourceIdentityTypeForCommonTypes? Type { get; set; } - - } -} diff --git a/src/Aks/Aks.Sdk/Generated/Models/IpFamily.cs b/src/Aks/Aks.Sdk/Generated/Models/IpFamily.cs index 965f8846c9c8..809eaa4404ce 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/IpFamily.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/IpFamily.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { @@ -14,9 +9,11 @@ namespace Microsoft.Azure.Management.ContainerService.Models /// /// Defines values for IpFamily. /// + + public static class IpFamily { public const string IPv4 = "IPv4"; public const string IPv6 = "IPv6"; } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/KeyVaultNetworkAccessTypes.cs b/src/Aks/Aks.Sdk/Generated/Models/KeyVaultNetworkAccessTypes.cs index f9007ed0539b..7e48012baf8b 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/KeyVaultNetworkAccessTypes.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/KeyVaultNetworkAccessTypes.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { @@ -14,9 +9,11 @@ namespace Microsoft.Azure.Management.ContainerService.Models /// /// Defines values for KeyVaultNetworkAccessTypes. /// + + public static class KeyVaultNetworkAccessTypes { public const string Public = "Public"; public const string Private = "Private"; } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/KubeletConfig.cs b/src/Aks/Aks.Sdk/Generated/Models/KubeletConfig.cs index 2faa7d2f524e..cff662a6671e 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/KubeletConfig.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/KubeletConfig.cs @@ -1,23 +1,16 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// - /// Kubelet configurations of agent nodes. + /// See [AKS custom node + /// configuration](https://docs.microsoft.com/azure/aks/custom-node-configuration) + /// for more details. /// /// /// See [AKS custom node @@ -37,42 +30,62 @@ public KubeletConfig() /// /// Initializes a new instance of the KubeletConfig class. /// - /// The CPU Manager policy to - /// use. - /// If CPU CFS quota enforcement is enabled - /// for containers that specify CPU limits. - /// The CPU CFS quota period - /// value. - /// The percent of disk usage after - /// which image garbage collection is always run. - /// The percent of disk usage before - /// which image garbage collection is never run. - /// The Topology Manager policy to - /// use. - /// Allowed list of unsafe sysctls - /// or unsafe sysctl patterns (ending in `*`). - /// If set to true it will make the Kubelet - /// fail to start if swap is enabled on the node. - /// The maximum size (e.g. 10Mi) of - /// container log file before it is rotated. - /// The maximum number of container - /// log files that can be present for a container. The number must be ≥ - /// 2. - /// The maximum number of processes per - /// pod. - public KubeletConfig(string cpuManagerPolicy = default(string), bool? cpuCfsQuota = default(bool?), string cpuCfsQuotaPeriod = default(string), int? imageGcHighThreshold = default(int?), int? imageGcLowThreshold = default(int?), string topologyManagerPolicy = default(string), IList allowedUnsafeSysctls = default(IList), bool? failSwapOn = default(bool?), int? containerLogMaxSizeMB = default(int?), int? containerLogMaxFiles = default(int?), int? podMaxPids = default(int?)) + + /// The default is 'none'. See [Kubernetes CPU management + /// policies](https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/#cpu-management-policies) + /// for more information. Allowed values are 'none' and 'static'. + /// + + /// The default is true. + /// + + /// The default is '100ms.' Valid values are a sequence of decimal numbers with + /// an optional fraction and a unit suffix. For example: '300ms', '2h45m'. + /// Supported units are 'ns', 'us', 'ms', 's', 'm', and 'h'. + /// + + /// To disable image garbage collection, set to 100. The default is 85% + /// + + /// This cannot be set higher than imageGcHighThreshold. The default is 80% + /// + + /// For more information see [Kubernetes Topology + /// Manager](https://kubernetes.io/docs/tasks/administer-cluster/topology-manager). + /// The default is 'none'. Allowed values are 'none', 'best-effort', + /// 'restricted', and 'single-numa-node'. + /// + + /// Allowed list of unsafe sysctls or unsafe sysctl patterns (ending in `*`). + /// + + /// If set to true it will make the Kubelet fail to start if swap is enabled on + /// the node. + /// + + /// The maximum size (e.g. 10Mi) of container log file before it is rotated. + /// + + /// The maximum number of container log files that can be present for a + /// container. The number must be ≥ 2. + /// + + /// The maximum number of processes per pod. + /// + public KubeletConfig(string cpuManagerPolicy = default(string), bool? cpuCfsQuota = default(bool?), string cpuCfsQuotaPeriod = default(string), int? imageGcHighThreshold = default(int?), int? imageGcLowThreshold = default(int?), string topologyManagerPolicy = default(string), System.Collections.Generic.IList allowedUnsafeSysctls = default(System.Collections.Generic.IList), bool? failSwapOn = default(bool?), int? containerLogMaxSizeMb = default(int?), int? containerLogMaxFiles = default(int?), int? podMaxPids = default(int?)) + { - CpuManagerPolicy = cpuManagerPolicy; - CpuCfsQuota = cpuCfsQuota; - CpuCfsQuotaPeriod = cpuCfsQuotaPeriod; - ImageGcHighThreshold = imageGcHighThreshold; - ImageGcLowThreshold = imageGcLowThreshold; - TopologyManagerPolicy = topologyManagerPolicy; - AllowedUnsafeSysctls = allowedUnsafeSysctls; - FailSwapOn = failSwapOn; - ContainerLogMaxSizeMB = containerLogMaxSizeMB; - ContainerLogMaxFiles = containerLogMaxFiles; - PodMaxPids = podMaxPids; + this.CpuManagerPolicy = cpuManagerPolicy; + this.CpuCfsQuota = cpuCfsQuota; + this.CpuCfsQuotaPeriod = cpuCfsQuotaPeriod; + this.ImageGcHighThreshold = imageGcHighThreshold; + this.ImageGcLowThreshold = imageGcLowThreshold; + this.TopologyManagerPolicy = topologyManagerPolicy; + this.AllowedUnsafeSysctls = allowedUnsafeSysctls; + this.FailSwapOn = failSwapOn; + this.ContainerLogMaxSizeMb = containerLogMaxSizeMb; + this.ContainerLogMaxFiles = containerLogMaxFiles; + this.PodMaxPids = podMaxPids; CustomInit(); } @@ -81,121 +94,104 @@ public KubeletConfig() /// partial void CustomInit(); + /// - /// Gets or sets the CPU Manager policy to use. - /// - /// - /// The default is 'none'. See [Kubernetes CPU management + /// Gets or sets the default is 'none'. See [Kubernetes CPU management /// policies](https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/#cpu-management-policies) - /// for more information. Allowed values are 'none' and 'static'. - /// - [JsonProperty(PropertyName = "cpuManagerPolicy")] - public string CpuManagerPolicy { get; set; } + /// for more information. Allowed values are 'none' and 'static'. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "cpuManagerPolicy")] + public string CpuManagerPolicy {get; set; } /// - /// Gets or sets if CPU CFS quota enforcement is enabled for containers - /// that specify CPU limits. + /// Gets or sets the default is true. /// - /// - /// The default is true. - /// - [JsonProperty(PropertyName = "cpuCfsQuota")] - public bool? CpuCfsQuota { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "cpuCfsQuota")] + public bool? CpuCfsQuota {get; set; } /// - /// Gets or sets the CPU CFS quota period value. + /// Gets or sets the default is '100ms.' Valid values are a sequence of decimal + /// numbers with an optional fraction and a unit suffix. For example: '300ms', + /// '2h45m'. Supported units are 'ns', 'us', 'ms', 's', 'm', and 'h'. /// - /// - /// The default is '100ms.' Valid values are a sequence of decimal - /// numbers with an optional fraction and a unit suffix. For example: - /// '300ms', '2h45m'. Supported units are 'ns', 'us', 'ms', 's', 'm', - /// and 'h'. - /// - [JsonProperty(PropertyName = "cpuCfsQuotaPeriod")] - public string CpuCfsQuotaPeriod { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "cpuCfsQuotaPeriod")] + public string CpuCfsQuotaPeriod {get; set; } /// - /// Gets or sets the percent of disk usage after which image garbage - /// collection is always run. + /// Gets or sets to disable image garbage collection, set to 100. The default + /// is 85% /// - /// - /// To disable image garbage collection, set to 100. The default is 85% - /// - [JsonProperty(PropertyName = "imageGcHighThreshold")] - public int? ImageGcHighThreshold { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "imageGcHighThreshold")] + public int? ImageGcHighThreshold {get; set; } /// - /// Gets or sets the percent of disk usage before which image garbage - /// collection is never run. + /// Gets or sets this cannot be set higher than imageGcHighThreshold. The + /// default is 80% /// - /// - /// This cannot be set higher than imageGcHighThreshold. The default is - /// 80% - /// - [JsonProperty(PropertyName = "imageGcLowThreshold")] - public int? ImageGcLowThreshold { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "imageGcLowThreshold")] + public int? ImageGcLowThreshold {get; set; } /// - /// Gets or sets the Topology Manager policy to use. - /// - /// - /// For more information see [Kubernetes Topology + /// Gets or sets for more information see [Kubernetes Topology /// Manager](https://kubernetes.io/docs/tasks/administer-cluster/topology-manager). - /// The default is 'none'. Allowed values are 'none', 'best-effort', - /// 'restricted', and 'single-numa-node'. - /// - [JsonProperty(PropertyName = "topologyManagerPolicy")] - public string TopologyManagerPolicy { get; set; } + /// The default is 'none'. Allowed values are 'none', 'best-effort', + /// 'restricted', and 'single-numa-node'. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "topologyManagerPolicy")] + public string TopologyManagerPolicy {get; set; } /// - /// Gets or sets allowed list of unsafe sysctls or unsafe sysctl - /// patterns (ending in `*`). + /// Gets or sets allowed list of unsafe sysctls or unsafe sysctl patterns + /// (ending in `*`). /// - [JsonProperty(PropertyName = "allowedUnsafeSysctls")] - public IList AllowedUnsafeSysctls { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "allowedUnsafeSysctls")] + public System.Collections.Generic.IList AllowedUnsafeSysctls {get; set; } /// - /// Gets or sets if set to true it will make the Kubelet fail to start - /// if swap is enabled on the node. + /// Gets or sets if set to true it will make the Kubelet fail to start if swap + /// is enabled on the node. /// - [JsonProperty(PropertyName = "failSwapOn")] - public bool? FailSwapOn { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "failSwapOn")] + public bool? FailSwapOn {get; set; } /// - /// Gets or sets the maximum size (e.g. 10Mi) of container log file - /// before it is rotated. + /// Gets or sets the maximum size (e.g. 10Mi) of container log file before it + /// is rotated. /// - [JsonProperty(PropertyName = "containerLogMaxSizeMB")] - public int? ContainerLogMaxSizeMB { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "containerLogMaxSizeMB")] + public int? ContainerLogMaxSizeMb {get; set; } /// - /// Gets or sets the maximum number of container log files that can be - /// present for a container. The number must be ≥ 2. + /// Gets or sets the maximum number of container log files that can be present + /// for a container. The number must be ≥ 2. /// - [JsonProperty(PropertyName = "containerLogMaxFiles")] - public int? ContainerLogMaxFiles { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "containerLogMaxFiles")] + public int? ContainerLogMaxFiles {get; set; } /// /// Gets or sets the maximum number of processes per pod. /// - [JsonProperty(PropertyName = "podMaxPids")] - public int? PodMaxPids { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "podMaxPids")] + public int? PodMaxPids {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (ContainerLogMaxFiles != null) + + + + + if (this.ContainerLogMaxFiles != null) { - if (ContainerLogMaxFiles < 2) + if (this.ContainerLogMaxFiles < 2) { - throw new ValidationException(ValidationRules.InclusiveMinimum, "ContainerLogMaxFiles", 2); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.InclusiveMinimum, "ContainerLogMaxFiles", 2); } } } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/KubeletDiskType.cs b/src/Aks/Aks.Sdk/Generated/Models/KubeletDiskType.cs index a7694b2b7d59..7c69bb43c7df 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/KubeletDiskType.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/KubeletDiskType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.ContainerService.Models /// /// Defines values for KubeletDiskType. /// + + public static class KubeletDiskType { /// @@ -25,4 +22,4 @@ public static class KubeletDiskType /// public const string Temporary = "Temporary"; } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/KubernetesPatchVersion.cs b/src/Aks/Aks.Sdk/Generated/Models/KubernetesPatchVersion.cs index 24aa97c7946b..826e3eab9aaa 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/KubernetesPatchVersion.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/KubernetesPatchVersion.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,11 +23,13 @@ public KubernetesPatchVersion() /// /// Initializes a new instance of the KubernetesPatchVersion class. /// - /// Possible upgrade path for given patch - /// version - public KubernetesPatchVersion(IList upgrades = default(IList)) + + /// Possible upgrade path for given patch version + /// + public KubernetesPatchVersion(System.Collections.Generic.IList upgrades = default(System.Collections.Generic.IList)) + { - Upgrades = upgrades; + this.Upgrades = upgrades; CustomInit(); } @@ -44,11 +38,11 @@ public KubernetesPatchVersion() /// partial void CustomInit(); + /// /// Gets or sets possible upgrade path for given patch version /// - [JsonProperty(PropertyName = "upgrades")] - public IList Upgrades { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "upgrades")] + public System.Collections.Generic.IList Upgrades {get; set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/KubernetesSupportPlan.cs b/src/Aks/Aks.Sdk/Generated/Models/KubernetesSupportPlan.cs index 64370b027542..e25974bfa513 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/KubernetesSupportPlan.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/KubernetesSupportPlan.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { @@ -14,19 +9,17 @@ namespace Microsoft.Azure.Management.ContainerService.Models /// /// Defines values for KubernetesSupportPlan. /// + + public static class KubernetesSupportPlan { /// - /// Support for the version is the same as for the open source - /// Kubernetes offering. Official Kubernetes open source community - /// support versions for 1 year after release. + /// Support for the version is the same as for the open source Kubernetes offering. Official Kubernetes open source community support versions for 1 year after release. /// public const string KubernetesOfficial = "KubernetesOfficial"; /// - /// Support for the version extended past the KubernetesOfficial - /// support of 1 year. AKS continues to patch CVEs for another 1 year, - /// for a total of 2 years of support. + /// Support for the version extended past the KubernetesOfficial support of 1 year. AKS continues to patch CVEs for another 1 year, for a total of 2 years of support. /// public const string AKSLongTermSupport = "AKSLongTermSupport"; } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/KubernetesVersion.cs b/src/Aks/Aks.Sdk/Generated/Models/KubernetesVersion.cs index f6c99bf53b48..7f6b757e3743 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/KubernetesVersion.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/KubernetesVersion.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,20 +23,25 @@ public KubernetesVersion() /// /// Initializes a new instance of the KubernetesVersion class. /// - /// major.minor version of Kubernetes - /// release - /// Capabilities on this Kubernetes - /// version. - /// Whether this version is in preview - /// mode. - /// Patch versions of Kubernetes - /// release - public KubernetesVersion(string version = default(string), KubernetesVersionCapabilities capabilities = default(KubernetesVersionCapabilities), bool? isPreview = default(bool?), IDictionary patchVersions = default(IDictionary)) + + /// major.minor version of Kubernetes release + /// + + /// Capabilities on this Kubernetes version. + /// + + /// Whether this version is in preview mode. + /// + + /// Patch versions of Kubernetes release + /// + public KubernetesVersion(string version = default(string), KubernetesVersionCapabilities capabilities = default(KubernetesVersionCapabilities), bool? isPreview = default(bool?), System.Collections.Generic.IDictionary patchVersions = default(System.Collections.Generic.IDictionary)) + { - Version = version; - Capabilities = capabilities; - IsPreview = isPreview; - PatchVersions = patchVersions; + this.Version = version; + this.Capabilities = capabilities; + this.IsPreview = isPreview; + this.PatchVersions = patchVersions; CustomInit(); } @@ -53,29 +50,29 @@ public KubernetesVersion() /// partial void CustomInit(); + /// /// Gets or sets major.minor version of Kubernetes release /// - [JsonProperty(PropertyName = "version")] - public string Version { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "version")] + public string Version {get; set; } /// /// Gets or sets capabilities on this Kubernetes version. /// - [JsonProperty(PropertyName = "capabilities")] - public KubernetesVersionCapabilities Capabilities { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "capabilities")] + public KubernetesVersionCapabilities Capabilities {get; set; } /// /// Gets or sets whether this version is in preview mode. /// - [JsonProperty(PropertyName = "isPreview")] - public bool? IsPreview { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "isPreview")] + public bool? IsPreview {get; set; } /// /// Gets or sets patch versions of Kubernetes release /// - [JsonProperty(PropertyName = "patchVersions")] - public IDictionary PatchVersions { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "patchVersions")] + public System.Collections.Generic.IDictionary PatchVersions {get; set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/KubernetesVersionCapabilities.cs b/src/Aks/Aks.Sdk/Generated/Models/KubernetesVersionCapabilities.cs index 4edd77be500c..3d85f13044af 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/KubernetesVersionCapabilities.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/KubernetesVersionCapabilities.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -21,8 +13,7 @@ namespace Microsoft.Azure.Management.ContainerService.Models public partial class KubernetesVersionCapabilities { /// - /// Initializes a new instance of the KubernetesVersionCapabilities - /// class. + /// Initializes a new instance of the KubernetesVersionCapabilities class. /// public KubernetesVersionCapabilities() { @@ -30,12 +21,15 @@ public KubernetesVersionCapabilities() } /// - /// Initializes a new instance of the KubernetesVersionCapabilities - /// class. + /// Initializes a new instance of the KubernetesVersionCapabilities class. /// - public KubernetesVersionCapabilities(IList supportPlan = default(IList)) + + /// + /// + public KubernetesVersionCapabilities(System.Collections.Generic.IList supportPlan = default(System.Collections.Generic.IList)) + { - SupportPlan = supportPlan; + this.SupportPlan = supportPlan; CustomInit(); } @@ -44,10 +38,11 @@ public KubernetesVersionCapabilities() /// partial void CustomInit(); + /// + /// Gets or sets /// - [JsonProperty(PropertyName = "supportPlan")] - public IList SupportPlan { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "supportPlan")] + public System.Collections.Generic.IList SupportPlan {get; set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/KubernetesVersionListResult.cs b/src/Aks/Aks.Sdk/Generated/Models/KubernetesVersionListResult.cs index 6b73960e8a0c..3e0e8a910fc2 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/KubernetesVersionListResult.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/KubernetesVersionListResult.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -21,8 +13,7 @@ namespace Microsoft.Azure.Management.ContainerService.Models public partial class KubernetesVersionListResult { /// - /// Initializes a new instance of the KubernetesVersionListResult - /// class. + /// Initializes a new instance of the KubernetesVersionListResult class. /// public KubernetesVersionListResult() { @@ -30,14 +21,15 @@ public KubernetesVersionListResult() } /// - /// Initializes a new instance of the KubernetesVersionListResult - /// class. + /// Initializes a new instance of the KubernetesVersionListResult class. /// - /// Array of AKS supported Kubernetes - /// versions. - public KubernetesVersionListResult(IList values = default(IList)) + + /// Array of AKS supported Kubernetes versions. + /// + public KubernetesVersionListResult(System.Collections.Generic.IList values = default(System.Collections.Generic.IList)) + { - Values = values; + this.Values = values; CustomInit(); } @@ -46,11 +38,11 @@ public KubernetesVersionListResult() /// partial void CustomInit(); + /// /// Gets or sets array of AKS supported Kubernetes versions. /// - [JsonProperty(PropertyName = "values")] - public IList Values { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "values")] + public System.Collections.Generic.IList Values {get; set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/LicenseType.cs b/src/Aks/Aks.Sdk/Generated/Models/LicenseType.cs index ec97c30d364d..a7ed7b30c57e 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/LicenseType.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/LicenseType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.ContainerService.Models /// /// Defines values for LicenseType. /// + + public static class LicenseType { /// @@ -25,4 +22,4 @@ public static class LicenseType /// public const string WindowsServer = "Windows_Server"; } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/LinuxOSConfig.cs b/src/Aks/Aks.Sdk/Generated/Models/LinuxOSConfig.cs index ddc19bb9e9b5..87042cd3431d 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/LinuxOSConfig.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/LinuxOSConfig.cs @@ -1,20 +1,16 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; using System.Linq; /// - /// OS configurations of Linux agent nodes. + /// See [AKS custom node + /// configuration](https://docs.microsoft.com/azure/aks/custom-node-configuration) + /// for more details. /// /// /// See [AKS custom node @@ -34,21 +30,29 @@ public LinuxOSConfig() /// /// Initializes a new instance of the LinuxOSConfig class. /// - /// Sysctl settings for Linux agent - /// nodes. - /// Whether transparent - /// hugepages are enabled. - /// Whether the kernel should - /// make aggressive use of memory compaction to make more hugepages - /// available. - /// The size in MB of a swap file that - /// will be created on each node. - public LinuxOSConfig(SysctlConfig sysctls = default(SysctlConfig), string transparentHugePageEnabled = default(string), string transparentHugePageDefrag = default(string), int? swapFileSizeMB = default(int?)) + + /// Sysctl settings for Linux agent nodes. + /// + + /// Valid values are 'always', 'madvise', and 'never'. The default is 'always'. + /// For more information see [Transparent + /// Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge). + /// + + /// Valid values are 'always', 'defer', 'defer+madvise', 'madvise' and 'never'. + /// The default is 'madvise'. For more information see [Transparent + /// Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge). + /// + + /// The size in MB of a swap file that will be created on each node. + /// + public LinuxOSConfig(SysctlConfig sysctls = default(SysctlConfig), string transparentHugePageEnabled = default(string), string transparentHugePageDefrag = default(string), int? swapFileSizeMb = default(int?)) + { - Sysctls = sysctls; - TransparentHugePageEnabled = transparentHugePageEnabled; - TransparentHugePageDefrag = transparentHugePageDefrag; - SwapFileSizeMB = swapFileSizeMB; + this.Sysctls = sysctls; + this.TransparentHugePageEnabled = transparentHugePageEnabled; + this.TransparentHugePageDefrag = transparentHugePageDefrag; + this.SwapFileSizeMb = swapFileSizeMb; CustomInit(); } @@ -57,42 +61,35 @@ public LinuxOSConfig() /// partial void CustomInit(); + /// /// Gets or sets sysctl settings for Linux agent nodes. /// - [JsonProperty(PropertyName = "sysctls")] - public SysctlConfig Sysctls { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sysctls")] + public SysctlConfig Sysctls {get; set; } /// - /// Gets or sets whether transparent hugepages are enabled. - /// - /// - /// Valid values are 'always', 'madvise', and 'never'. The default is - /// 'always'. For more information see [Transparent + /// Gets or sets valid values are 'always', 'madvise', and 'never'. The default + /// is 'always'. For more information see [Transparent /// Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge). - /// - [JsonProperty(PropertyName = "transparentHugePageEnabled")] - public string TransparentHugePageEnabled { get; set; } + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "transparentHugePageEnabled")] + public string TransparentHugePageEnabled {get; set; } /// - /// Gets or sets whether the kernel should make aggressive use of - /// memory compaction to make more hugepages available. - /// - /// - /// Valid values are 'always', 'defer', 'defer+madvise', 'madvise' and - /// 'never'. The default is 'madvise'. For more information see + /// Gets or sets valid values are 'always', 'defer', 'defer+madvise', 'madvise' + /// and 'never'. The default is 'madvise'. For more information see /// [Transparent /// Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge). - /// - [JsonProperty(PropertyName = "transparentHugePageDefrag")] - public string TransparentHugePageDefrag { get; set; } + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "transparentHugePageDefrag")] + public string TransparentHugePageDefrag {get; set; } /// - /// Gets or sets the size in MB of a swap file that will be created on - /// each node. + /// Gets or sets the size in MB of a swap file that will be created on each + /// node. /// - [JsonProperty(PropertyName = "swapFileSizeMB")] - public int? SwapFileSizeMB { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "swapFileSizeMB")] + public int? SwapFileSizeMb {get; set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/LoadBalancerSku.cs b/src/Aks/Aks.Sdk/Generated/Models/LoadBalancerSku.cs index 704f3f623594..9bb0dda65878 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/LoadBalancerSku.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/LoadBalancerSku.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { @@ -14,14 +9,12 @@ namespace Microsoft.Azure.Management.ContainerService.Models /// /// Defines values for LoadBalancerSku. /// + + public static class LoadBalancerSku { /// - /// Use a a standard Load Balancer. This is the recommended Load - /// Balancer SKU. For more information about on working with the load - /// balancer in the managed cluster, see the [standard Load - /// Balancer](https://docs.microsoft.com/azure/aks/load-balancer-standard) - /// article. + /// Use a a standard Load Balancer. This is the recommended Load Balancer SKU. For more information about on working with the load balancer in the managed cluster, see the [standard Load Balancer](https://docs.microsoft.com/azure/aks/load-balancer-standard) article. /// public const string Standard = "standard"; /// @@ -29,4 +22,4 @@ public static class LoadBalancerSku /// public const string Basic = "basic"; } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/MaintenanceConfiguration.cs b/src/Aks/Aks.Sdk/Generated/Models/MaintenanceConfiguration.cs index a87ab504084a..307b52ad4a40 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/MaintenanceConfiguration.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/MaintenanceConfiguration.cs @@ -1,32 +1,23 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// - /// Planned maintenance configuration, used to configure when updates can - /// be deployed to a Managed Cluster. + /// See [planned + /// maintenance](https://docs.microsoft.com/azure/aks/planned-maintenance) for + /// more information about planned maintenance. /// /// /// See [planned - /// maintenance](https://docs.microsoft.com/azure/aks/planned-maintenance) - /// for more information about planned maintenance. + /// maintenance](https://docs.microsoft.com/azure/aks/planned-maintenance) for + /// more information about planned maintenance. /// - [Rest.Serialization.JsonTransformation] + [Microsoft.Rest.Serialization.JsonTransformation] public partial class MaintenanceConfiguration : SubResource { /// @@ -40,23 +31,33 @@ public MaintenanceConfiguration() /// /// Initializes a new instance of the MaintenanceConfiguration class. /// - /// Resource ID. - /// The name of the resource that is unique within a - /// resource group. This name can be used to access the - /// resource. - /// Resource type - /// The system metadata relating to this - /// resource. - /// Time slots during the week when planned - /// maintenance is allowed to proceed. - /// Time slots on which upgrade is not - /// allowed. - public MaintenanceConfiguration(string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), IList timeInWeek = default(IList), IList notAllowedTime = default(IList)) - : base(id, name, type) + + /// Resource ID. + /// + + /// The name of the resource that is unique within a resource group. This name + /// can be used to access the resource. + /// + + /// Resource type + /// + + /// The system metadata relating to this resource. + /// + + /// If two array entries specify the same day of the week, the applied + /// configuration is the union of times in both entries. + /// + + /// Time slots on which upgrade is not allowed. + /// + public MaintenanceConfiguration(string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), System.Collections.Generic.IList timeInWeek = default(System.Collections.Generic.IList), System.Collections.Generic.IList notAllowedTime = default(System.Collections.Generic.IList)) + + : base(id, name, type) { - SystemData = systemData; - TimeInWeek = timeInWeek; - NotAllowedTime = notAllowedTime; + this.SystemData = systemData; + this.TimeInWeek = timeInWeek; + this.NotAllowedTime = notAllowedTime; CustomInit(); } @@ -65,28 +66,24 @@ public MaintenanceConfiguration() /// partial void CustomInit(); + /// /// Gets the system metadata relating to this resource. /// - [JsonProperty(PropertyName = "systemData")] - public SystemData SystemData { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "systemData")] + public SystemData SystemData {get; private set; } /// - /// Gets or sets time slots during the week when planned maintenance is - /// allowed to proceed. + /// Gets or sets if two array entries specify the same day of the week, the + /// applied configuration is the union of times in both entries. /// - /// - /// If two array entries specify the same day of the week, the applied - /// configuration is the union of times in both entries. - /// - [JsonProperty(PropertyName = "properties.timeInWeek")] - public IList TimeInWeek { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.timeInWeek")] + public System.Collections.Generic.IList TimeInWeek {get; set; } /// /// Gets or sets time slots on which upgrade is not allowed. /// - [JsonProperty(PropertyName = "properties.notAllowedTime")] - public IList NotAllowedTime { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.notAllowedTime")] + public System.Collections.Generic.IList NotAllowedTime {get; set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/MaintenanceConfigurationProperties.cs b/src/Aks/Aks.Sdk/Generated/Models/MaintenanceConfigurationProperties.cs new file mode 100644 index 000000000000..3c4a1650426b --- /dev/null +++ b/src/Aks/Aks.Sdk/Generated/Models/MaintenanceConfigurationProperties.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.ContainerService.Models +{ + using System.Linq; + + /// + /// Properties used to configure planned maintenance for a Managed Cluster. + /// + public partial class MaintenanceConfigurationProperties + { + /// + /// Initializes a new instance of the MaintenanceConfigurationProperties class. + /// + public MaintenanceConfigurationProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the MaintenanceConfigurationProperties class. + /// + + /// If two array entries specify the same day of the week, the applied + /// configuration is the union of times in both entries. + /// + + /// Time slots on which upgrade is not allowed. + /// + public MaintenanceConfigurationProperties(System.Collections.Generic.IList timeInWeek = default(System.Collections.Generic.IList), System.Collections.Generic.IList notAllowedTime = default(System.Collections.Generic.IList)) + + { + this.TimeInWeek = timeInWeek; + this.NotAllowedTime = notAllowedTime; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets if two array entries specify the same day of the week, the + /// applied configuration is the union of times in both entries. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "timeInWeek")] + public System.Collections.Generic.IList TimeInWeek {get; set; } + + /// + /// Gets or sets time slots on which upgrade is not allowed. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "notAllowedTime")] + public System.Collections.Generic.IList NotAllowedTime {get; set; } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ManagedCluster.cs b/src/Aks/Aks.Sdk/Generated/Models/ManagedCluster.cs index 8aa50944955e..bc6f818b1ba9 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ManagedCluster.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ManagedCluster.cs @@ -1,26 +1,16 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// /// Managed cluster. /// - [Rest.Serialization.JsonTransformation] + [Microsoft.Rest.Serialization.JsonTransformation] public partial class ManagedCluster : TrackedResource { /// @@ -34,134 +24,214 @@ public ManagedCluster() /// /// Initializes a new instance of the ManagedCluster class. /// - /// The geo-location where the resource - /// lives + /// Fully qualified resource ID for the resource. Ex - - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - /// The name of the resource - /// The type of the resource. E.g. - /// "Microsoft.Compute/virtualMachines" or - /// "Microsoft.Storage/storageAccounts" - /// Azure Resource Manager metadata containing - /// createdBy and modifiedBy information. - /// Resource tags. - /// The managed cluster SKU. - /// The extended location of the Virtual - /// Machine. - /// The identity of the managed cluster, if - /// configured. - /// The current provisioning - /// state. - /// The Power State of the cluster. - /// The max number of agent pools for the - /// managed cluster. - /// The version of Kubernetes specified - /// by the user. - /// The version of Kubernetes - /// the Managed Cluster is running. - /// The DNS prefix of the Managed - /// Cluster. - /// The FQDN subdomain of the private - /// cluster with custom private dns zone. - /// The FQDN of the master pool. - /// The FQDN of private cluster. - /// The special FQDN used by the Azure - /// Portal to access the Managed Cluster. This FQDN is for use only by - /// the Azure Portal and should not be used by other clients. - /// The agent pool properties. - /// The profile for Linux VMs in the Managed - /// Cluster. - /// The profile for Windows VMs in the - /// Managed Cluster. - /// Information about a service - /// principal identity for the cluster to use for manipulating Azure - /// APIs. - /// The profile of managed cluster - /// add-on. - /// The pod identity profile of the - /// Managed Cluster. - /// The OIDC issuer profile of the - /// Managed Cluster. - /// The name of the resource group - /// containing agent pool nodes. - /// Whether to enable Kubernetes Role-Based - /// Access Control. - /// The support plan for the Managed Cluster. - /// If unspecified, the default is 'KubernetesOfficial'. Possible - /// values include: 'KubernetesOfficial', 'AKSLongTermSupport' - /// (DEPRECATED) Whether to - /// enable Kubernetes pod security policy (preview). PodSecurityPolicy - /// was deprecated in Kubernetes v1.21, and removed from Kubernetes in - /// v1.25. Learn more at https://aka.ms/k8s/psp and - /// https://aka.ms/aks/psp. - /// The network configuration - /// profile. - /// The Azure Active Directory - /// configuration. - /// The auto upgrade - /// configuration. - /// Parameters to be applied to the - /// cluster-autoscaler when enabled - /// The access profile for managed - /// cluster API server. - /// The Resource ID of the disk - /// encryption set to use for enabling encryption at rest. - /// Identities associated with the - /// cluster. - /// Private link resources - /// associated with the cluster. - /// If local accounts should be - /// disabled on the Managed Cluster. - /// Configurations for provisioning the - /// cluster with HTTP proxy servers. - /// Security profile for the managed - /// cluster. - /// Storage profile for the managed - /// cluster. - /// PublicNetworkAccess of the - /// managedCluster - public ManagedCluster(string location, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), IDictionary tags = default(IDictionary), ManagedClusterSKU sku = default(ManagedClusterSKU), ExtendedLocation extendedLocation = default(ExtendedLocation), ManagedClusterIdentity identity = default(ManagedClusterIdentity), string provisioningState = default(string), PowerState powerState = default(PowerState), int? maxAgentPools = default(int?), string kubernetesVersion = default(string), string currentKubernetesVersion = default(string), string dnsPrefix = default(string), string fqdnSubdomain = default(string), string fqdn = default(string), string privateFQDN = default(string), string azurePortalFQDN = default(string), IList agentPoolProfiles = default(IList), ContainerServiceLinuxProfile linuxProfile = default(ContainerServiceLinuxProfile), ManagedClusterWindowsProfile windowsProfile = default(ManagedClusterWindowsProfile), ManagedClusterServicePrincipalProfile servicePrincipalProfile = default(ManagedClusterServicePrincipalProfile), IDictionary addonProfiles = default(IDictionary), ManagedClusterPodIdentityProfile podIdentityProfile = default(ManagedClusterPodIdentityProfile), ManagedClusterOIDCIssuerProfile oidcIssuerProfile = default(ManagedClusterOIDCIssuerProfile), string nodeResourceGroup = default(string), bool? enableRBAC = default(bool?), string supportPlan = default(string), bool? enablePodSecurityPolicy = default(bool?), ContainerServiceNetworkProfile networkProfile = default(ContainerServiceNetworkProfile), ManagedClusterAADProfile aadProfile = default(ManagedClusterAADProfile), ManagedClusterAutoUpgradeProfile autoUpgradeProfile = default(ManagedClusterAutoUpgradeProfile), ManagedClusterPropertiesAutoScalerProfile autoScalerProfile = default(ManagedClusterPropertiesAutoScalerProfile), ManagedClusterAPIServerAccessProfile apiServerAccessProfile = default(ManagedClusterAPIServerAccessProfile), string diskEncryptionSetID = default(string), IDictionary identityProfile = default(IDictionary), IList privateLinkResources = default(IList), bool? disableLocalAccounts = default(bool?), ManagedClusterHTTPProxyConfig httpProxyConfig = default(ManagedClusterHTTPProxyConfig), ManagedClusterSecurityProfile securityProfile = default(ManagedClusterSecurityProfile), ManagedClusterStorageProfile storageProfile = default(ManagedClusterStorageProfile), string publicNetworkAccess = default(string), ManagedClusterWorkloadAutoScalerProfile workloadAutoScalerProfile = default(ManagedClusterWorkloadAutoScalerProfile), ManagedClusterAzureMonitorProfile azureMonitorProfile = default(ManagedClusterAzureMonitorProfile)) - : base(location, id, name, type, systemData, tags) + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// + + /// The name of the resource + /// + + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" + /// + + /// Azure Resource Manager metadata containing createdBy and modifiedBy + /// information. + /// + + /// Resource tags. + /// + + /// The geo-location where the resource lives + /// + + /// The managed cluster SKU. + /// + + /// The extended location of the Virtual Machine. + /// + + /// The identity of the managed cluster, if configured. + /// + + /// The Power State of the cluster. + /// + + /// The current provisioning state. + /// + + /// The max number of agent pools for the managed cluster. + /// + + /// Both patch version (major.minor.patch) (e.g. 1.20.13) and (major.minor) + /// (e.g. 1.20) are supported. When (major.minor) is specified, the latest + /// supported GA patch version is chosen automatically. Updating the cluster + /// with the same (major.minor) once it has been created (e.g. 1.14.x -) 1.14) + /// will not trigger an upgrade, even if a newer patch version is available. + /// When you upgrade a supported AKS cluster, Kubernetes minor versions cannot + /// be skipped. All upgrades must be performed sequentially by major version + /// number. For example, upgrades between 1.14.x -) 1.15.x or 1.15.x -) 1.16.x + /// are allowed, however 1.14.x -) 1.16.x is not allowed. See [upgrading an AKS + /// cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) for more + /// details. + /// + + /// If kubernetesVersion was a fully specified version (major.minor.patch), + /// this field will be exactly equal to it. If kubernetesVersion was + /// (major.minor), this field will contain the full (major.minor.patch) version + /// being used. + /// + + /// This cannot be updated once the Managed Cluster has been created. + /// + + /// This cannot be updated once the Managed Cluster has been created. + /// + + /// The FQDN of the master pool. + /// + + /// The FQDN of private cluster. + /// + + /// The Azure Portal requires certain Cross-Origin Resource Sharing (CORS) + /// headers to be sent in some responses, which Kubernetes APIServer doesn't + /// handle by default. This special FQDN supports CORS, allowing the Azure + /// Portal to function properly. + /// + + /// The agent pool properties. + /// + + /// The profile for Linux VMs in the Managed Cluster. + /// + + /// The profile for Windows VMs in the Managed Cluster. + /// + + /// Information about a service principal identity for the cluster to use for + /// manipulating Azure APIs. + /// + + /// The profile of managed cluster add-on. + /// + + /// See [use AAD pod + /// identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity) + /// for more details on AAD pod identity integration. + /// + + /// The OIDC issuer profile of the Managed Cluster. + /// + + /// The name of the resource group containing agent pool nodes. + /// + + /// Whether to enable Kubernetes Role-Based Access Control. + /// + + /// The support plan for the Managed Cluster. If unspecified, the default is + /// 'KubernetesOfficial'. + /// Possible values include: 'KubernetesOfficial', 'AKSLongTermSupport' + + /// (DEPRECATED) Whether to enable Kubernetes pod security policy (preview). + /// PodSecurityPolicy was deprecated in Kubernetes v1.21, and removed from + /// Kubernetes in v1.25. Learn more at https://aka.ms/k8s/psp and + /// https://aka.ms/aks/psp. + /// + + /// The network configuration profile. + /// + + /// The Azure Active Directory configuration. + /// + + /// The auto upgrade configuration. + /// + + /// Parameters to be applied to the cluster-autoscaler when enabled + /// + + /// The access profile for managed cluster API server. + /// + + /// This is of the form: + /// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{encryptionSetName}' + /// + + /// Identities associated with the cluster. + /// + + /// Private link resources associated with the cluster. + /// + + /// If set to true, getting static credentials will be disabled for this + /// cluster. This must only be used on Managed Clusters that are AAD enabled. + /// For more details see [disable local + /// accounts](https://docs.microsoft.com/azure/aks/managed-aad#disable-local-accounts-preview). + /// + + /// Configurations for provisioning the cluster with HTTP proxy servers. + /// + + /// Security profile for the managed cluster. + /// + + /// Storage profile for the managed cluster. + /// + + /// Allow or deny public network access for AKS + /// Possible values include: 'Enabled', 'Disabled' + + /// Workload Auto-scaler profile for the managed cluster. + /// + + /// Azure Monitor addon profiles for monitoring the managed cluster. + /// + public ManagedCluster(string location, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), ManagedClusterSKU sku = default(ManagedClusterSKU), ExtendedLocation extendedLocation = default(ExtendedLocation), ManagedClusterIdentity identity = default(ManagedClusterIdentity), PowerState powerState = default(PowerState), string provisioningState = default(string), int? maxAgentPools = default(int?), string kubernetesVersion = default(string), string currentKubernetesVersion = default(string), string dnsPrefix = default(string), string fqdnSubdomain = default(string), string fqdn = default(string), string privateFqdn = default(string), string azurePortalFqdn = default(string), System.Collections.Generic.IList agentPoolProfiles = default(System.Collections.Generic.IList), ContainerServiceLinuxProfile linuxProfile = default(ContainerServiceLinuxProfile), ManagedClusterWindowsProfile windowsProfile = default(ManagedClusterWindowsProfile), ManagedClusterServicePrincipalProfile servicePrincipalProfile = default(ManagedClusterServicePrincipalProfile), System.Collections.Generic.IDictionary addonProfiles = default(System.Collections.Generic.IDictionary), ManagedClusterPodIdentityProfile podIdentityProfile = default(ManagedClusterPodIdentityProfile), ManagedClusterOidcIssuerProfile oidcIssuerProfile = default(ManagedClusterOidcIssuerProfile), string nodeResourceGroup = default(string), bool? enableRbac = default(bool?), string supportPlan = default(string), bool? enablePodSecurityPolicy = default(bool?), ContainerServiceNetworkProfile networkProfile = default(ContainerServiceNetworkProfile), ManagedClusterAADProfile aadProfile = default(ManagedClusterAADProfile), ManagedClusterAutoUpgradeProfile autoUpgradeProfile = default(ManagedClusterAutoUpgradeProfile), ManagedClusterPropertiesAutoScalerProfile autoScalerProfile = default(ManagedClusterPropertiesAutoScalerProfile), ManagedClusterAPIServerAccessProfile apiServerAccessProfile = default(ManagedClusterAPIServerAccessProfile), string diskEncryptionSetId = default(string), System.Collections.Generic.IDictionary identityProfile = default(System.Collections.Generic.IDictionary), System.Collections.Generic.IList privateLinkResources = default(System.Collections.Generic.IList), bool? disableLocalAccounts = default(bool?), ManagedClusterHttpProxyConfig httpProxyConfig = default(ManagedClusterHttpProxyConfig), ManagedClusterSecurityProfile securityProfile = default(ManagedClusterSecurityProfile), ManagedClusterStorageProfile storageProfile = default(ManagedClusterStorageProfile), string publicNetworkAccess = default(string), ManagedClusterWorkloadAutoScalerProfile workloadAutoScalerProfile = default(ManagedClusterWorkloadAutoScalerProfile), ManagedClusterAzureMonitorProfile azureMonitorProfile = default(ManagedClusterAzureMonitorProfile)) + + : base(location, id, name, type, systemData, tags) { - Sku = sku; - ExtendedLocation = extendedLocation; - Identity = identity; - ProvisioningState = provisioningState; - PowerState = powerState; - MaxAgentPools = maxAgentPools; - KubernetesVersion = kubernetesVersion; - CurrentKubernetesVersion = currentKubernetesVersion; - DnsPrefix = dnsPrefix; - FqdnSubdomain = fqdnSubdomain; - Fqdn = fqdn; - PrivateFQDN = privateFQDN; - AzurePortalFQDN = azurePortalFQDN; - AgentPoolProfiles = agentPoolProfiles; - LinuxProfile = linuxProfile; - WindowsProfile = windowsProfile; - ServicePrincipalProfile = servicePrincipalProfile; - AddonProfiles = addonProfiles; - PodIdentityProfile = podIdentityProfile; - OidcIssuerProfile = oidcIssuerProfile; - NodeResourceGroup = nodeResourceGroup; - EnableRBAC = enableRBAC; - SupportPlan = supportPlan; - EnablePodSecurityPolicy = enablePodSecurityPolicy; - NetworkProfile = networkProfile; - AadProfile = aadProfile; - AutoUpgradeProfile = autoUpgradeProfile; - AutoScalerProfile = autoScalerProfile; - ApiServerAccessProfile = apiServerAccessProfile; - DiskEncryptionSetID = diskEncryptionSetID; - IdentityProfile = identityProfile; - PrivateLinkResources = privateLinkResources; - DisableLocalAccounts = disableLocalAccounts; - HttpProxyConfig = httpProxyConfig; - SecurityProfile = securityProfile; - StorageProfile = storageProfile; - PublicNetworkAccess = publicNetworkAccess; - WorkloadAutoScalerProfile = workloadAutoScalerProfile; - AzureMonitorProfile = azureMonitorProfile; + this.Sku = sku; + this.ExtendedLocation = extendedLocation; + this.Identity = identity; + this.PowerState = powerState; + this.ProvisioningState = provisioningState; + this.MaxAgentPools = maxAgentPools; + this.KubernetesVersion = kubernetesVersion; + this.CurrentKubernetesVersion = currentKubernetesVersion; + this.DnsPrefix = dnsPrefix; + this.FqdnSubdomain = fqdnSubdomain; + this.Fqdn = fqdn; + this.PrivateFqdn = privateFqdn; + this.AzurePortalFqdn = azurePortalFqdn; + this.AgentPoolProfiles = agentPoolProfiles; + this.LinuxProfile = linuxProfile; + this.WindowsProfile = windowsProfile; + this.ServicePrincipalProfile = servicePrincipalProfile; + this.AddonProfiles = addonProfiles; + this.PodIdentityProfile = podIdentityProfile; + this.OidcIssuerProfile = oidcIssuerProfile; + this.NodeResourceGroup = nodeResourceGroup; + this.EnableRbac = enableRbac; + this.SupportPlan = supportPlan; + this.EnablePodSecurityPolicy = enablePodSecurityPolicy; + this.NetworkProfile = networkProfile; + this.AadProfile = aadProfile; + this.AutoUpgradeProfile = autoUpgradeProfile; + this.AutoScalerProfile = autoScalerProfile; + this.ApiServerAccessProfile = apiServerAccessProfile; + this.DiskEncryptionSetId = diskEncryptionSetId; + this.IdentityProfile = identityProfile; + this.PrivateLinkResources = privateLinkResources; + this.DisableLocalAccounts = disableLocalAccounts; + this.HttpProxyConfig = httpProxyConfig; + this.SecurityProfile = securityProfile; + this.StorageProfile = storageProfile; + this.PublicNetworkAccess = publicNetworkAccess; + this.WorkloadAutoScalerProfile = workloadAutoScalerProfile; + this.AzureMonitorProfile = azureMonitorProfile; CustomInit(); } @@ -170,317 +240,297 @@ public ManagedCluster() /// partial void CustomInit(); + /// /// Gets or sets the managed cluster SKU. /// - [JsonProperty(PropertyName = "sku")] - public ManagedClusterSKU Sku { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "sku")] + public ManagedClusterSKU Sku {get; set; } /// /// Gets or sets the extended location of the Virtual Machine. /// - [JsonProperty(PropertyName = "extendedLocation")] - public ExtendedLocation ExtendedLocation { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "extendedLocation")] + public ExtendedLocation ExtendedLocation {get; set; } /// /// Gets or sets the identity of the managed cluster, if configured. /// - [JsonProperty(PropertyName = "identity")] - public ManagedClusterIdentity Identity { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "identity")] + public ManagedClusterIdentity Identity {get; set; } /// - /// Gets the current provisioning state. + /// Gets the Power State of the cluster. /// - [JsonProperty(PropertyName = "properties.provisioningState")] - public string ProvisioningState { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.powerState")] + public PowerState PowerState {get; private set; } /// - /// Gets the Power State of the cluster. + /// Gets the current provisioning state. /// - [JsonProperty(PropertyName = "properties.powerState")] - public PowerState PowerState { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.provisioningState")] + public string ProvisioningState {get; private set; } /// /// Gets the max number of agent pools for the managed cluster. /// - [JsonProperty(PropertyName = "properties.maxAgentPools")] - public int? MaxAgentPools { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.maxAgentPools")] + public int? MaxAgentPools {get; private set; } /// - /// Gets or sets the version of Kubernetes specified by the user. + /// Gets or sets both patch version (major.minor.patch) (e.g. 1.20.13) and + /// (major.minor) (e.g. 1.20) are supported. When (major.minor) is specified, + /// the latest supported GA patch version is chosen automatically. Updating the + /// cluster with the same (major.minor) once it has been created (e.g. 1.14.x + /// -) 1.14) will not trigger an upgrade, even if a newer patch version is + /// available. When you upgrade a supported AKS cluster, Kubernetes minor + /// versions cannot be skipped. All upgrades must be performed sequentially by + /// major version number. For example, upgrades between 1.14.x -) 1.15.x or + /// 1.15.x -) 1.16.x are allowed, however 1.14.x -) 1.16.x is not allowed. See + /// [upgrading an AKS + /// cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) for more + /// details. /// - /// - /// Both patch version (major.minor.patch) (e.g. 1.20.13) and - /// (major.minor) (e.g. 1.20) are supported. When (major.minor) is - /// specified, the latest supported GA patch version is chosen - /// automatically. Updating the cluster with the same (major.minor) - /// once it has been created (e.g. 1.14.x -) 1.14) will not trigger an - /// upgrade, even if a newer patch version is available. When you - /// upgrade a supported AKS cluster, Kubernetes minor versions cannot - /// be skipped. All upgrades must be performed sequentially by major - /// version number. For example, upgrades between 1.14.x -) 1.15.x or - /// 1.15.x -) 1.16.x are allowed, however 1.14.x -) 1.16.x is not - /// allowed. See [upgrading an AKS - /// cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) for - /// more details. - /// - [JsonProperty(PropertyName = "properties.kubernetesVersion")] - public string KubernetesVersion { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.kubernetesVersion")] + public string KubernetesVersion {get; set; } /// - /// Gets the version of Kubernetes the Managed Cluster is running. - /// - /// - /// If kubernetesVersion was a fully specified version + /// Gets if kubernetesVersion was a fully specified version /// (major.minor.patch), this field will be exactly equal to it. If - /// kubernetesVersion was (major.minor), this field will contain the - /// full (major.minor.patch) version being used. - /// - [JsonProperty(PropertyName = "properties.currentKubernetesVersion")] - public string CurrentKubernetesVersion { get; private set; } + /// kubernetesVersion was (major.minor), this field will contain the full + /// (major.minor.patch) version being used. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.currentKubernetesVersion")] + public string CurrentKubernetesVersion {get; private set; } /// - /// Gets or sets the DNS prefix of the Managed Cluster. + /// Gets or sets this cannot be updated once the Managed Cluster has been + /// created. /// - /// - /// This cannot be updated once the Managed Cluster has been created. - /// - [JsonProperty(PropertyName = "properties.dnsPrefix")] - public string DnsPrefix { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.dnsPrefix")] + public string DnsPrefix {get; set; } /// - /// Gets or sets the FQDN subdomain of the private cluster with custom - /// private dns zone. + /// Gets or sets this cannot be updated once the Managed Cluster has been + /// created. /// - /// - /// This cannot be updated once the Managed Cluster has been created. - /// - [JsonProperty(PropertyName = "properties.fqdnSubdomain")] - public string FqdnSubdomain { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.fqdnSubdomain")] + public string FqdnSubdomain {get; set; } /// /// Gets the FQDN of the master pool. /// - [JsonProperty(PropertyName = "properties.fqdn")] - public string Fqdn { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.fqdn")] + public string Fqdn {get; private set; } /// /// Gets the FQDN of private cluster. /// - [JsonProperty(PropertyName = "properties.privateFQDN")] - public string PrivateFQDN { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.privateFQDN")] + public string PrivateFqdn {get; private set; } /// - /// Gets the special FQDN used by the Azure Portal to access the - /// Managed Cluster. This FQDN is for use only by the Azure Portal and - /// should not be used by other clients. + /// Gets the Azure Portal requires certain Cross-Origin Resource Sharing (CORS) + /// headers to be sent in some responses, which Kubernetes APIServer doesn't + /// handle by default. This special FQDN supports CORS, allowing the Azure + /// Portal to function properly. /// - /// - /// The Azure Portal requires certain Cross-Origin Resource Sharing - /// (CORS) headers to be sent in some responses, which Kubernetes - /// APIServer doesn't handle by default. This special FQDN supports - /// CORS, allowing the Azure Portal to function properly. - /// - [JsonProperty(PropertyName = "properties.azurePortalFQDN")] - public string AzurePortalFQDN { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.azurePortalFQDN")] + public string AzurePortalFqdn {get; private set; } /// /// Gets or sets the agent pool properties. /// - [JsonProperty(PropertyName = "properties.agentPoolProfiles")] - public IList AgentPoolProfiles { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.agentPoolProfiles")] + public System.Collections.Generic.IList AgentPoolProfiles {get; set; } /// /// Gets or sets the profile for Linux VMs in the Managed Cluster. /// - [JsonProperty(PropertyName = "properties.linuxProfile")] - public ContainerServiceLinuxProfile LinuxProfile { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.linuxProfile")] + public ContainerServiceLinuxProfile LinuxProfile {get; set; } /// /// Gets or sets the profile for Windows VMs in the Managed Cluster. /// - [JsonProperty(PropertyName = "properties.windowsProfile")] - public ManagedClusterWindowsProfile WindowsProfile { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.windowsProfile")] + public ManagedClusterWindowsProfile WindowsProfile {get; set; } /// - /// Gets or sets information about a service principal identity for the - /// cluster to use for manipulating Azure APIs. + /// Gets or sets information about a service principal identity for the cluster + /// to use for manipulating Azure APIs. /// - [JsonProperty(PropertyName = "properties.servicePrincipalProfile")] - public ManagedClusterServicePrincipalProfile ServicePrincipalProfile { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.servicePrincipalProfile")] + public ManagedClusterServicePrincipalProfile ServicePrincipalProfile {get; set; } /// /// Gets or sets the profile of managed cluster add-on. /// - [JsonProperty(PropertyName = "properties.addonProfiles")] - public IDictionary AddonProfiles { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.addonProfiles")] + public System.Collections.Generic.IDictionary AddonProfiles {get; set; } /// - /// Gets or sets the pod identity profile of the Managed Cluster. - /// - /// - /// See [use AAD pod + /// Gets or sets see [use AAD pod /// identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity) /// for more details on AAD pod identity integration. - /// - [JsonProperty(PropertyName = "properties.podIdentityProfile")] - public ManagedClusterPodIdentityProfile PodIdentityProfile { get; set; } + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.podIdentityProfile")] + public ManagedClusterPodIdentityProfile PodIdentityProfile {get; set; } /// /// Gets or sets the OIDC issuer profile of the Managed Cluster. /// - [JsonProperty(PropertyName = "properties.oidcIssuerProfile")] - public ManagedClusterOIDCIssuerProfile OidcIssuerProfile { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.oidcIssuerProfile")] + public ManagedClusterOidcIssuerProfile OidcIssuerProfile {get; set; } /// - /// Gets or sets the name of the resource group containing agent pool - /// nodes. + /// Gets or sets the name of the resource group containing agent pool nodes. /// - [JsonProperty(PropertyName = "properties.nodeResourceGroup")] - public string NodeResourceGroup { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.nodeResourceGroup")] + public string NodeResourceGroup {get; set; } /// - /// Gets or sets whether to enable Kubernetes Role-Based Access - /// Control. + /// Gets or sets whether to enable Kubernetes Role-Based Access Control. /// - [JsonProperty(PropertyName = "properties.enableRBAC")] - public bool? EnableRBAC { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.enableRBAC")] + public bool? EnableRbac {get; set; } /// - /// Gets or sets the support plan for the Managed Cluster. If - /// unspecified, the default is 'KubernetesOfficial'. Possible values - /// include: 'KubernetesOfficial', 'AKSLongTermSupport' + /// Gets or sets the support plan for the Managed Cluster. If unspecified, the + /// default is 'KubernetesOfficial'. Possible values include: 'KubernetesOfficial', 'AKSLongTermSupport' /// - [JsonProperty(PropertyName = "properties.supportPlan")] - public string SupportPlan { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.supportPlan")] + public string SupportPlan {get; set; } /// - /// Gets or sets (DEPRECATED) Whether to enable Kubernetes pod security - /// policy (preview). PodSecurityPolicy was deprecated in Kubernetes - /// v1.21, and removed from Kubernetes in v1.25. Learn more at - /// https://aka.ms/k8s/psp and https://aka.ms/aks/psp. + /// Gets or sets (DEPRECATED) Whether to enable Kubernetes pod security policy + /// (preview). PodSecurityPolicy was deprecated in Kubernetes v1.21, and + /// removed from Kubernetes in v1.25. Learn more at https://aka.ms/k8s/psp and + /// https://aka.ms/aks/psp. /// - [JsonProperty(PropertyName = "properties.enablePodSecurityPolicy")] - public bool? EnablePodSecurityPolicy { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.enablePodSecurityPolicy")] + public bool? EnablePodSecurityPolicy {get; set; } /// /// Gets or sets the network configuration profile. /// - [JsonProperty(PropertyName = "properties.networkProfile")] - public ContainerServiceNetworkProfile NetworkProfile { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.networkProfile")] + public ContainerServiceNetworkProfile NetworkProfile {get; set; } /// /// Gets or sets the Azure Active Directory configuration. /// - [JsonProperty(PropertyName = "properties.aadProfile")] - public ManagedClusterAADProfile AadProfile { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.aadProfile")] + public ManagedClusterAADProfile AadProfile {get; set; } /// /// Gets or sets the auto upgrade configuration. /// - [JsonProperty(PropertyName = "properties.autoUpgradeProfile")] - public ManagedClusterAutoUpgradeProfile AutoUpgradeProfile { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.autoUpgradeProfile")] + public ManagedClusterAutoUpgradeProfile AutoUpgradeProfile {get; set; } /// - /// Gets or sets parameters to be applied to the cluster-autoscaler - /// when enabled + /// Gets or sets parameters to be applied to the cluster-autoscaler when + /// enabled /// - [JsonProperty(PropertyName = "properties.autoScalerProfile")] - public ManagedClusterPropertiesAutoScalerProfile AutoScalerProfile { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.autoScalerProfile")] + public ManagedClusterPropertiesAutoScalerProfile AutoScalerProfile {get; set; } /// /// Gets or sets the access profile for managed cluster API server. /// - [JsonProperty(PropertyName = "properties.apiServerAccessProfile")] - public ManagedClusterAPIServerAccessProfile ApiServerAccessProfile { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.apiServerAccessProfile")] + public ManagedClusterAPIServerAccessProfile ApiServerAccessProfile {get; set; } /// - /// Gets or sets the Resource ID of the disk encryption set to use for - /// enabling encryption at rest. + /// Gets or sets this is of the form: + /// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{encryptionSetName}' /// - /// - /// This is of the form: - /// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{encryptionSetName}' - /// - [JsonProperty(PropertyName = "properties.diskEncryptionSetID")] - public string DiskEncryptionSetID { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.diskEncryptionSetID")] + public string DiskEncryptionSetId {get; set; } /// /// Gets or sets identities associated with the cluster. /// - [JsonProperty(PropertyName = "properties.identityProfile")] - public IDictionary IdentityProfile { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.identityProfile")] + public System.Collections.Generic.IDictionary IdentityProfile {get; set; } /// /// Gets or sets private link resources associated with the cluster. /// - [JsonProperty(PropertyName = "properties.privateLinkResources")] - public IList PrivateLinkResources { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.privateLinkResources")] + public System.Collections.Generic.IList PrivateLinkResources {get; set; } /// - /// Gets or sets if local accounts should be disabled on the Managed - /// Cluster. - /// - /// - /// If set to true, getting static credentials will be disabled for - /// this cluster. This must only be used on Managed Clusters that are - /// AAD enabled. For more details see [disable local + /// Gets or sets if set to true, getting static credentials will be disabled + /// for this cluster. This must only be used on Managed Clusters that are AAD + /// enabled. For more details see [disable local /// accounts](https://docs.microsoft.com/azure/aks/managed-aad#disable-local-accounts-preview). - /// - [JsonProperty(PropertyName = "properties.disableLocalAccounts")] - public bool? DisableLocalAccounts { get; set; } + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.disableLocalAccounts")] + public bool? DisableLocalAccounts {get; set; } /// - /// Gets or sets configurations for provisioning the cluster with HTTP - /// proxy servers. + /// Gets or sets configurations for provisioning the cluster with HTTP proxy + /// servers. /// - [JsonProperty(PropertyName = "properties.httpProxyConfig")] - public ManagedClusterHTTPProxyConfig HttpProxyConfig { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.httpProxyConfig")] + public ManagedClusterHttpProxyConfig HttpProxyConfig {get; set; } /// /// Gets or sets security profile for the managed cluster. /// - [JsonProperty(PropertyName = "properties.securityProfile")] - public ManagedClusterSecurityProfile SecurityProfile { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.securityProfile")] + public ManagedClusterSecurityProfile SecurityProfile {get; set; } /// /// Gets or sets storage profile for the managed cluster. /// - [JsonProperty(PropertyName = "properties.storageProfile")] - public ManagedClusterStorageProfile StorageProfile { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.storageProfile")] + public ManagedClusterStorageProfile StorageProfile {get; set; } /// - /// Gets or sets publicNetworkAccess of the managedCluster + /// Gets or sets allow or deny public network access for AKS Possible values include: 'Enabled', 'Disabled' /// - /// - /// Allow or deny public network access for AKS. Possible values - /// include: 'Enabled', 'Disabled' - /// - [JsonProperty(PropertyName = "properties.publicNetworkAccess")] - public string PublicNetworkAccess { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.publicNetworkAccess")] + public string PublicNetworkAccess {get; set; } /// + /// Gets or sets workload Auto-scaler profile for the managed cluster. /// - [JsonProperty(PropertyName = "properties.workloadAutoScalerProfile")] - public ManagedClusterWorkloadAutoScalerProfile WorkloadAutoScalerProfile { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.workloadAutoScalerProfile")] + public ManagedClusterWorkloadAutoScalerProfile WorkloadAutoScalerProfile {get; set; } /// + /// Gets or sets azure Monitor addon profiles for monitoring the managed + /// cluster. /// - [JsonProperty(PropertyName = "properties.azureMonitorProfile")] - public ManagedClusterAzureMonitorProfile AzureMonitorProfile { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.azureMonitorProfile")] + public ManagedClusterAzureMonitorProfile AzureMonitorProfile {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public override void Validate() { base.Validate(); - if (AgentPoolProfiles != null) + + + + + + + + + + + + + if (this.AgentPoolProfiles != null) { - foreach (var element in AgentPoolProfiles) + foreach (var element in this.AgentPoolProfiles) { if (element != null) { @@ -488,21 +538,21 @@ public override void Validate() } } } - if (LinuxProfile != null) + if (this.LinuxProfile != null) { - LinuxProfile.Validate(); + this.LinuxProfile.Validate(); } - if (WindowsProfile != null) + if (this.WindowsProfile != null) { - WindowsProfile.Validate(); + this.WindowsProfile.Validate(); } - if (ServicePrincipalProfile != null) + if (this.ServicePrincipalProfile != null) { - ServicePrincipalProfile.Validate(); + this.ServicePrincipalProfile.Validate(); } - if (AddonProfiles != null) + if (this.AddonProfiles != null) { - foreach (var valueElement in AddonProfiles.Values) + foreach (var valueElement in this.AddonProfiles.Values) { if (valueElement != null) { @@ -510,18 +560,33 @@ public override void Validate() } } } - if (NetworkProfile != null) + + + + + if (this.NetworkProfile != null) { - NetworkProfile.Validate(); + this.NetworkProfile.Validate(); } - if (WorkloadAutoScalerProfile != null) + + + + + + + + + + + + if (this.WorkloadAutoScalerProfile != null) { - WorkloadAutoScalerProfile.Validate(); + this.WorkloadAutoScalerProfile.Validate(); } - if (AzureMonitorProfile != null) + if (this.AzureMonitorProfile != null) { - AzureMonitorProfile.Validate(); + this.AzureMonitorProfile.Validate(); } } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterAADProfile.cs b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterAADProfile.cs index c43634119a16..2db209ce406c 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterAADProfile.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterAADProfile.cs @@ -1,22 +1,15 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// - /// AADProfile specifies attributes for Azure Active Directory integration. + /// For more details see [managed AAD on + /// AKS](https://docs.microsoft.com/azure/aks/managed-aad). /// /// /// For more details see [managed AAD on @@ -35,30 +28,41 @@ public ManagedClusterAADProfile() /// /// Initializes a new instance of the ManagedClusterAADProfile class. /// - /// Whether to enable managed AAD. - /// Whether to enable Azure RBAC for - /// Kubernetes authorization. - /// The list of AAD group object IDs - /// that will have admin role of the cluster. - /// (DEPRECATED) The client AAD application - /// ID. Learn more at https://aka.ms/aks/aad-legacy. - /// (DEPRECATED) The server AAD application - /// ID. Learn more at https://aka.ms/aks/aad-legacy. - /// (DEPRECATED) The server AAD - /// application secret. Learn more at - /// https://aka.ms/aks/aad-legacy. - /// The AAD tenant ID to use for authentication. - /// If not specified, will use the tenant of the deployment - /// subscription. - public ManagedClusterAADProfile(bool? managed = default(bool?), bool? enableAzureRBAC = default(bool?), IList adminGroupObjectIDs = default(IList), string clientAppID = default(string), string serverAppID = default(string), string serverAppSecret = default(string), string tenantID = default(string)) + + /// Whether to enable managed AAD. + /// + + /// Whether to enable Azure RBAC for Kubernetes authorization. + /// + + /// The list of AAD group object IDs that will have admin role of the cluster. + /// + + /// (DEPRECATED) The client AAD application ID. Learn more at + /// https://aka.ms/aks/aad-legacy. + /// + + /// (DEPRECATED) The server AAD application ID. Learn more at + /// https://aka.ms/aks/aad-legacy. + /// + + /// (DEPRECATED) The server AAD application secret. Learn more at + /// https://aka.ms/aks/aad-legacy. + /// + + /// The AAD tenant ID to use for authentication. If not specified, will use the + /// tenant of the deployment subscription. + /// + public ManagedClusterAADProfile(bool? managed = default(bool?), bool? enableAzureRbac = default(bool?), System.Collections.Generic.IList adminGroupObjectIDs = default(System.Collections.Generic.IList), string clientAppId = default(string), string serverAppId = default(string), string serverAppSecret = default(string), string tenantId = default(string)) + { - Managed = managed; - EnableAzureRBAC = enableAzureRBAC; - AdminGroupObjectIDs = adminGroupObjectIDs; - ClientAppID = clientAppID; - ServerAppID = serverAppID; - ServerAppSecret = serverAppSecret; - TenantID = tenantID; + this.Managed = managed; + this.EnableAzureRbac = enableAzureRbac; + this.AdminGroupObjectIDs = adminGroupObjectIDs; + this.ClientAppId = clientAppId; + this.ServerAppId = serverAppId; + this.ServerAppSecret = serverAppSecret; + this.TenantId = tenantId; CustomInit(); } @@ -67,53 +71,52 @@ public ManagedClusterAADProfile() /// partial void CustomInit(); + /// /// Gets or sets whether to enable managed AAD. /// - [JsonProperty(PropertyName = "managed")] - public bool? Managed { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "managed")] + public bool? Managed {get; set; } /// - /// Gets or sets whether to enable Azure RBAC for Kubernetes - /// authorization. + /// Gets or sets whether to enable Azure RBAC for Kubernetes authorization. /// - [JsonProperty(PropertyName = "enableAzureRBAC")] - public bool? EnableAzureRBAC { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "enableAzureRBAC")] + public bool? EnableAzureRbac {get; set; } /// - /// Gets or sets the list of AAD group object IDs that will have admin - /// role of the cluster. + /// Gets or sets the list of AAD group object IDs that will have admin role of + /// the cluster. /// - [JsonProperty(PropertyName = "adminGroupObjectIDs")] - public IList AdminGroupObjectIDs { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "adminGroupObjectIDs")] + public System.Collections.Generic.IList AdminGroupObjectIDs {get; set; } /// - /// Gets or sets (DEPRECATED) The client AAD application ID. Learn more - /// at https://aka.ms/aks/aad-legacy. + /// Gets or sets (DEPRECATED) The client AAD application ID. Learn more at + /// https://aka.ms/aks/aad-legacy. /// - [JsonProperty(PropertyName = "clientAppID")] - public string ClientAppID { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "clientAppID")] + public string ClientAppId {get; set; } /// - /// Gets or sets (DEPRECATED) The server AAD application ID. Learn more - /// at https://aka.ms/aks/aad-legacy. + /// Gets or sets (DEPRECATED) The server AAD application ID. Learn more at + /// https://aka.ms/aks/aad-legacy. /// - [JsonProperty(PropertyName = "serverAppID")] - public string ServerAppID { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "serverAppID")] + public string ServerAppId {get; set; } /// - /// Gets or sets (DEPRECATED) The server AAD application secret. Learn - /// more at https://aka.ms/aks/aad-legacy. + /// Gets or sets (DEPRECATED) The server AAD application secret. Learn more at + /// https://aka.ms/aks/aad-legacy. /// - [JsonProperty(PropertyName = "serverAppSecret")] - public string ServerAppSecret { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "serverAppSecret")] + public string ServerAppSecret {get; set; } /// - /// Gets or sets the AAD tenant ID to use for authentication. If not - /// specified, will use the tenant of the deployment subscription. + /// Gets or sets the AAD tenant ID to use for authentication. If not specified, + /// will use the tenant of the deployment subscription. /// - [JsonProperty(PropertyName = "tenantID")] - public string TenantID { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "tenantID")] + public string TenantId {get; set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterAPIServerAccessProfile.cs b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterAPIServerAccessProfile.cs index 3051fdc5656a..f33a3d8bf5ce 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterAPIServerAccessProfile.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterAPIServerAccessProfile.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -21,8 +13,7 @@ namespace Microsoft.Azure.Management.ContainerService.Models public partial class ManagedClusterAPIServerAccessProfile { /// - /// Initializes a new instance of the - /// ManagedClusterAPIServerAccessProfile class. + /// Initializes a new instance of the ManagedClusterAPIServerAccessProfile class. /// public ManagedClusterAPIServerAccessProfile() { @@ -30,26 +21,38 @@ public ManagedClusterAPIServerAccessProfile() } /// - /// Initializes a new instance of the - /// ManagedClusterAPIServerAccessProfile class. + /// Initializes a new instance of the ManagedClusterAPIServerAccessProfile class. /// - /// The IP ranges authorized to access - /// the Kubernetes API server. - /// Whether to create the cluster as - /// a private cluster or not. - /// The private DNS zone mode for the - /// cluster. - /// Whether to create - /// additional public FQDN for private cluster or not. - /// Whether to disable run command for - /// the cluster or not. - public ManagedClusterAPIServerAccessProfile(IList authorizedIPRanges = default(IList), bool? enablePrivateCluster = default(bool?), string privateDNSZone = default(string), bool? enablePrivateClusterPublicFQDN = default(bool?), bool? disableRunCommand = default(bool?)) + + /// IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. This + /// feature is not compatible with clusters that use Public IP Per Node, or + /// clusters that are using a Basic Load Balancer. For more information see + /// [API server authorized IP + /// ranges](https://docs.microsoft.com/azure/aks/api-server-authorized-ip-ranges). + /// + + /// For more details, see [Creating a private AKS + /// cluster](https://docs.microsoft.com/azure/aks/private-clusters). + /// + + /// The default is System. For more details see [configure private DNS + /// zone](https://docs.microsoft.com/azure/aks/private-clusters#configure-private-dns-zone). + /// Allowed values are 'system' and 'none'. + /// + + /// Whether to create additional public FQDN for private cluster or not. + /// + + /// Whether to disable run command for the cluster or not. + /// + public ManagedClusterAPIServerAccessProfile(System.Collections.Generic.IList authorizedIPRanges = default(System.Collections.Generic.IList), bool? enablePrivateCluster = default(bool?), string privateDnsZone = default(string), bool? enablePrivateClusterPublicFqdn = default(bool?), bool? disableRunCommand = default(bool?)) + { - AuthorizedIPRanges = authorizedIPRanges; - EnablePrivateCluster = enablePrivateCluster; - PrivateDNSZone = privateDNSZone; - EnablePrivateClusterPublicFQDN = enablePrivateClusterPublicFQDN; - DisableRunCommand = disableRunCommand; + this.AuthorizedIPRanges = authorizedIPRanges; + this.EnablePrivateCluster = enablePrivateCluster; + this.PrivateDnsZone = privateDnsZone; + this.EnablePrivateClusterPublicFqdn = enablePrivateClusterPublicFqdn; + this.DisableRunCommand = disableRunCommand; CustomInit(); } @@ -58,54 +61,44 @@ public ManagedClusterAPIServerAccessProfile() /// partial void CustomInit(); + /// - /// Gets or sets the IP ranges authorized to access the Kubernetes API - /// server. - /// - /// - /// IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. - /// This feature is not compatible with clusters that use Public IP Per - /// Node, or clusters that are using a Basic Load Balancer. For more - /// information see [API server authorized IP + /// Gets or sets iP ranges are specified in CIDR format, e.g. + /// 137.117.106.88/29. This feature is not compatible with clusters that use + /// Public IP Per Node, or clusters that are using a Basic Load Balancer. For + /// more information see [API server authorized IP /// ranges](https://docs.microsoft.com/azure/aks/api-server-authorized-ip-ranges). - /// - [JsonProperty(PropertyName = "authorizedIPRanges")] - public IList AuthorizedIPRanges { get; set; } + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "authorizedIPRanges")] + public System.Collections.Generic.IList AuthorizedIPRanges {get; set; } /// - /// Gets or sets whether to create the cluster as a private cluster or - /// not. - /// - /// - /// For more details, see [Creating a private AKS + /// Gets or sets for more details, see [Creating a private AKS /// cluster](https://docs.microsoft.com/azure/aks/private-clusters). - /// - [JsonProperty(PropertyName = "enablePrivateCluster")] - public bool? EnablePrivateCluster { get; set; } + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "enablePrivateCluster")] + public bool? EnablePrivateCluster {get; set; } /// - /// Gets or sets the private DNS zone mode for the cluster. - /// - /// - /// The default is System. For more details see [configure private DNS + /// Gets or sets the default is System. For more details see [configure private + /// DNS /// zone](https://docs.microsoft.com/azure/aks/private-clusters#configure-private-dns-zone). - /// Allowed values are 'system' and 'none'. - /// - [JsonProperty(PropertyName = "privateDNSZone")] - public string PrivateDNSZone { get; set; } + /// Allowed values are 'system' and 'none'. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "privateDNSZone")] + public string PrivateDnsZone {get; set; } /// - /// Gets or sets whether to create additional public FQDN for private - /// cluster or not. + /// Gets or sets whether to create additional public FQDN for private cluster + /// or not. /// - [JsonProperty(PropertyName = "enablePrivateClusterPublicFQDN")] - public bool? EnablePrivateClusterPublicFQDN { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "enablePrivateClusterPublicFQDN")] + public bool? EnablePrivateClusterPublicFqdn {get; set; } /// /// Gets or sets whether to disable run command for the cluster or not. /// - [JsonProperty(PropertyName = "disableRunCommand")] - public bool? DisableRunCommand { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "disableRunCommand")] + public bool? DisableRunCommand {get; set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterAccessProfile.cs b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterAccessProfile.cs index acf1e2573f93..a49dcb766815 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterAccessProfile.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterAccessProfile.cs @@ -1,31 +1,20 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// /// Managed cluster Access Profile. /// - [Rest.Serialization.JsonTransformation] + [Microsoft.Rest.Serialization.JsonTransformation] public partial class ManagedClusterAccessProfile : TrackedResource { /// - /// Initializes a new instance of the ManagedClusterAccessProfile - /// class. + /// Initializes a new instance of the ManagedClusterAccessProfile class. /// public ManagedClusterAccessProfile() { @@ -33,26 +22,37 @@ public ManagedClusterAccessProfile() } /// - /// Initializes a new instance of the ManagedClusterAccessProfile - /// class. + /// Initializes a new instance of the ManagedClusterAccessProfile class. /// - /// The geo-location where the resource - /// lives + /// Fully qualified resource ID for the resource. Ex - - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - /// The name of the resource - /// The type of the resource. E.g. - /// "Microsoft.Compute/virtualMachines" or - /// "Microsoft.Storage/storageAccounts" - /// Azure Resource Manager metadata containing - /// createdBy and modifiedBy information. - /// Resource tags. - /// Base64-encoded Kubernetes configuration - /// file. - public ManagedClusterAccessProfile(string location, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), IDictionary tags = default(IDictionary), byte[] kubeConfig = default(byte[])) - : base(location, id, name, type, systemData, tags) + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// + + /// The name of the resource + /// + + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" + /// + + /// Azure Resource Manager metadata containing createdBy and modifiedBy + /// information. + /// + + /// Resource tags. + /// + + /// The geo-location where the resource lives + /// + + /// Base64-encoded Kubernetes configuration file. + /// + public ManagedClusterAccessProfile(string location, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), byte[] kubeConfig = default(byte[])) + + : base(location, id, name, type, systemData, tags) { - KubeConfig = kubeConfig; + this.KubeConfig = kubeConfig; CustomInit(); } @@ -61,21 +61,22 @@ public ManagedClusterAccessProfile() /// partial void CustomInit(); + /// /// Gets or sets base64-encoded Kubernetes configuration file. /// - [JsonProperty(PropertyName = "properties.kubeConfig")] - public byte[] KubeConfig { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.kubeConfig")] + public byte[] KubeConfig {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public override void Validate() { base.Validate(); + } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterAddonProfile.cs b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterAddonProfile.cs index 0ebd1fa13421..d0315bf32b61 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterAddonProfile.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterAddonProfile.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,16 +23,21 @@ public ManagedClusterAddonProfile() /// /// Initializes a new instance of the ManagedClusterAddonProfile class. /// - /// Whether the add-on is enabled or not. - /// Key-value pairs for configuring an - /// add-on. - /// Information of user assigned identity used - /// by this add-on. - public ManagedClusterAddonProfile(bool enabled, IDictionary config = default(IDictionary), ManagedClusterAddonProfileIdentity identity = default(ManagedClusterAddonProfileIdentity)) + + /// Whether the add-on is enabled or not. + /// + + /// Key-value pairs for configuring an add-on. + /// + + /// Information of user assigned identity used by this add-on. + /// + public ManagedClusterAddonProfile(bool enabled, System.Collections.Generic.IDictionary config = default(System.Collections.Generic.IDictionary), ManagedClusterAddonProfileIdentity identity = default(ManagedClusterAddonProfileIdentity)) + { - Enabled = enabled; - Config = config; - Identity = identity; + this.Enabled = enabled; + this.Config = config; + this.Identity = identity; CustomInit(); } @@ -49,32 +46,34 @@ public ManagedClusterAddonProfile() /// partial void CustomInit(); + /// /// Gets or sets whether the add-on is enabled or not. /// - [JsonProperty(PropertyName = "enabled")] - public bool Enabled { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "enabled")] + public bool Enabled {get; set; } /// /// Gets or sets key-value pairs for configuring an add-on. /// - [JsonProperty(PropertyName = "config")] - public IDictionary Config { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "config")] + public System.Collections.Generic.IDictionary Config {get; set; } /// /// Gets information of user assigned identity used by this add-on. /// - [JsonProperty(PropertyName = "identity")] - public ManagedClusterAddonProfileIdentity Identity { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "identity")] + public ManagedClusterAddonProfileIdentity Identity {get; private set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { + + } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterAddonProfileIdentity.cs b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterAddonProfileIdentity.cs index 6f3b06410077..f60cb388a8f9 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterAddonProfileIdentity.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterAddonProfileIdentity.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { @@ -18,8 +13,7 @@ namespace Microsoft.Azure.Management.ContainerService.Models public partial class ManagedClusterAddonProfileIdentity : UserAssignedIdentity { /// - /// Initializes a new instance of the - /// ManagedClusterAddonProfileIdentity class. + /// Initializes a new instance of the ManagedClusterAddonProfileIdentity class. /// public ManagedClusterAddonProfileIdentity() { @@ -27,17 +21,20 @@ public ManagedClusterAddonProfileIdentity() } /// - /// Initializes a new instance of the - /// ManagedClusterAddonProfileIdentity class. + /// Initializes a new instance of the ManagedClusterAddonProfileIdentity class. /// - /// The resource ID of the user assigned - /// identity. - /// The client ID of the user assigned - /// identity. - /// The object ID of the user assigned - /// identity. + + /// The resource ID of the user assigned identity. + /// + + /// The client ID of the user assigned identity. + /// + + /// The object ID of the user assigned identity. + /// public ManagedClusterAddonProfileIdentity(string resourceId = default(string), string clientId = default(string), string objectId = default(string)) - : base(resourceId, clientId, objectId) + + : base(resourceId, clientId, objectId) { CustomInit(); } @@ -48,4 +45,4 @@ public ManagedClusterAddonProfileIdentity() partial void CustomInit(); } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterAgentPoolProfile.cs b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterAgentPoolProfile.cs index eeddf0bc08a3..f9eda839a35b 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterAgentPoolProfile.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterAgentPoolProfile.cs @@ -1,19 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -22,8 +13,7 @@ namespace Microsoft.Azure.Management.ContainerService.Models public partial class ManagedClusterAgentPoolProfile : ManagedClusterAgentPoolProfileProperties { /// - /// Initializes a new instance of the ManagedClusterAgentPoolProfile - /// class. + /// Initializes a new instance of the ManagedClusterAgentPoolProfile class. /// public ManagedClusterAgentPoolProfile() { @@ -31,100 +21,201 @@ public ManagedClusterAgentPoolProfile() } /// - /// Initializes a new instance of the ManagedClusterAgentPoolProfile - /// class. + /// Initializes a new instance of the ManagedClusterAgentPoolProfile class. /// - /// Unique name of the agent pool profile in the - /// context of the subscription and resource group. - /// Number of agents (VMs) to host docker - /// containers. Allowed values must be in the range of 0 to 1000 - /// (inclusive) for user pools and in the range of 1 to 1000 - /// (inclusive) for system pools. The default value is 1. - /// The size of the agent pool VMs. - /// Possible values include: 'Managed', - /// 'Ephemeral' - /// Possible values include: 'OS', - /// 'Temporary' - /// Possible values include: - /// 'OCIContainer', 'WasmWasi' - /// The ID of the subnet which agent pool - /// nodes and optionally pods will join on startup. - /// The ID of the subnet which pods will join - /// when launched. - /// The maximum number of pods that can run on a - /// node. - /// Possible values include: 'Linux', - /// 'Windows' - /// Possible values include: 'Ubuntu', - /// 'AzureLinux', 'CBLMariner', 'Windows2019', 'Windows2022' - /// The maximum number of nodes for - /// auto-scaling - /// The minimum number of nodes for - /// auto-scaling - /// Whether to enable - /// auto-scaler - /// The scale down mode to use when scaling - /// the Agent Pool. - /// Possible values include: - /// 'VirtualMachineScaleSets', 'AvailabilitySet' - /// Possible values include: 'System', - /// 'User' - /// The version of Kubernetes - /// specified by the user. - /// The version of Kubernetes - /// the Agent Pool is running. - /// The version of node image - /// Settings for upgrading the - /// agentpool - /// The current deployment or - /// provisioning state. - /// Whether the Agent Pool is running or - /// stopped. - /// The list of Availability zones to - /// use for nodes. This can only be specified if the AgentPoolType - /// property is 'VirtualMachineScaleSets'. - /// Whether each node is allocated its - /// own public IP. - /// The public IP prefix ID which VM - /// nodes should use IPs from. - /// The Virtual Machine Scale Set - /// priority. If not specified, the default is 'Regular'. Possible - /// values include: 'Spot', 'Regular' - /// The Virtual Machine Scale Set - /// eviction policy to use. - /// The max price (in US Dollars) you are - /// willing to pay for spot instances. Possible values are any decimal - /// value greater than zero or -1 which indicates default price to be - /// up-to on-demand. - /// The tags to be persisted on the agent pool - /// virtual machine scale set. - /// The node labels to be persisted across all - /// nodes in agent pool. - /// The taints added to new nodes during node - /// pool create and scale. For example, key=value:NoSchedule. - /// The ID for Proximity - /// Placement Group. - /// The Kubelet configuration on the agent - /// pool nodes. - /// The OS configuration of Linux agent - /// nodes. - /// Whether to enable host based - /// OS and data drive encryption. - /// Whether to enable UltraSSD - /// Whether to use a FIPS-enabled OS. - /// GPUInstanceProfile to be used to - /// specify GPU MIG instance profile for supported GPU VM SKU. Possible - /// values include: 'MIG1g', 'MIG2g', 'MIG3g', 'MIG4g', 'MIG7g' - /// CreationData to be used to specify the - /// source Snapshot ID if the node pool will be created/upgraded using - /// a snapshot. - /// The fully qualified resource ID of the - /// Dedicated Host Group to provision virtual machines from, used only - /// in creation scenario and not allowed to changed once set. - public ManagedClusterAgentPoolProfile(string name, int? count = default(int?), string vmSize = default(string), int? osDiskSizeGB = default(int?), string osDiskType = default(string), string kubeletDiskType = default(string), string workloadRuntime = default(string), string vnetSubnetID = default(string), string podSubnetID = default(string), int? maxPods = default(int?), string osType = default(string), string osSKU = default(string), int? maxCount = default(int?), int? minCount = default(int?), bool? enableAutoScaling = default(bool?), string scaleDownMode = default(string), string type = default(string), string mode = default(string), string orchestratorVersion = default(string), string currentOrchestratorVersion = default(string), string nodeImageVersion = default(string), AgentPoolUpgradeSettings upgradeSettings = default(AgentPoolUpgradeSettings), string provisioningState = default(string), PowerState powerState = default(PowerState), IList availabilityZones = default(IList), bool? enableNodePublicIP = default(bool?), string nodePublicIPPrefixID = default(string), string scaleSetPriority = default(string), string scaleSetEvictionPolicy = default(string), double? spotMaxPrice = default(double?), IDictionary tags = default(IDictionary), IDictionary nodeLabels = default(IDictionary), IList nodeTaints = default(IList), string proximityPlacementGroupID = default(string), KubeletConfig kubeletConfig = default(KubeletConfig), LinuxOSConfig linuxOSConfig = default(LinuxOSConfig), bool? enableEncryptionAtHost = default(bool?), bool? enableUltraSSD = default(bool?), bool? enableFIPS = default(bool?), string gpuInstanceProfile = default(string), CreationData creationData = default(CreationData), string hostGroupID = default(string)) - : base(count, vmSize, osDiskSizeGB, osDiskType, kubeletDiskType, workloadRuntime, vnetSubnetID, podSubnetID, maxPods, osType, osSKU, maxCount, minCount, enableAutoScaling, scaleDownMode, type, mode, orchestratorVersion, currentOrchestratorVersion, nodeImageVersion, upgradeSettings, provisioningState, powerState, availabilityZones, enableNodePublicIP, nodePublicIPPrefixID, scaleSetPriority, scaleSetEvictionPolicy, spotMaxPrice, tags, nodeLabels, nodeTaints, proximityPlacementGroupID, kubeletConfig, linuxOSConfig, enableEncryptionAtHost, enableUltraSSD, enableFIPS, gpuInstanceProfile, creationData, hostGroupID) + + /// Number of agents (VMs) to host docker containers. Allowed values must be in + /// the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to + /// 1000 (inclusive) for system pools. The default value is 1. + /// + + /// VM size availability varies by region. If a node contains insufficient + /// compute resources (memory, cpu, etc) pods might fail to run correctly. For + /// more details on restricted VM sizes, see: + /// https://docs.microsoft.com/azure/aks/quotas-skus-regions + /// + + /// OS Disk Size in GB to be used to specify the disk size for every machine in + /// the master/agent pool. If you specify 0, it will apply the default osDisk + /// size according to the vmSize specified. + /// + + /// The default is 'Ephemeral' if the VM supports it and has a cache disk + /// larger than the requested OSDiskSizeGB. Otherwise, defaults to 'Managed'. + /// May not be changed after creation. For more information see [Ephemeral + /// OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os). + /// Possible values include: 'Managed', 'Ephemeral' + + /// Determines the placement of emptyDir volumes, container runtime data root, + /// and Kubelet ephemeral storage. + /// Possible values include: 'OS', 'Temporary' + + /// Determines the type of workload a node can run. + /// Possible values include: 'OCIContainer', 'WasmWasi' + + /// If this is not specified, a VNET and subnet will be generated and used. If + /// no podSubnetID is specified, this applies to nodes and pods, otherwise it + /// applies to just nodes. This is of the form: + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName} + /// + + /// If omitted, pod IPs are statically assigned on the node subnet (see + /// vnetSubnetID for more details). This is of the form: + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName} + /// + + /// The maximum number of pods that can run on a node. + /// + + /// The operating system type. The default is Linux. + /// Possible values include: 'Linux', 'Windows' + + /// Specifies the OS SKU used by the agent pool. The default is Ubuntu if + /// OSType is Linux. The default is Windows2019 when Kubernetes <= 1.24 or + /// Windows2022 when Kubernetes >= 1.25 if OSType is Windows. + /// Possible values include: 'Ubuntu', 'AzureLinux', 'CBLMariner', + /// 'Windows2019', 'Windows2022' + + /// The maximum number of nodes for auto-scaling + /// + + /// The minimum number of nodes for auto-scaling + /// + + /// Whether to enable auto-scaler + /// + + /// This also effects the cluster autoscaler behavior. If not specified, it + /// defaults to Delete. + /// Possible values include: 'Delete', 'Deallocate' + + /// The type of Agent Pool. + /// Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' + + /// A cluster must have at least one 'System' Agent Pool at all times. For + /// additional information on agent pool restrictions and best practices, see: + /// https://docs.microsoft.com/azure/aks/use-system-pools + /// Possible values include: 'System', 'User' + + /// Both patch version (major.minor.patch) (e.g. 1.20.13) and (major.minor) + /// (e.g. 1.20) are supported. When (major.minor) is specified, the latest + /// supported GA patch version is chosen automatically. Updating the cluster + /// with the same (major.minor) once it has been created (e.g. 1.14.x -) 1.14) + /// will not trigger an upgrade, even if a newer patch version is available. As + /// a best practice, you should upgrade all node pools in an AKS cluster to the + /// same Kubernetes version. The node pool version must have the same major + /// version as the control plane. The node pool minor version must be within + /// two minor versions of the control plane version. The node pool version + /// cannot be greater than the control plane version. For more information see + /// [upgrading a node + /// pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). + /// + + /// If orchestratorVersion is a fully specified version (major.minor.patch), + /// this field will be exactly equal to it. If orchestratorVersion is + /// (major.minor), this field will contain the full (major.minor.patch) version + /// being used. + /// + + /// The version of node image + /// + + /// Settings for upgrading the agentpool + /// + + /// The current deployment or provisioning state. + /// + + /// When an Agent Pool is first created it is initially Running. The Agent Pool + /// can be stopped by setting this field to Stopped. A stopped Agent Pool stops + /// all of its VMs and does not accrue billing charges. An Agent Pool can only + /// be stopped if it is Running and provisioning state is Succeeded + /// + + /// The list of Availability zones to use for nodes. This can only be specified + /// if the AgentPoolType property is 'VirtualMachineScaleSets'. + /// + + /// Some scenarios may require nodes in a node pool to receive their own + /// dedicated public IP addresses. A common scenario is for gaming workloads, + /// where a console needs to make a direct connection to a cloud virtual + /// machine to minimize hops. For more information see [assigning a public IP + /// per + /// node](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#assign-a-public-ip-per-node-for-your-node-pools). + /// The default is false. + /// + + /// This is of the form: + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName} + /// + + /// The Virtual Machine Scale Set priority. If not specified, the default is + /// 'Regular'. + /// Possible values include: 'Spot', 'Regular' + + /// This cannot be specified unless the scaleSetPriority is 'Spot'. If not + /// specified, the default is 'Delete'. + /// Possible values include: 'Delete', 'Deallocate' + + /// Possible values are any decimal value greater than zero or -1 which + /// indicates the willingness to pay any on-demand price. For more details on + /// spot pricing, see [spot VMs + /// pricing](https://docs.microsoft.com/azure/virtual-machines/spot-vms#pricing) + /// + + /// The tags to be persisted on the agent pool virtual machine scale set. + /// + + /// The node labels to be persisted across all nodes in agent pool. + /// + + /// The taints added to new nodes during node pool create and scale. For + /// example, key=value:NoSchedule. + /// + + /// The ID for Proximity Placement Group. + /// + + /// The Kubelet configuration on the agent pool nodes. + /// + + /// The OS configuration of Linux agent nodes. + /// + + /// This is only supported on certain VM sizes and in certain Azure regions. + /// For more information, see: + /// https://docs.microsoft.com/azure/aks/enable-host-encryption + /// + + /// Whether to enable UltraSSD + /// + + /// See [Add a FIPS-enabled node + /// pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#add-a-fips-enabled-node-pool-preview) + /// for more details. + /// + + /// GPUInstanceProfile to be used to specify GPU MIG instance profile for + /// supported GPU VM SKU. + /// Possible values include: 'MIG1g', 'MIG2g', 'MIG3g', 'MIG4g', 'MIG7g' + + /// CreationData to be used to specify the source Snapshot ID if the node pool + /// will be created/upgraded using a snapshot. + /// + + /// This is of the form: + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. + /// For more information see [Azure dedicated + /// hosts](https://docs.microsoft.com/azure/virtual-machines/dedicated-hosts). + /// + + /// Windows agent pool names must be 6 characters or less. + /// + public ManagedClusterAgentPoolProfile(string name, int? count = default(int?), string vmSize = default(string), int? osDiskSizeGb = default(int?), string osDiskType = default(string), string kubeletDiskType = default(string), string workloadRuntime = default(string), string vnetSubnetId = default(string), string podSubnetId = default(string), int? maxPods = default(int?), string osType = default(string), string osSku = default(string), int? maxCount = default(int?), int? minCount = default(int?), bool? enableAutoScaling = default(bool?), string scaleDownMode = default(string), string type = default(string), string mode = default(string), string orchestratorVersion = default(string), string currentOrchestratorVersion = default(string), string nodeImageVersion = default(string), AgentPoolUpgradeSettings upgradeSettings = default(AgentPoolUpgradeSettings), string provisioningState = default(string), PowerState powerState = default(PowerState), System.Collections.Generic.IList availabilityZones = default(System.Collections.Generic.IList), bool? enableNodePublicIP = default(bool?), string nodePublicIPPrefixId = default(string), string scaleSetPriority = default(string), string scaleSetEvictionPolicy = default(string), double? spotMaxPrice = default(double?), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), System.Collections.Generic.IDictionary nodeLabels = default(System.Collections.Generic.IDictionary), System.Collections.Generic.IList nodeTaints = default(System.Collections.Generic.IList), string proximityPlacementGroupId = default(string), KubeletConfig kubeletConfig = default(KubeletConfig), LinuxOSConfig linuxOSConfig = default(LinuxOSConfig), bool? enableEncryptionAtHost = default(bool?), bool? enableUltraSsd = default(bool?), bool? enableFips = default(bool?), string gpuInstanceProfile = default(string), CreationData creationData = default(CreationData), string hostGroupId = default(string)) + + : base(count, vmSize, osDiskSizeGb, osDiskType, kubeletDiskType, workloadRuntime, vnetSubnetId, podSubnetId, maxPods, osType, osSku, maxCount, minCount, enableAutoScaling, scaleDownMode, type, mode, orchestratorVersion, currentOrchestratorVersion, nodeImageVersion, upgradeSettings, provisioningState, powerState, availabilityZones, enableNodePublicIP, nodePublicIPPrefixId, scaleSetPriority, scaleSetEvictionPolicy, spotMaxPrice, tags, nodeLabels, nodeTaints, proximityPlacementGroupId, kubeletConfig, linuxOSConfig, enableEncryptionAtHost, enableUltraSsd, enableFips, gpuInstanceProfile, creationData, hostGroupId) { - Name = name; + this.Name = name; CustomInit(); } @@ -133,36 +224,32 @@ public ManagedClusterAgentPoolProfile() /// partial void CustomInit(); + /// - /// Gets or sets unique name of the agent pool profile in the context - /// of the subscription and resource group. + /// Gets or sets windows agent pool names must be 6 characters or less. /// - /// - /// Windows agent pool names must be 6 characters or less. - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public override void Validate() { base.Validate(); - if (Name == null) + if (this.Name == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "Name"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Name"); } - if (Name != null) + if (this.Name != null) { - if (!System.Text.RegularExpressions.Regex.IsMatch(Name, "^[a-z][a-z0-9]{0,11}$")) + if (!System.Text.RegularExpressions.Regex.IsMatch(this.Name, "^[a-z][a-z0-9]{0,11}$")) { - throw new ValidationException(ValidationRules.Pattern, "Name", "^[a-z][a-z0-9]{0,11}$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "Name", "^[a-z][a-z0-9]{0,11}$"); } } } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterAgentPoolProfileProperties.cs b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterAgentPoolProfileProperties.cs index 3e268867b734..edf75b716e51 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterAgentPoolProfileProperties.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterAgentPoolProfileProperties.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -21,8 +13,7 @@ namespace Microsoft.Azure.Management.ContainerService.Models public partial class ManagedClusterAgentPoolProfileProperties { /// - /// Initializes a new instance of the - /// ManagedClusterAgentPoolProfileProperties class. + /// Initializes a new instance of the ManagedClusterAgentPoolProfileProperties class. /// public ManagedClusterAgentPoolProfileProperties() { @@ -30,137 +21,237 @@ public ManagedClusterAgentPoolProfileProperties() } /// - /// Initializes a new instance of the - /// ManagedClusterAgentPoolProfileProperties class. - /// - /// Number of agents (VMs) to host docker - /// containers. Allowed values must be in the range of 0 to 1000 - /// (inclusive) for user pools and in the range of 1 to 1000 - /// (inclusive) for system pools. The default value is 1. - /// The size of the agent pool VMs. - /// Possible values include: 'Managed', - /// 'Ephemeral' - /// Possible values include: 'OS', - /// 'Temporary' - /// Possible values include: - /// 'OCIContainer', 'WasmWasi' - /// The ID of the subnet which agent pool - /// nodes and optionally pods will join on startup. - /// The ID of the subnet which pods will join - /// when launched. - /// The maximum number of pods that can run on a - /// node. - /// Possible values include: 'Linux', - /// 'Windows' - /// Possible values include: 'Ubuntu', - /// 'AzureLinux', 'CBLMariner', 'Windows2019', 'Windows2022' - /// The maximum number of nodes for - /// auto-scaling - /// The minimum number of nodes for - /// auto-scaling - /// Whether to enable - /// auto-scaler - /// The scale down mode to use when scaling - /// the Agent Pool. - /// Possible values include: - /// 'VirtualMachineScaleSets', 'AvailabilitySet' - /// Possible values include: 'System', - /// 'User' - /// The version of Kubernetes - /// specified by the user. - /// The version of Kubernetes - /// the Agent Pool is running. - /// The version of node image - /// Settings for upgrading the - /// agentpool - /// The current deployment or - /// provisioning state. - /// Whether the Agent Pool is running or - /// stopped. - /// The list of Availability zones to - /// use for nodes. This can only be specified if the AgentPoolType - /// property is 'VirtualMachineScaleSets'. - /// Whether each node is allocated its - /// own public IP. - /// The public IP prefix ID which VM - /// nodes should use IPs from. - /// The Virtual Machine Scale Set - /// priority. If not specified, the default is 'Regular'. Possible - /// values include: 'Spot', 'Regular' - /// The Virtual Machine Scale Set - /// eviction policy to use. - /// The max price (in US Dollars) you are - /// willing to pay for spot instances. Possible values are any decimal - /// value greater than zero or -1 which indicates default price to be - /// up-to on-demand. - /// The tags to be persisted on the agent pool - /// virtual machine scale set. - /// The node labels to be persisted across all - /// nodes in agent pool. - /// The taints added to new nodes during node - /// pool create and scale. For example, key=value:NoSchedule. - /// The ID for Proximity - /// Placement Group. - /// The Kubelet configuration on the agent - /// pool nodes. - /// The OS configuration of Linux agent - /// nodes. - /// Whether to enable host based - /// OS and data drive encryption. - /// Whether to enable UltraSSD - /// Whether to use a FIPS-enabled OS. - /// GPUInstanceProfile to be used to - /// specify GPU MIG instance profile for supported GPU VM SKU. Possible - /// values include: 'MIG1g', 'MIG2g', 'MIG3g', 'MIG4g', 'MIG7g' - /// CreationData to be used to specify the - /// source Snapshot ID if the node pool will be created/upgraded using - /// a snapshot. - /// The fully qualified resource ID of the - /// Dedicated Host Group to provision virtual machines from, used only - /// in creation scenario and not allowed to changed once set. - public ManagedClusterAgentPoolProfileProperties(int? count = default(int?), string vmSize = default(string), int? osDiskSizeGB = default(int?), string osDiskType = default(string), string kubeletDiskType = default(string), string workloadRuntime = default(string), string vnetSubnetID = default(string), string podSubnetID = default(string), int? maxPods = default(int?), string osType = default(string), string osSKU = default(string), int? maxCount = default(int?), int? minCount = default(int?), bool? enableAutoScaling = default(bool?), string scaleDownMode = default(string), string type = default(string), string mode = default(string), string orchestratorVersion = default(string), string currentOrchestratorVersion = default(string), string nodeImageVersion = default(string), AgentPoolUpgradeSettings upgradeSettings = default(AgentPoolUpgradeSettings), string provisioningState = default(string), PowerState powerState = default(PowerState), IList availabilityZones = default(IList), bool? enableNodePublicIP = default(bool?), string nodePublicIPPrefixID = default(string), string scaleSetPriority = default(string), string scaleSetEvictionPolicy = default(string), double? spotMaxPrice = default(double?), IDictionary tags = default(IDictionary), IDictionary nodeLabels = default(IDictionary), IList nodeTaints = default(IList), string proximityPlacementGroupID = default(string), KubeletConfig kubeletConfig = default(KubeletConfig), LinuxOSConfig linuxOSConfig = default(LinuxOSConfig), bool? enableEncryptionAtHost = default(bool?), bool? enableUltraSSD = default(bool?), bool? enableFIPS = default(bool?), string gpuInstanceProfile = default(string), CreationData creationData = default(CreationData), string hostGroupID = default(string)) + /// Initializes a new instance of the ManagedClusterAgentPoolProfileProperties class. + /// + + /// Number of agents (VMs) to host docker containers. Allowed values must be in + /// the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to + /// 1000 (inclusive) for system pools. The default value is 1. + /// + + /// VM size availability varies by region. If a node contains insufficient + /// compute resources (memory, cpu, etc) pods might fail to run correctly. For + /// more details on restricted VM sizes, see: + /// https://docs.microsoft.com/azure/aks/quotas-skus-regions + /// + + /// OS Disk Size in GB to be used to specify the disk size for every machine in + /// the master/agent pool. If you specify 0, it will apply the default osDisk + /// size according to the vmSize specified. + /// + + /// The default is 'Ephemeral' if the VM supports it and has a cache disk + /// larger than the requested OSDiskSizeGB. Otherwise, defaults to 'Managed'. + /// May not be changed after creation. For more information see [Ephemeral + /// OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os). + /// Possible values include: 'Managed', 'Ephemeral' + + /// Determines the placement of emptyDir volumes, container runtime data root, + /// and Kubelet ephemeral storage. + /// Possible values include: 'OS', 'Temporary' + + /// Determines the type of workload a node can run. + /// Possible values include: 'OCIContainer', 'WasmWasi' + + /// If this is not specified, a VNET and subnet will be generated and used. If + /// no podSubnetID is specified, this applies to nodes and pods, otherwise it + /// applies to just nodes. This is of the form: + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName} + /// + + /// If omitted, pod IPs are statically assigned on the node subnet (see + /// vnetSubnetID for more details). This is of the form: + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName} + /// + + /// The maximum number of pods that can run on a node. + /// + + /// The operating system type. The default is Linux. + /// Possible values include: 'Linux', 'Windows' + + /// Specifies the OS SKU used by the agent pool. The default is Ubuntu if + /// OSType is Linux. The default is Windows2019 when Kubernetes <= 1.24 or + /// Windows2022 when Kubernetes >= 1.25 if OSType is Windows. + /// Possible values include: 'Ubuntu', 'AzureLinux', 'CBLMariner', + /// 'Windows2019', 'Windows2022' + + /// The maximum number of nodes for auto-scaling + /// + + /// The minimum number of nodes for auto-scaling + /// + + /// Whether to enable auto-scaler + /// + + /// This also effects the cluster autoscaler behavior. If not specified, it + /// defaults to Delete. + /// Possible values include: 'Delete', 'Deallocate' + + /// The type of Agent Pool. + /// Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' + + /// A cluster must have at least one 'System' Agent Pool at all times. For + /// additional information on agent pool restrictions and best practices, see: + /// https://docs.microsoft.com/azure/aks/use-system-pools + /// Possible values include: 'System', 'User' + + /// Both patch version (major.minor.patch) (e.g. 1.20.13) and (major.minor) + /// (e.g. 1.20) are supported. When (major.minor) is specified, the latest + /// supported GA patch version is chosen automatically. Updating the cluster + /// with the same (major.minor) once it has been created (e.g. 1.14.x -) 1.14) + /// will not trigger an upgrade, even if a newer patch version is available. As + /// a best practice, you should upgrade all node pools in an AKS cluster to the + /// same Kubernetes version. The node pool version must have the same major + /// version as the control plane. The node pool minor version must be within + /// two minor versions of the control plane version. The node pool version + /// cannot be greater than the control plane version. For more information see + /// [upgrading a node + /// pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). + /// + + /// If orchestratorVersion is a fully specified version (major.minor.patch), + /// this field will be exactly equal to it. If orchestratorVersion is + /// (major.minor), this field will contain the full (major.minor.patch) version + /// being used. + /// + + /// The version of node image + /// + + /// Settings for upgrading the agentpool + /// + + /// The current deployment or provisioning state. + /// + + /// When an Agent Pool is first created it is initially Running. The Agent Pool + /// can be stopped by setting this field to Stopped. A stopped Agent Pool stops + /// all of its VMs and does not accrue billing charges. An Agent Pool can only + /// be stopped if it is Running and provisioning state is Succeeded + /// + + /// The list of Availability zones to use for nodes. This can only be specified + /// if the AgentPoolType property is 'VirtualMachineScaleSets'. + /// + + /// Some scenarios may require nodes in a node pool to receive their own + /// dedicated public IP addresses. A common scenario is for gaming workloads, + /// where a console needs to make a direct connection to a cloud virtual + /// machine to minimize hops. For more information see [assigning a public IP + /// per + /// node](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#assign-a-public-ip-per-node-for-your-node-pools). + /// The default is false. + /// + + /// This is of the form: + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName} + /// + + /// The Virtual Machine Scale Set priority. If not specified, the default is + /// 'Regular'. + /// Possible values include: 'Spot', 'Regular' + + /// This cannot be specified unless the scaleSetPriority is 'Spot'. If not + /// specified, the default is 'Delete'. + /// Possible values include: 'Delete', 'Deallocate' + + /// Possible values are any decimal value greater than zero or -1 which + /// indicates the willingness to pay any on-demand price. For more details on + /// spot pricing, see [spot VMs + /// pricing](https://docs.microsoft.com/azure/virtual-machines/spot-vms#pricing) + /// + + /// The tags to be persisted on the agent pool virtual machine scale set. + /// + + /// The node labels to be persisted across all nodes in agent pool. + /// + + /// The taints added to new nodes during node pool create and scale. For + /// example, key=value:NoSchedule. + /// + + /// The ID for Proximity Placement Group. + /// + + /// The Kubelet configuration on the agent pool nodes. + /// + + /// The OS configuration of Linux agent nodes. + /// + + /// This is only supported on certain VM sizes and in certain Azure regions. + /// For more information, see: + /// https://docs.microsoft.com/azure/aks/enable-host-encryption + /// + + /// Whether to enable UltraSSD + /// + + /// See [Add a FIPS-enabled node + /// pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#add-a-fips-enabled-node-pool-preview) + /// for more details. + /// + + /// GPUInstanceProfile to be used to specify GPU MIG instance profile for + /// supported GPU VM SKU. + /// Possible values include: 'MIG1g', 'MIG2g', 'MIG3g', 'MIG4g', 'MIG7g' + + /// CreationData to be used to specify the source Snapshot ID if the node pool + /// will be created/upgraded using a snapshot. + /// + + /// This is of the form: + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. + /// For more information see [Azure dedicated + /// hosts](https://docs.microsoft.com/azure/virtual-machines/dedicated-hosts). + /// + public ManagedClusterAgentPoolProfileProperties(int? count = default(int?), string vmSize = default(string), int? osDiskSizeGb = default(int?), string osDiskType = default(string), string kubeletDiskType = default(string), string workloadRuntime = default(string), string vnetSubnetId = default(string), string podSubnetId = default(string), int? maxPods = default(int?), string osType = default(string), string osSku = default(string), int? maxCount = default(int?), int? minCount = default(int?), bool? enableAutoScaling = default(bool?), string scaleDownMode = default(string), string type = default(string), string mode = default(string), string orchestratorVersion = default(string), string currentOrchestratorVersion = default(string), string nodeImageVersion = default(string), AgentPoolUpgradeSettings upgradeSettings = default(AgentPoolUpgradeSettings), string provisioningState = default(string), PowerState powerState = default(PowerState), System.Collections.Generic.IList availabilityZones = default(System.Collections.Generic.IList), bool? enableNodePublicIP = default(bool?), string nodePublicIPPrefixId = default(string), string scaleSetPriority = default(string), string scaleSetEvictionPolicy = default(string), double? spotMaxPrice = default(double?), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), System.Collections.Generic.IDictionary nodeLabels = default(System.Collections.Generic.IDictionary), System.Collections.Generic.IList nodeTaints = default(System.Collections.Generic.IList), string proximityPlacementGroupId = default(string), KubeletConfig kubeletConfig = default(KubeletConfig), LinuxOSConfig linuxOSConfig = default(LinuxOSConfig), bool? enableEncryptionAtHost = default(bool?), bool? enableUltraSsd = default(bool?), bool? enableFips = default(bool?), string gpuInstanceProfile = default(string), CreationData creationData = default(CreationData), string hostGroupId = default(string)) + { - Count = count; - VmSize = vmSize; - OsDiskSizeGB = osDiskSizeGB; - OsDiskType = osDiskType; - KubeletDiskType = kubeletDiskType; - WorkloadRuntime = workloadRuntime; - VnetSubnetID = vnetSubnetID; - PodSubnetID = podSubnetID; - MaxPods = maxPods; - OsType = osType; - OsSKU = osSKU; - MaxCount = maxCount; - MinCount = minCount; - EnableAutoScaling = enableAutoScaling; - ScaleDownMode = scaleDownMode; - Type = type; - Mode = mode; - OrchestratorVersion = orchestratorVersion; - CurrentOrchestratorVersion = currentOrchestratorVersion; - NodeImageVersion = nodeImageVersion; - UpgradeSettings = upgradeSettings; - ProvisioningState = provisioningState; - PowerState = powerState; - AvailabilityZones = availabilityZones; - EnableNodePublicIP = enableNodePublicIP; - NodePublicIPPrefixID = nodePublicIPPrefixID; - ScaleSetPriority = scaleSetPriority; - ScaleSetEvictionPolicy = scaleSetEvictionPolicy; - SpotMaxPrice = spotMaxPrice; - Tags = tags; - NodeLabels = nodeLabels; - NodeTaints = nodeTaints; - ProximityPlacementGroupID = proximityPlacementGroupID; - KubeletConfig = kubeletConfig; - LinuxOSConfig = linuxOSConfig; - EnableEncryptionAtHost = enableEncryptionAtHost; - EnableUltraSSD = enableUltraSSD; - EnableFIPS = enableFIPS; - GpuInstanceProfile = gpuInstanceProfile; - CreationData = creationData; - HostGroupID = hostGroupID; + this.Count = count; + this.VMSize = vmSize; + this.OSDiskSizeGb = osDiskSizeGb; + this.OSDiskType = osDiskType; + this.KubeletDiskType = kubeletDiskType; + this.WorkloadRuntime = workloadRuntime; + this.VnetSubnetId = vnetSubnetId; + this.PodSubnetId = podSubnetId; + this.MaxPods = maxPods; + this.OSType = osType; + this.OSSku = osSku; + this.MaxCount = maxCount; + this.MinCount = minCount; + this.EnableAutoScaling = enableAutoScaling; + this.ScaleDownMode = scaleDownMode; + this.Type = type; + this.Mode = mode; + this.OrchestratorVersion = orchestratorVersion; + this.CurrentOrchestratorVersion = currentOrchestratorVersion; + this.NodeImageVersion = nodeImageVersion; + this.UpgradeSettings = upgradeSettings; + this.ProvisioningState = provisioningState; + this.PowerState = powerState; + this.AvailabilityZones = availabilityZones; + this.EnableNodePublicIP = enableNodePublicIP; + this.NodePublicIPPrefixId = nodePublicIPPrefixId; + this.ScaleSetPriority = scaleSetPriority; + this.ScaleSetEvictionPolicy = scaleSetEvictionPolicy; + this.SpotMaxPrice = spotMaxPrice; + this.Tags = tags; + this.NodeLabels = nodeLabels; + this.NodeTaints = nodeTaints; + this.ProximityPlacementGroupId = proximityPlacementGroupId; + this.KubeletConfig = kubeletConfig; + this.LinuxOSConfig = linuxOSConfig; + this.EnableEncryptionAtHost = enableEncryptionAtHost; + this.EnableUltraSsd = enableUltraSsd; + this.EnableFips = enableFips; + this.GpuInstanceProfile = gpuInstanceProfile; + this.CreationData = creationData; + this.HostGroupId = hostGroupId; CustomInit(); } @@ -169,378 +260,370 @@ public ManagedClusterAgentPoolProfileProperties() /// partial void CustomInit(); + /// - /// Gets or sets number of agents (VMs) to host docker containers. - /// Allowed values must be in the range of 0 to 1000 (inclusive) for - /// user pools and in the range of 1 to 1000 (inclusive) for system - /// pools. The default value is 1. + /// Gets or sets number of agents (VMs) to host docker containers. Allowed + /// values must be in the range of 0 to 1000 (inclusive) for user pools and in + /// the range of 1 to 1000 (inclusive) for system pools. The default value is + /// 1. /// - [JsonProperty(PropertyName = "count")] - public int? Count { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "count")] + public int? Count {get; set; } /// - /// Gets or sets the size of the agent pool VMs. - /// - /// - /// VM size availability varies by region. If a node contains - /// insufficient compute resources (memory, cpu, etc) pods might fail - /// to run correctly. For more details on restricted VM sizes, see: + /// Gets or sets vM size availability varies by region. If a node contains + /// insufficient compute resources (memory, cpu, etc) pods might fail to run + /// correctly. For more details on restricted VM sizes, see: /// https://docs.microsoft.com/azure/aks/quotas-skus-regions - /// - [JsonProperty(PropertyName = "vmSize")] - public string VmSize { get; set; } + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "vmSize")] + public string VMSize {get; set; } /// + /// Gets or sets oS Disk Size in GB to be used to specify the disk size for + /// every machine in the master/agent pool. If you specify 0, it will apply the + /// default osDisk size according to the vmSize specified. /// - [JsonProperty(PropertyName = "osDiskSizeGB")] - public int? OsDiskSizeGB { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "osDiskSizeGB")] + public int? OSDiskSizeGb {get; set; } /// - /// Gets or sets possible values include: 'Managed', 'Ephemeral' + /// Gets or sets the default is 'Ephemeral' if the VM supports it and has a + /// cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults to + /// 'Managed'. May not be changed after creation. For more information see + /// [Ephemeral + /// OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os). Possible values include: 'Managed', 'Ephemeral' /// - [JsonProperty(PropertyName = "osDiskType")] - public string OsDiskType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "osDiskType")] + public string OSDiskType {get; set; } /// - /// Gets or sets possible values include: 'OS', 'Temporary' + /// Gets or sets determines the placement of emptyDir volumes, container + /// runtime data root, and Kubelet ephemeral storage. Possible values include: 'OS', 'Temporary' /// - [JsonProperty(PropertyName = "kubeletDiskType")] - public string KubeletDiskType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "kubeletDiskType")] + public string KubeletDiskType {get; set; } /// - /// Gets or sets possible values include: 'OCIContainer', 'WasmWasi' + /// Gets or sets determines the type of workload a node can run. Possible values include: 'OCIContainer', 'WasmWasi' /// - [JsonProperty(PropertyName = "workloadRuntime")] - public string WorkloadRuntime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "workloadRuntime")] + public string WorkloadRuntime {get; set; } /// - /// Gets or sets the ID of the subnet which agent pool nodes and - /// optionally pods will join on startup. - /// - /// - /// If this is not specified, a VNET and subnet will be generated and - /// used. If no podSubnetID is specified, this applies to nodes and - /// pods, otherwise it applies to just nodes. This is of the form: + /// Gets or sets if this is not specified, a VNET and subnet will be generated + /// and used. If no podSubnetID is specified, this applies to nodes and pods, + /// otherwise it applies to just nodes. This is of the form: /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName} - /// - [JsonProperty(PropertyName = "vnetSubnetID")] - public string VnetSubnetID { get; set; } + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "vnetSubnetID")] + public string VnetSubnetId {get; set; } /// - /// Gets or sets the ID of the subnet which pods will join when - /// launched. - /// - /// - /// If omitted, pod IPs are statically assigned on the node subnet (see - /// vnetSubnetID for more details). This is of the form: + /// Gets or sets if omitted, pod IPs are statically assigned on the node subnet + /// (see vnetSubnetID for more details). This is of the form: /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName} - /// - [JsonProperty(PropertyName = "podSubnetID")] - public string PodSubnetID { get; set; } + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "podSubnetID")] + public string PodSubnetId {get; set; } /// /// Gets or sets the maximum number of pods that can run on a node. /// - [JsonProperty(PropertyName = "maxPods")] - public int? MaxPods { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "maxPods")] + public int? MaxPods {get; set; } /// - /// Gets or sets possible values include: 'Linux', 'Windows' + /// Gets or sets the operating system type. The default is Linux. Possible values include: 'Linux', 'Windows' /// - [JsonProperty(PropertyName = "osType")] - public string OsType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "osType")] + public string OSType {get; set; } /// - /// Gets or sets possible values include: 'Ubuntu', 'AzureLinux', - /// 'CBLMariner', 'Windows2019', 'Windows2022' + /// Gets or sets specifies the OS SKU used by the agent pool. The default is + /// Ubuntu if OSType is Linux. The default is Windows2019 when Kubernetes <= + /// 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is Windows. Possible values include: 'Ubuntu', 'AzureLinux', 'CBLMariner', 'Windows2019', 'Windows2022' /// - [JsonProperty(PropertyName = "osSKU")] - public string OsSKU { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "osSKU")] + public string OSSku {get; set; } /// /// Gets or sets the maximum number of nodes for auto-scaling /// - [JsonProperty(PropertyName = "maxCount")] - public int? MaxCount { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "maxCount")] + public int? MaxCount {get; set; } /// /// Gets or sets the minimum number of nodes for auto-scaling /// - [JsonProperty(PropertyName = "minCount")] - public int? MinCount { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "minCount")] + public int? MinCount {get; set; } /// /// Gets or sets whether to enable auto-scaler /// - [JsonProperty(PropertyName = "enableAutoScaling")] - public bool? EnableAutoScaling { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "enableAutoScaling")] + public bool? EnableAutoScaling {get; set; } /// - /// Gets or sets the scale down mode to use when scaling the Agent - /// Pool. + /// Gets or sets this also effects the cluster autoscaler behavior. If not + /// specified, it defaults to Delete. Possible values include: 'Delete', 'Deallocate' /// - /// - /// This also effects the cluster autoscaler behavior. If not - /// specified, it defaults to Delete. Possible values include: - /// 'Delete', 'Deallocate' - /// - [JsonProperty(PropertyName = "scaleDownMode")] - public string ScaleDownMode { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "scaleDownMode")] + public string ScaleDownMode {get; set; } /// - /// Gets or sets possible values include: 'VirtualMachineScaleSets', - /// 'AvailabilitySet' + /// Gets or sets the type of Agent Pool. Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' /// - [JsonProperty(PropertyName = "type")] - public string Type { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public string Type {get; set; } /// - /// Gets or sets possible values include: 'System', 'User' + /// Gets or sets a cluster must have at least one 'System' Agent Pool at all + /// times. For additional information on agent pool restrictions and best + /// practices, see: https://docs.microsoft.com/azure/aks/use-system-pools Possible values include: 'System', 'User' /// - [JsonProperty(PropertyName = "mode")] - public string Mode { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "mode")] + public string Mode {get; set; } /// - /// Gets or sets the version of Kubernetes specified by the user. - /// - /// - /// Both patch version (major.minor.patch) (e.g. 1.20.13) and - /// (major.minor) (e.g. 1.20) are supported. When (major.minor) is - /// specified, the latest supported GA patch version is chosen - /// automatically. Updating the cluster with the same (major.minor) - /// once it has been created (e.g. 1.14.x -) 1.14) will not trigger an - /// upgrade, even if a newer patch version is available. As a best - /// practice, you should upgrade all node pools in an AKS cluster to - /// the same Kubernetes version. The node pool version must have the - /// same major version as the control plane. The node pool minor - /// version must be within two minor versions of the control plane - /// version. The node pool version cannot be greater than the control - /// plane version. For more information see [upgrading a node + /// Gets or sets both patch version (major.minor.patch) (e.g. 1.20.13) and + /// (major.minor) (e.g. 1.20) are supported. When (major.minor) is specified, + /// the latest supported GA patch version is chosen automatically. Updating the + /// cluster with the same (major.minor) once it has been created (e.g. 1.14.x + /// -) 1.14) will not trigger an upgrade, even if a newer patch version is + /// available. As a best practice, you should upgrade all node pools in an AKS + /// cluster to the same Kubernetes version. The node pool version must have the + /// same major version as the control plane. The node pool minor version must + /// be within two minor versions of the control plane version. The node pool + /// version cannot be greater than the control plane version. For more + /// information see [upgrading a node /// pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). - /// - [JsonProperty(PropertyName = "orchestratorVersion")] - public string OrchestratorVersion { get; set; } + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "orchestratorVersion")] + public string OrchestratorVersion {get; set; } /// - /// Gets the version of Kubernetes the Agent Pool is running. - /// - /// - /// If orchestratorVersion is a fully specified version + /// Gets if orchestratorVersion is a fully specified version /// (major.minor.patch), this field will be exactly equal to it. If - /// orchestratorVersion is (major.minor), this field will contain the - /// full (major.minor.patch) version being used. - /// - [JsonProperty(PropertyName = "currentOrchestratorVersion")] - public string CurrentOrchestratorVersion { get; private set; } + /// orchestratorVersion is (major.minor), this field will contain the full + /// (major.minor.patch) version being used. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "currentOrchestratorVersion")] + public string CurrentOrchestratorVersion {get; private set; } /// /// Gets the version of node image /// - [JsonProperty(PropertyName = "nodeImageVersion")] - public string NodeImageVersion { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "nodeImageVersion")] + public string NodeImageVersion {get; private set; } /// /// Gets or sets settings for upgrading the agentpool /// - [JsonProperty(PropertyName = "upgradeSettings")] - public AgentPoolUpgradeSettings UpgradeSettings { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "upgradeSettings")] + public AgentPoolUpgradeSettings UpgradeSettings {get; set; } /// /// Gets the current deployment or provisioning state. /// - [JsonProperty(PropertyName = "provisioningState")] - public string ProvisioningState { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "provisioningState")] + public string ProvisioningState {get; private set; } /// - /// Gets or sets whether the Agent Pool is running or stopped. + /// Gets or sets when an Agent Pool is first created it is initially Running. + /// The Agent Pool can be stopped by setting this field to Stopped. A stopped + /// Agent Pool stops all of its VMs and does not accrue billing charges. An + /// Agent Pool can only be stopped if it is Running and provisioning state is + /// Succeeded /// - /// - /// When an Agent Pool is first created it is initially Running. The - /// Agent Pool can be stopped by setting this field to Stopped. A - /// stopped Agent Pool stops all of its VMs and does not accrue billing - /// charges. An Agent Pool can only be stopped if it is Running and - /// provisioning state is Succeeded - /// - [JsonProperty(PropertyName = "powerState")] - public PowerState PowerState { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "powerState")] + public PowerState PowerState {get; set; } /// - /// Gets or sets the list of Availability zones to use for nodes. This - /// can only be specified if the AgentPoolType property is - /// 'VirtualMachineScaleSets'. + /// Gets or sets the list of Availability zones to use for nodes. This can only + /// be specified if the AgentPoolType property is 'VirtualMachineScaleSets'. /// - [JsonProperty(PropertyName = "availabilityZones")] - public IList AvailabilityZones { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "availabilityZones")] + public System.Collections.Generic.IList AvailabilityZones {get; set; } /// - /// Gets or sets whether each node is allocated its own public IP. - /// - /// - /// Some scenarios may require nodes in a node pool to receive their - /// own dedicated public IP addresses. A common scenario is for gaming - /// workloads, where a console needs to make a direct connection to a - /// cloud virtual machine to minimize hops. For more information see - /// [assigning a public IP per + /// Gets or sets some scenarios may require nodes in a node pool to receive + /// their own dedicated public IP addresses. A common scenario is for gaming + /// workloads, where a console needs to make a direct connection to a cloud + /// virtual machine to minimize hops. For more information see [assigning a + /// public IP per /// node](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#assign-a-public-ip-per-node-for-your-node-pools). /// The default is false. - /// - [JsonProperty(PropertyName = "enableNodePublicIP")] - public bool? EnableNodePublicIP { get; set; } + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "enableNodePublicIP")] + public bool? EnableNodePublicIP {get; set; } /// - /// Gets or sets the public IP prefix ID which VM nodes should use IPs - /// from. - /// - /// - /// This is of the form: + /// Gets or sets this is of the form: /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName} - /// - [JsonProperty(PropertyName = "nodePublicIPPrefixID")] - public string NodePublicIPPrefixID { get; set; } + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "nodePublicIPPrefixID")] + public string NodePublicIPPrefixId {get; set; } /// - /// Gets or sets the Virtual Machine Scale Set priority. If not - /// specified, the default is 'Regular'. Possible values include: - /// 'Spot', 'Regular' + /// Gets or sets the Virtual Machine Scale Set priority. If not specified, the + /// default is 'Regular'. Possible values include: 'Spot', 'Regular' /// - [JsonProperty(PropertyName = "scaleSetPriority")] - public string ScaleSetPriority { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "scaleSetPriority")] + public string ScaleSetPriority {get; set; } /// - /// Gets or sets the Virtual Machine Scale Set eviction policy to use. + /// Gets or sets this cannot be specified unless the scaleSetPriority is + /// 'Spot'. If not specified, the default is 'Delete'. Possible values include: 'Delete', 'Deallocate' /// - /// - /// This cannot be specified unless the scaleSetPriority is 'Spot'. If - /// not specified, the default is 'Delete'. Possible values include: - /// 'Delete', 'Deallocate' - /// - [JsonProperty(PropertyName = "scaleSetEvictionPolicy")] - public string ScaleSetEvictionPolicy { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "scaleSetEvictionPolicy")] + public string ScaleSetEvictionPolicy {get; set; } /// - /// Gets or sets the max price (in US Dollars) you are willing to pay - /// for spot instances. Possible values are any decimal value greater - /// than zero or -1 which indicates default price to be up-to - /// on-demand. - /// - /// - /// Possible values are any decimal value greater than zero or -1 which - /// indicates the willingness to pay any on-demand price. For more + /// Gets or sets possible values are any decimal value greater than zero or -1 + /// which indicates the willingness to pay any on-demand price. For more /// details on spot pricing, see [spot VMs /// pricing](https://docs.microsoft.com/azure/virtual-machines/spot-vms#pricing) - /// - [JsonProperty(PropertyName = "spotMaxPrice")] - public double? SpotMaxPrice { get; set; } + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "spotMaxPrice")] + public double? SpotMaxPrice {get; set; } /// - /// Gets or sets the tags to be persisted on the agent pool virtual - /// machine scale set. + /// Gets or sets the tags to be persisted on the agent pool virtual machine + /// scale set. /// - [JsonProperty(PropertyName = "tags")] - public IDictionary Tags { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "tags")] + public System.Collections.Generic.IDictionary Tags {get; set; } /// - /// Gets or sets the node labels to be persisted across all nodes in - /// agent pool. + /// Gets or sets the node labels to be persisted across all nodes in agent + /// pool. /// - [JsonProperty(PropertyName = "nodeLabels")] - public IDictionary NodeLabels { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "nodeLabels")] + public System.Collections.Generic.IDictionary NodeLabels {get; set; } /// - /// Gets or sets the taints added to new nodes during node pool create - /// and scale. For example, key=value:NoSchedule. + /// Gets or sets the taints added to new nodes during node pool create and + /// scale. For example, key=value:NoSchedule. /// - [JsonProperty(PropertyName = "nodeTaints")] - public IList NodeTaints { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "nodeTaints")] + public System.Collections.Generic.IList NodeTaints {get; set; } /// /// Gets or sets the ID for Proximity Placement Group. /// - [JsonProperty(PropertyName = "proximityPlacementGroupID")] - public string ProximityPlacementGroupID { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "proximityPlacementGroupID")] + public string ProximityPlacementGroupId {get; set; } /// /// Gets or sets the Kubelet configuration on the agent pool nodes. /// - [JsonProperty(PropertyName = "kubeletConfig")] - public KubeletConfig KubeletConfig { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "kubeletConfig")] + public KubeletConfig KubeletConfig {get; set; } /// /// Gets or sets the OS configuration of Linux agent nodes. /// - [JsonProperty(PropertyName = "linuxOSConfig")] - public LinuxOSConfig LinuxOSConfig { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "linuxOSConfig")] + public LinuxOSConfig LinuxOSConfig {get; set; } /// - /// Gets or sets whether to enable host based OS and data drive - /// encryption. - /// - /// - /// This is only supported on certain VM sizes and in certain Azure - /// regions. For more information, see: + /// Gets or sets this is only supported on certain VM sizes and in certain + /// Azure regions. For more information, see: /// https://docs.microsoft.com/azure/aks/enable-host-encryption - /// - [JsonProperty(PropertyName = "enableEncryptionAtHost")] - public bool? EnableEncryptionAtHost { get; set; } + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "enableEncryptionAtHost")] + public bool? EnableEncryptionAtHost {get; set; } /// /// Gets or sets whether to enable UltraSSD /// - [JsonProperty(PropertyName = "enableUltraSSD")] - public bool? EnableUltraSSD { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "enableUltraSSD")] + public bool? EnableUltraSsd {get; set; } /// - /// Gets or sets whether to use a FIPS-enabled OS. - /// - /// - /// See [Add a FIPS-enabled node + /// Gets or sets see [Add a FIPS-enabled node /// pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#add-a-fips-enabled-node-pool-preview) /// for more details. - /// - [JsonProperty(PropertyName = "enableFIPS")] - public bool? EnableFIPS { get; set; } + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "enableFIPS")] + public bool? EnableFips {get; set; } /// - /// Gets or sets gPUInstanceProfile to be used to specify GPU MIG - /// instance profile for supported GPU VM SKU. Possible values include: - /// 'MIG1g', 'MIG2g', 'MIG3g', 'MIG4g', 'MIG7g' + /// Gets or sets gPUInstanceProfile to be used to specify GPU MIG instance + /// profile for supported GPU VM SKU. Possible values include: 'MIG1g', 'MIG2g', 'MIG3g', 'MIG4g', 'MIG7g' /// - [JsonProperty(PropertyName = "gpuInstanceProfile")] - public string GpuInstanceProfile { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "gpuInstanceProfile")] + public string GpuInstanceProfile {get; set; } /// - /// Gets or sets creationData to be used to specify the source Snapshot - /// ID if the node pool will be created/upgraded using a snapshot. + /// Gets or sets creationData to be used to specify the source Snapshot ID if + /// the node pool will be created/upgraded using a snapshot. /// - [JsonProperty(PropertyName = "creationData")] - public CreationData CreationData { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "creationData")] + public CreationData CreationData {get; set; } /// - /// Gets or sets the fully qualified resource ID of the Dedicated Host - /// Group to provision virtual machines from, used only in creation - /// scenario and not allowed to changed once set. - /// - /// - /// This is of the form: + /// Gets or sets this is of the form: /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. /// For more information see [Azure dedicated /// hosts](https://docs.microsoft.com/azure/virtual-machines/dedicated-hosts). - /// - [JsonProperty(PropertyName = "hostGroupID")] - public string HostGroupID { get; set; } - + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "hostGroupID")] + public string HostGroupId {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (KubeletConfig != null) + + if (this.OSDiskSizeGb != null) + { + if (this.OSDiskSizeGb > 2048) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.InclusiveMaximum, "OSDiskSizeGb", 2048); + } + if (this.OSDiskSizeGb < 0) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.InclusiveMinimum, "OSDiskSizeGb", 0); + } + } + + + + + + + + + + + + + + + + + + + + + + + + + if (this.KubeletConfig != null) { - KubeletConfig.Validate(); + this.KubeletConfig.Validate(); } + + + + } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterAutoUpgradeProfile.cs b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterAutoUpgradeProfile.cs index 81fd39229db5..f6f7eeee41c1 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterAutoUpgradeProfile.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterAutoUpgradeProfile.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.ContainerService.Models public partial class ManagedClusterAutoUpgradeProfile { /// - /// Initializes a new instance of the ManagedClusterAutoUpgradeProfile - /// class. + /// Initializes a new instance of the ManagedClusterAutoUpgradeProfile class. /// public ManagedClusterAutoUpgradeProfile() { @@ -28,14 +21,16 @@ public ManagedClusterAutoUpgradeProfile() } /// - /// Initializes a new instance of the ManagedClusterAutoUpgradeProfile - /// class. + /// Initializes a new instance of the ManagedClusterAutoUpgradeProfile class. /// - /// The upgrade channel for auto upgrade. - /// The default is 'none'. + + /// For more information see [setting the AKS cluster auto-upgrade + /// channel](https://docs.microsoft.com/azure/aks/upgrade-cluster#set-auto-upgrade-channel). + /// Possible values include: 'rapid', 'stable', 'patch', 'node-image', 'none' public ManagedClusterAutoUpgradeProfile(string upgradeChannel = default(string)) + { - UpgradeChannel = upgradeChannel; + this.UpgradeChannel = upgradeChannel; CustomInit(); } @@ -44,18 +39,12 @@ public ManagedClusterAutoUpgradeProfile() /// partial void CustomInit(); + /// - /// Gets or sets the upgrade channel for auto upgrade. The default is - /// 'none'. + /// Gets or sets for more information see [setting the AKS cluster auto-upgrade + /// channel](https://docs.microsoft.com/azure/aks/upgrade-cluster#set-auto-upgrade-channel). Possible values include: 'rapid', 'stable', 'patch', 'node-image', 'none' /// - /// - /// For more information see [setting the AKS cluster auto-upgrade - /// channel](https://docs.microsoft.com/azure/aks/upgrade-cluster#set-auto-upgrade-channel). - /// Possible values include: 'rapid', 'stable', 'patch', 'node-image', - /// 'none' - /// - [JsonProperty(PropertyName = "upgradeChannel")] - public string UpgradeChannel { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "upgradeChannel")] + public string UpgradeChannel {get; set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterAzureMonitorProfile.cs b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterAzureMonitorProfile.cs index 2a950d51f8ef..6278356605a6 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterAzureMonitorProfile.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterAzureMonitorProfile.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.ContainerService.Models public partial class ManagedClusterAzureMonitorProfile { /// - /// Initializes a new instance of the ManagedClusterAzureMonitorProfile - /// class. + /// Initializes a new instance of the ManagedClusterAzureMonitorProfile class. /// public ManagedClusterAzureMonitorProfile() { @@ -28,12 +21,18 @@ public ManagedClusterAzureMonitorProfile() } /// - /// Initializes a new instance of the ManagedClusterAzureMonitorProfile - /// class. + /// Initializes a new instance of the ManagedClusterAzureMonitorProfile class. /// + + /// Metrics profile for the Azure Monitor managed service for Prometheus addon. + /// Collect out-of-the-box Kubernetes infrastructure metrics to send to an + /// Azure Monitor Workspace and configure additional scraping for custom + /// targets. See aka.ms/AzureManagedPrometheus for an overview. + /// public ManagedClusterAzureMonitorProfile(ManagedClusterAzureMonitorProfileMetrics metrics = default(ManagedClusterAzureMonitorProfileMetrics)) + { - Metrics = metrics; + this.Metrics = metrics; CustomInit(); } @@ -42,23 +41,27 @@ public ManagedClusterAzureMonitorProfile() /// partial void CustomInit(); + /// + /// Gets or sets metrics profile for the Azure Monitor managed service for + /// Prometheus addon. Collect out-of-the-box Kubernetes infrastructure metrics + /// to send to an Azure Monitor Workspace and configure additional scraping for + /// custom targets. See aka.ms/AzureManagedPrometheus for an overview. /// - [JsonProperty(PropertyName = "metrics")] - public ManagedClusterAzureMonitorProfileMetrics Metrics { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "metrics")] + public ManagedClusterAzureMonitorProfileMetrics Metrics {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (Metrics != null) + if (this.Metrics != null) { - Metrics.Validate(); + this.Metrics.Validate(); } } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterAzureMonitorProfileKubeStateMetrics.cs b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterAzureMonitorProfileKubeStateMetrics.cs index 4a2e68324243..43b38c1514c3 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterAzureMonitorProfileKubeStateMetrics.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterAzureMonitorProfileKubeStateMetrics.cs @@ -1,29 +1,22 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; using System.Linq; /// - /// Kube State Metrics profile for the Azure Managed Prometheus addon. - /// These optional settings are for the kube-state-metrics pod that is - /// deployed with the addon. See - /// aka.ms/AzureManagedPrometheus-optional-parameters for details. + /// Kube State Metrics profile for the Azure Managed Prometheus addon. These + /// optional settings are for the kube-state-metrics pod that is deployed with + /// the addon. See aka.ms/AzureManagedPrometheus-optional-parameters for + /// details. /// public partial class ManagedClusterAzureMonitorProfileKubeStateMetrics { /// - /// Initializes a new instance of the - /// ManagedClusterAzureMonitorProfileKubeStateMetrics class. + /// Initializes a new instance of the ManagedClusterAzureMonitorProfileKubeStateMetrics class. /// public ManagedClusterAzureMonitorProfileKubeStateMetrics() { @@ -31,25 +24,25 @@ public ManagedClusterAzureMonitorProfileKubeStateMetrics() } /// - /// Initializes a new instance of the - /// ManagedClusterAzureMonitorProfileKubeStateMetrics class. + /// Initializes a new instance of the ManagedClusterAzureMonitorProfileKubeStateMetrics class. /// - /// Comma-separated list of - /// additional Kubernetes label keys that will be used in the - /// resource's labels metric (Example: - /// 'namespaces=[k8s-label-1,k8s-label-n,...],pods=[app],...'). By - /// default the metric contains only resource name and namespace - /// labels. - /// Comma-separated list of - /// Kubernetes annotation keys that will be used in the resource's - /// labels metric (Example: - /// 'namespaces=[kubernetes.io/team,...],pods=[kubernetes.io/team],...'). - /// By default the metric contains only resource name and namespace - /// labels. + + /// Comma-separated list of additional Kubernetes label keys that will be used + /// in the resource's labels metric (Example: + /// 'namespaces=[k8s-label-1,k8s-label-n,...],pods=[app],...'). By default the + /// metric contains only resource name and namespace labels. + /// + + /// Comma-separated list of Kubernetes annotation keys that will be used in the + /// resource's labels metric (Example: + /// 'namespaces=[kubernetes.io/team,...],pods=[kubernetes.io/team],...'). By + /// default the metric contains only resource name and namespace labels. + /// public ManagedClusterAzureMonitorProfileKubeStateMetrics(string metricLabelsAllowlist = default(string), string metricAnnotationsAllowList = default(string)) + { - MetricLabelsAllowlist = metricLabelsAllowlist; - MetricAnnotationsAllowList = metricAnnotationsAllowList; + this.MetricLabelsAllowlist = metricLabelsAllowlist; + this.MetricAnnotationsAllowList = metricAnnotationsAllowList; CustomInit(); } @@ -58,25 +51,23 @@ public ManagedClusterAzureMonitorProfileKubeStateMetrics() /// partial void CustomInit(); + /// - /// Gets or sets comma-separated list of additional Kubernetes label - /// keys that will be used in the resource's labels metric (Example: - /// 'namespaces=[k8s-label-1,k8s-label-n,...],pods=[app],...'). By - /// default the metric contains only resource name and namespace - /// labels. + /// Gets or sets comma-separated list of additional Kubernetes label keys that + /// will be used in the resource's labels metric (Example: + /// 'namespaces=[k8s-label-1,k8s-label-n,...],pods=[app],...'). By default the + /// metric contains only resource name and namespace labels. /// - [JsonProperty(PropertyName = "metricLabelsAllowlist")] - public string MetricLabelsAllowlist { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "metricLabelsAllowlist")] + public string MetricLabelsAllowlist {get; set; } /// - /// Gets or sets comma-separated list of Kubernetes annotation keys - /// that will be used in the resource's labels metric (Example: - /// 'namespaces=[kubernetes.io/team,...],pods=[kubernetes.io/team],...'). - /// By default the metric contains only resource name and namespace - /// labels. + /// Gets or sets comma-separated list of Kubernetes annotation keys that will + /// be used in the resource's labels metric (Example: + /// 'namespaces=[kubernetes.io/team,...],pods=[kubernetes.io/team],...'). By + /// default the metric contains only resource name and namespace labels. /// - [JsonProperty(PropertyName = "metricAnnotationsAllowList")] - public string MetricAnnotationsAllowList { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "metricAnnotationsAllowList")] + public string MetricAnnotationsAllowList {get; set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterAzureMonitorProfileMetrics.cs b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterAzureMonitorProfileMetrics.cs index 2187ebb57a02..f8546a273053 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterAzureMonitorProfileMetrics.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterAzureMonitorProfileMetrics.cs @@ -1,29 +1,22 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; using System.Linq; /// - /// Metrics profile for the Azure Monitor managed service for Prometheus - /// addon. Collect out-of-the-box Kubernetes infrastructure metrics to send - /// to an Azure Monitor Workspace and configure additional scraping for - /// custom targets. See aka.ms/AzureManagedPrometheus for an overview. + /// Metrics profile for the Azure Monitor managed service for Prometheus addon. + /// Collect out-of-the-box Kubernetes infrastructure metrics to send to an + /// Azure Monitor Workspace and configure additional scraping for custom + /// targets. See aka.ms/AzureManagedPrometheus for an overview. /// public partial class ManagedClusterAzureMonitorProfileMetrics { /// - /// Initializes a new instance of the - /// ManagedClusterAzureMonitorProfileMetrics class. + /// Initializes a new instance of the ManagedClusterAzureMonitorProfileMetrics class. /// public ManagedClusterAzureMonitorProfileMetrics() { @@ -31,17 +24,24 @@ public ManagedClusterAzureMonitorProfileMetrics() } /// - /// Initializes a new instance of the - /// ManagedClusterAzureMonitorProfileMetrics class. + /// Initializes a new instance of the ManagedClusterAzureMonitorProfileMetrics class. /// - /// Whether to enable or disable the Azure - /// Managed Prometheus addon for Prometheus monitoring. See - /// aka.ms/AzureManagedPrometheus-aks-enable for details on enabling - /// and disabling. + + /// Whether to enable or disable the Azure Managed Prometheus addon for + /// Prometheus monitoring. See aka.ms/AzureManagedPrometheus-aks-enable for + /// details on enabling and disabling. + /// + + /// Kube State Metrics profile for the Azure Managed Prometheus addon. These + /// optional settings are for the kube-state-metrics pod that is deployed with + /// the addon. See aka.ms/AzureManagedPrometheus-optional-parameters for + /// details. + /// public ManagedClusterAzureMonitorProfileMetrics(bool enabled, ManagedClusterAzureMonitorProfileKubeStateMetrics kubeStateMetrics = default(ManagedClusterAzureMonitorProfileKubeStateMetrics)) + { - Enabled = enabled; - KubeStateMetrics = kubeStateMetrics; + this.Enabled = enabled; + this.KubeStateMetrics = kubeStateMetrics; CustomInit(); } @@ -50,28 +50,33 @@ public ManagedClusterAzureMonitorProfileMetrics() /// partial void CustomInit(); + /// - /// Gets or sets whether to enable or disable the Azure Managed - /// Prometheus addon for Prometheus monitoring. See - /// aka.ms/AzureManagedPrometheus-aks-enable for details on enabling - /// and disabling. + /// Gets or sets whether to enable or disable the Azure Managed Prometheus + /// addon for Prometheus monitoring. See + /// aka.ms/AzureManagedPrometheus-aks-enable for details on enabling and + /// disabling. /// - [JsonProperty(PropertyName = "enabled")] - public bool Enabled { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "enabled")] + public bool Enabled {get; set; } /// + /// Gets or sets kube State Metrics profile for the Azure Managed Prometheus + /// addon. These optional settings are for the kube-state-metrics pod that is + /// deployed with the addon. See + /// aka.ms/AzureManagedPrometheus-optional-parameters for details. /// - [JsonProperty(PropertyName = "kubeStateMetrics")] - public ManagedClusterAzureMonitorProfileKubeStateMetrics KubeStateMetrics { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "kubeStateMetrics")] + public ManagedClusterAzureMonitorProfileKubeStateMetrics KubeStateMetrics {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { + } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterHTTPProxyConfig.cs b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterHTTPProxyConfig.cs index ae383cb864ec..c536c93177c3 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterHTTPProxyConfig.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterHTTPProxyConfig.cs @@ -1,52 +1,47 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// /// Cluster HTTP proxy configuration. /// - public partial class ManagedClusterHTTPProxyConfig + public partial class ManagedClusterHttpProxyConfig { /// - /// Initializes a new instance of the ManagedClusterHTTPProxyConfig - /// class. + /// Initializes a new instance of the ManagedClusterHttpProxyConfig class. /// - public ManagedClusterHTTPProxyConfig() + public ManagedClusterHttpProxyConfig() { CustomInit(); } /// - /// Initializes a new instance of the ManagedClusterHTTPProxyConfig - /// class. + /// Initializes a new instance of the ManagedClusterHttpProxyConfig class. /// - /// The HTTP proxy server endpoint to - /// use. - /// The HTTPS proxy server endpoint to - /// use. - /// The endpoints that should not go through - /// proxy. - /// Alternative CA cert to use for connecting - /// to proxy servers. - public ManagedClusterHTTPProxyConfig(string httpProxy = default(string), string httpsProxy = default(string), IList noProxy = default(IList), string trustedCa = default(string)) + + /// The HTTP proxy server endpoint to use. + /// + + /// The HTTPS proxy server endpoint to use. + /// + + /// The endpoints that should not go through proxy. + /// + + /// Alternative CA cert to use for connecting to proxy servers. + /// + public ManagedClusterHttpProxyConfig(string httpProxy = default(string), string httpsProxy = default(string), System.Collections.Generic.IList noProxy = default(System.Collections.Generic.IList), string trustedCa = default(string)) + { - HttpProxy = httpProxy; - HttpsProxy = httpsProxy; - NoProxy = noProxy; - TrustedCa = trustedCa; + this.HttpProxy = httpProxy; + this.HttpsProxy = httpsProxy; + this.NoProxy = noProxy; + this.TrustedCa = trustedCa; CustomInit(); } @@ -55,30 +50,29 @@ public ManagedClusterHTTPProxyConfig() /// partial void CustomInit(); + /// /// Gets or sets the HTTP proxy server endpoint to use. /// - [JsonProperty(PropertyName = "httpProxy")] - public string HttpProxy { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "httpProxy")] + public string HttpProxy {get; set; } /// /// Gets or sets the HTTPS proxy server endpoint to use. /// - [JsonProperty(PropertyName = "httpsProxy")] - public string HttpsProxy { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "httpsProxy")] + public string HttpsProxy {get; set; } /// /// Gets or sets the endpoints that should not go through proxy. /// - [JsonProperty(PropertyName = "noProxy")] - public IList NoProxy { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "noProxy")] + public System.Collections.Generic.IList NoProxy {get; set; } /// - /// Gets or sets alternative CA cert to use for connecting to proxy - /// servers. + /// Gets or sets alternative CA cert to use for connecting to proxy servers. /// - [JsonProperty(PropertyName = "trustedCa")] - public string TrustedCa { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "trustedCa")] + public string TrustedCa {get; set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterIdentity.cs b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterIdentity.cs index 7bae746a9246..3617f6b79388 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterIdentity.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterIdentity.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,21 +23,29 @@ public ManagedClusterIdentity() /// /// Initializes a new instance of the ManagedClusterIdentity class. /// - /// The principal id of the system assigned - /// identity which is used by master components. - /// The tenant id of the system assigned - /// identity which is used by master components. - /// The type of identity used for the managed - /// cluster. - /// The user identity associated - /// with the managed cluster. This identity will be used in control - /// plane. Only one user assigned identity is allowed. - public ManagedClusterIdentity(string principalId = default(string), string tenantId = default(string), ResourceIdentityType? type = default(ResourceIdentityType?), IDictionary userAssignedIdentities = default(IDictionary)) + + /// The principal id of the system assigned identity which is used by master + /// components. + /// + + /// The tenant id of the system assigned identity which is used by master + /// components. + /// + + /// For more information see [use managed identities in + /// AKS](https://docs.microsoft.com/azure/aks/use-managed-identity). + /// Possible values include: 'SystemAssigned', 'UserAssigned', 'None' + + /// The keys must be ARM resource IDs in the form: + /// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + /// + public ManagedClusterIdentity(string principalId = default(string), string tenantId = default(string), ResourceIdentityType? type = default(ResourceIdentityType?), System.Collections.Generic.IDictionary userAssignedIdentities = default(System.Collections.Generic.IDictionary)) + { - PrincipalId = principalId; - TenantId = tenantId; - Type = type; - UserAssignedIdentities = userAssignedIdentities; + this.PrincipalId = principalId; + this.TenantId = tenantId; + this.Type = type; + this.UserAssignedIdentities = userAssignedIdentities; CustomInit(); } @@ -54,42 +54,33 @@ public ManagedClusterIdentity() /// partial void CustomInit(); - /// - /// Gets the principal id of the system assigned identity which is used - /// by master components. - /// - [JsonProperty(PropertyName = "principalId")] - public string PrincipalId { get; private set; } /// - /// Gets the tenant id of the system assigned identity which is used by + /// Gets the principal id of the system assigned identity which is used by /// master components. /// - [JsonProperty(PropertyName = "tenantId")] - public string TenantId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "principalId")] + public string PrincipalId {get; private set; } /// - /// Gets or sets the type of identity used for the managed cluster. + /// Gets the tenant id of the system assigned identity which is used by master + /// components. /// - /// - /// For more information see [use managed identities in - /// AKS](https://docs.microsoft.com/azure/aks/use-managed-identity). - /// Possible values include: 'SystemAssigned', 'UserAssigned', 'None' - /// - [JsonProperty(PropertyName = "type")] - public ResourceIdentityType? Type { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "tenantId")] + public string TenantId {get; private set; } /// - /// Gets or sets the user identity associated with the managed cluster. - /// This identity will be used in control plane. Only one user assigned - /// identity is allowed. + /// Gets or sets for more information see [use managed identities in + /// AKS](https://docs.microsoft.com/azure/aks/use-managed-identity). Possible values include: 'SystemAssigned', 'UserAssigned', 'None' /// - /// - /// The keys must be ARM resource IDs in the form: - /// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. - /// - [JsonProperty(PropertyName = "userAssignedIdentities")] - public IDictionary UserAssignedIdentities { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public ResourceIdentityType? Type {get; set; } + /// + /// Gets or sets the keys must be ARM resource IDs in the form: + /// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "userAssignedIdentities")] + public System.Collections.Generic.IDictionary UserAssignedIdentities {get; set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterLoadBalancerProfile.cs b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterLoadBalancerProfile.cs index 8ce7b47f56ee..ad4cab39456e 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterLoadBalancerProfile.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterLoadBalancerProfile.cs @@ -1,19 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -22,8 +13,7 @@ namespace Microsoft.Azure.Management.ContainerService.Models public partial class ManagedClusterLoadBalancerProfile { /// - /// Initializes a new instance of the ManagedClusterLoadBalancerProfile - /// class. + /// Initializes a new instance of the ManagedClusterLoadBalancerProfile class. /// public ManagedClusterLoadBalancerProfile() { @@ -31,35 +21,42 @@ public ManagedClusterLoadBalancerProfile() } /// - /// Initializes a new instance of the ManagedClusterLoadBalancerProfile - /// class. + /// Initializes a new instance of the ManagedClusterLoadBalancerProfile class. /// - /// Desired managed outbound IPs for - /// the cluster load balancer. - /// Desired outbound IP Prefix - /// resources for the cluster load balancer. - /// Desired outbound IP resources for the - /// cluster load balancer. - /// The effective outbound IP - /// resources of the cluster load balancer. - /// The desired number of - /// allocated SNAT ports per VM. Allowed values are in the range of 0 - /// to 64000 (inclusive). The default value is 0 which results in Azure - /// dynamically allocating ports. - /// Desired outbound flow idle - /// timeout in minutes. Allowed values are in the range of 4 to 120 - /// (inclusive). The default value is 30 minutes. - /// Enable multiple - /// standard load balancers per AKS cluster or not. - public ManagedClusterLoadBalancerProfile(ManagedClusterLoadBalancerProfileManagedOutboundIPs managedOutboundIPs = default(ManagedClusterLoadBalancerProfileManagedOutboundIPs), ManagedClusterLoadBalancerProfileOutboundIPPrefixes outboundIPPrefixes = default(ManagedClusterLoadBalancerProfileOutboundIPPrefixes), ManagedClusterLoadBalancerProfileOutboundIPs outboundIPs = default(ManagedClusterLoadBalancerProfileOutboundIPs), IList effectiveOutboundIPs = default(IList), int? allocatedOutboundPorts = default(int?), int? idleTimeoutInMinutes = default(int?), bool? enableMultipleStandardLoadBalancers = default(bool?)) + + /// Desired managed outbound IPs for the cluster load balancer. + /// + + /// Desired outbound IP Prefix resources for the cluster load balancer. + /// + + /// Desired outbound IP resources for the cluster load balancer. + /// + + /// The effective outbound IP resources of the cluster load balancer. + /// + + /// The desired number of allocated SNAT ports per VM. Allowed values are in + /// the range of 0 to 64000 (inclusive). The default value is 0 which results + /// in Azure dynamically allocating ports. + /// + + /// Desired outbound flow idle timeout in minutes. Allowed values are in the + /// range of 4 to 120 (inclusive). The default value is 30 minutes. + /// + + /// Enable multiple standard load balancers per AKS cluster or not. + /// + public ManagedClusterLoadBalancerProfile(ManagedClusterLoadBalancerProfileManagedOutboundIPs managedOutboundIPs = default(ManagedClusterLoadBalancerProfileManagedOutboundIPs), ManagedClusterLoadBalancerProfileOutboundIPPrefixes outboundIPPrefixes = default(ManagedClusterLoadBalancerProfileOutboundIPPrefixes), ManagedClusterLoadBalancerProfileOutboundIPs outboundIPs = default(ManagedClusterLoadBalancerProfileOutboundIPs), System.Collections.Generic.IList effectiveOutboundIPs = default(System.Collections.Generic.IList), int? allocatedOutboundPorts = default(int?), int? idleTimeoutInMinutes = default(int?), bool? enableMultipleStandardLoadBalancers = default(bool?)) + { - ManagedOutboundIPs = managedOutboundIPs; - OutboundIPPrefixes = outboundIPPrefixes; - OutboundIPs = outboundIPs; - EffectiveOutboundIPs = effectiveOutboundIPs; - AllocatedOutboundPorts = allocatedOutboundPorts; - IdleTimeoutInMinutes = idleTimeoutInMinutes; - EnableMultipleStandardLoadBalancers = enableMultipleStandardLoadBalancers; + this.ManagedOutboundIPs = managedOutboundIPs; + this.OutboundIPPrefixes = outboundIPPrefixes; + this.OutboundIPs = outboundIPs; + this.EffectiveOutboundIPs = effectiveOutboundIPs; + this.AllocatedOutboundPorts = allocatedOutboundPorts; + this.IdleTimeoutInMinutes = idleTimeoutInMinutes; + this.EnableMultipleStandardLoadBalancers = enableMultipleStandardLoadBalancers; CustomInit(); } @@ -68,92 +65,91 @@ public ManagedClusterLoadBalancerProfile() /// partial void CustomInit(); - /// - /// Gets or sets desired managed outbound IPs for the cluster load - /// balancer. - /// - [JsonProperty(PropertyName = "managedOutboundIPs")] - public ManagedClusterLoadBalancerProfileManagedOutboundIPs ManagedOutboundIPs { get; set; } /// - /// Gets or sets desired outbound IP Prefix resources for the cluster - /// load balancer. + /// Gets or sets desired managed outbound IPs for the cluster load balancer. /// - [JsonProperty(PropertyName = "outboundIPPrefixes")] - public ManagedClusterLoadBalancerProfileOutboundIPPrefixes OutboundIPPrefixes { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "managedOutboundIPs")] + public ManagedClusterLoadBalancerProfileManagedOutboundIPs ManagedOutboundIPs {get; set; } /// - /// Gets or sets desired outbound IP resources for the cluster load + /// Gets or sets desired outbound IP Prefix resources for the cluster load /// balancer. /// - [JsonProperty(PropertyName = "outboundIPs")] - public ManagedClusterLoadBalancerProfileOutboundIPs OutboundIPs { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "outboundIPPrefixes")] + public ManagedClusterLoadBalancerProfileOutboundIPPrefixes OutboundIPPrefixes {get; set; } /// - /// Gets or sets the effective outbound IP resources of the cluster - /// load balancer. + /// Gets or sets desired outbound IP resources for the cluster load balancer. /// - [JsonProperty(PropertyName = "effectiveOutboundIPs")] - public IList EffectiveOutboundIPs { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "outboundIPs")] + public ManagedClusterLoadBalancerProfileOutboundIPs OutboundIPs {get; set; } /// - /// Gets or sets the desired number of allocated SNAT ports per VM. - /// Allowed values are in the range of 0 to 64000 (inclusive). The - /// default value is 0 which results in Azure dynamically allocating - /// ports. + /// Gets or sets the effective outbound IP resources of the cluster load + /// balancer. /// - [JsonProperty(PropertyName = "allocatedOutboundPorts")] - public int? AllocatedOutboundPorts { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "effectiveOutboundIPs")] + public System.Collections.Generic.IList EffectiveOutboundIPs {get; set; } /// - /// Gets or sets desired outbound flow idle timeout in minutes. Allowed - /// values are in the range of 4 to 120 (inclusive). The default value - /// is 30 minutes. + /// Gets or sets the desired number of allocated SNAT ports per VM. Allowed + /// values are in the range of 0 to 64000 (inclusive). The default value is 0 + /// which results in Azure dynamically allocating ports. /// - [JsonProperty(PropertyName = "idleTimeoutInMinutes")] - public int? IdleTimeoutInMinutes { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "allocatedOutboundPorts")] + public int? AllocatedOutboundPorts {get; set; } /// - /// Gets or sets enable multiple standard load balancers per AKS - /// cluster or not. + /// Gets or sets desired outbound flow idle timeout in minutes. Allowed values + /// are in the range of 4 to 120 (inclusive). The default value is 30 minutes. /// - [JsonProperty(PropertyName = "enableMultipleStandardLoadBalancers")] - public bool? EnableMultipleStandardLoadBalancers { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "idleTimeoutInMinutes")] + public int? IdleTimeoutInMinutes {get; set; } + /// + /// Gets or sets enable multiple standard load balancers per AKS cluster or + /// not. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "enableMultipleStandardLoadBalancers")] + public bool? EnableMultipleStandardLoadBalancers {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (ManagedOutboundIPs != null) + if (this.ManagedOutboundIPs != null) { - ManagedOutboundIPs.Validate(); + this.ManagedOutboundIPs.Validate(); } - if (AllocatedOutboundPorts != null) + + + + if (this.AllocatedOutboundPorts != null) { - if (AllocatedOutboundPorts > 64000) + if (this.AllocatedOutboundPorts > 64000) { - throw new ValidationException(ValidationRules.InclusiveMaximum, "AllocatedOutboundPorts", 64000); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.InclusiveMaximum, "AllocatedOutboundPorts", 64000); } - if (AllocatedOutboundPorts < 0) + if (this.AllocatedOutboundPorts < 0) { - throw new ValidationException(ValidationRules.InclusiveMinimum, "AllocatedOutboundPorts", 0); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.InclusiveMinimum, "AllocatedOutboundPorts", 0); } } - if (IdleTimeoutInMinutes != null) + if (this.IdleTimeoutInMinutes != null) { - if (IdleTimeoutInMinutes > 120) + if (this.IdleTimeoutInMinutes > 120) { - throw new ValidationException(ValidationRules.InclusiveMaximum, "IdleTimeoutInMinutes", 120); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.InclusiveMaximum, "IdleTimeoutInMinutes", 120); } - if (IdleTimeoutInMinutes < 4) + if (this.IdleTimeoutInMinutes < 4) { - throw new ValidationException(ValidationRules.InclusiveMinimum, "IdleTimeoutInMinutes", 4); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.InclusiveMinimum, "IdleTimeoutInMinutes", 4); } } } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterLoadBalancerProfileManagedOutboundIPs.cs b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterLoadBalancerProfileManagedOutboundIPs.cs index 3752a0af112c..b867e7889afa 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterLoadBalancerProfileManagedOutboundIPs.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterLoadBalancerProfileManagedOutboundIPs.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +13,7 @@ namespace Microsoft.Azure.Management.ContainerService.Models public partial class ManagedClusterLoadBalancerProfileManagedOutboundIPs { /// - /// Initializes a new instance of the - /// ManagedClusterLoadBalancerProfileManagedOutboundIPs class. + /// Initializes a new instance of the ManagedClusterLoadBalancerProfileManagedOutboundIPs class. /// public ManagedClusterLoadBalancerProfileManagedOutboundIPs() { @@ -29,21 +21,23 @@ public ManagedClusterLoadBalancerProfileManagedOutboundIPs() } /// - /// Initializes a new instance of the - /// ManagedClusterLoadBalancerProfileManagedOutboundIPs class. + /// Initializes a new instance of the ManagedClusterLoadBalancerProfileManagedOutboundIPs class. /// - /// The desired number of IPv4 outbound IPs - /// created/managed by Azure for the cluster load balancer. Allowed - /// values must be in the range of 1 to 100 (inclusive). The default - /// value is 1. - /// The desired number of IPv6 outbound IPs - /// created/managed by Azure for the cluster load balancer. Allowed - /// values must be in the range of 1 to 100 (inclusive). The default - /// value is 0 for single-stack and 1 for dual-stack. + + /// The desired number of IPv4 outbound IPs created/managed by Azure for the + /// cluster load balancer. Allowed values must be in the range of 1 to 100 + /// (inclusive). The default value is 1. + /// + + /// The desired number of IPv6 outbound IPs created/managed by Azure for the + /// cluster load balancer. Allowed values must be in the range of 1 to 100 + /// (inclusive). The default value is 0 for single-stack and 1 for dual-stack. + /// public ManagedClusterLoadBalancerProfileManagedOutboundIPs(int? count = default(int?), int? countIPv6 = default(int?)) + { - Count = count; - CountIPv6 = countIPv6; + this.Count = count; + this.CountIPv6 = countIPv6; CustomInit(); } @@ -52,54 +46,53 @@ public ManagedClusterLoadBalancerProfileManagedOutboundIPs() /// partial void CustomInit(); + /// - /// Gets or sets the desired number of IPv4 outbound IPs - /// created/managed by Azure for the cluster load balancer. Allowed - /// values must be in the range of 1 to 100 (inclusive). The default - /// value is 1. + /// Gets or sets the desired number of IPv4 outbound IPs created/managed by + /// Azure for the cluster load balancer. Allowed values must be in the range of + /// 1 to 100 (inclusive). The default value is 1. /// - [JsonProperty(PropertyName = "count")] - public int? Count { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "count")] + public int? Count {get; set; } /// - /// Gets or sets the desired number of IPv6 outbound IPs - /// created/managed by Azure for the cluster load balancer. Allowed - /// values must be in the range of 1 to 100 (inclusive). The default - /// value is 0 for single-stack and 1 for dual-stack. + /// Gets or sets the desired number of IPv6 outbound IPs created/managed by + /// Azure for the cluster load balancer. Allowed values must be in the range of + /// 1 to 100 (inclusive). The default value is 0 for single-stack and 1 for + /// dual-stack. /// - [JsonProperty(PropertyName = "countIPv6")] - public int? CountIPv6 { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "countIPv6")] + public int? CountIPv6 {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (Count != null) + if (this.Count != null) { - if (Count > 100) + if (this.Count > 100) { - throw new ValidationException(ValidationRules.InclusiveMaximum, "Count", 100); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.InclusiveMaximum, "Count", 100); } - if (Count < 1) + if (this.Count < 1) { - throw new ValidationException(ValidationRules.InclusiveMinimum, "Count", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.InclusiveMinimum, "Count", 1); } } - if (CountIPv6 != null) + if (this.CountIPv6 != null) { - if (CountIPv6 > 100) + if (this.CountIPv6 > 100) { - throw new ValidationException(ValidationRules.InclusiveMaximum, "CountIPv6", 100); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.InclusiveMaximum, "CountIPv6", 100); } - if (CountIPv6 < 0) + if (this.CountIPv6 < 0) { - throw new ValidationException(ValidationRules.InclusiveMinimum, "CountIPv6", 0); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.InclusiveMinimum, "CountIPv6", 0); } } } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterLoadBalancerProfileOutboundIPPrefixes.cs b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterLoadBalancerProfileOutboundIPPrefixes.cs index e4220de6974b..c4e373cfd818 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterLoadBalancerProfileOutboundIPPrefixes.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterLoadBalancerProfileOutboundIPPrefixes.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -21,8 +13,7 @@ namespace Microsoft.Azure.Management.ContainerService.Models public partial class ManagedClusterLoadBalancerProfileOutboundIPPrefixes { /// - /// Initializes a new instance of the - /// ManagedClusterLoadBalancerProfileOutboundIPPrefixes class. + /// Initializes a new instance of the ManagedClusterLoadBalancerProfileOutboundIPPrefixes class. /// public ManagedClusterLoadBalancerProfileOutboundIPPrefixes() { @@ -30,14 +21,15 @@ public ManagedClusterLoadBalancerProfileOutboundIPPrefixes() } /// - /// Initializes a new instance of the - /// ManagedClusterLoadBalancerProfileOutboundIPPrefixes class. + /// Initializes a new instance of the ManagedClusterLoadBalancerProfileOutboundIPPrefixes class. /// - /// A list of public IP prefix - /// resources. - public ManagedClusterLoadBalancerProfileOutboundIPPrefixes(IList publicIPPrefixes = default(IList)) + + /// A list of public IP prefix resources. + /// + public ManagedClusterLoadBalancerProfileOutboundIPPrefixes(System.Collections.Generic.IList publicIPPrefixes = default(System.Collections.Generic.IList)) + { - PublicIPPrefixes = publicIPPrefixes; + this.PublicIPPrefixes = publicIPPrefixes; CustomInit(); } @@ -46,11 +38,11 @@ public ManagedClusterLoadBalancerProfileOutboundIPPrefixes() /// partial void CustomInit(); + /// /// Gets or sets a list of public IP prefix resources. /// - [JsonProperty(PropertyName = "publicIPPrefixes")] - public IList PublicIPPrefixes { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "publicIPPrefixes")] + public System.Collections.Generic.IList PublicIPPrefixes {get; set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterLoadBalancerProfileOutboundIPs.cs b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterLoadBalancerProfileOutboundIPs.cs index 8c6863afa7cb..775bc6d6687f 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterLoadBalancerProfileOutboundIPs.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterLoadBalancerProfileOutboundIPs.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -21,8 +13,7 @@ namespace Microsoft.Azure.Management.ContainerService.Models public partial class ManagedClusterLoadBalancerProfileOutboundIPs { /// - /// Initializes a new instance of the - /// ManagedClusterLoadBalancerProfileOutboundIPs class. + /// Initializes a new instance of the ManagedClusterLoadBalancerProfileOutboundIPs class. /// public ManagedClusterLoadBalancerProfileOutboundIPs() { @@ -30,13 +21,15 @@ public ManagedClusterLoadBalancerProfileOutboundIPs() } /// - /// Initializes a new instance of the - /// ManagedClusterLoadBalancerProfileOutboundIPs class. + /// Initializes a new instance of the ManagedClusterLoadBalancerProfileOutboundIPs class. /// - /// A list of public IP resources. - public ManagedClusterLoadBalancerProfileOutboundIPs(IList publicIPs = default(IList)) + + /// A list of public IP resources. + /// + public ManagedClusterLoadBalancerProfileOutboundIPs(System.Collections.Generic.IList publicIPs = default(System.Collections.Generic.IList)) + { - PublicIPs = publicIPs; + this.PublicIPs = publicIPs; CustomInit(); } @@ -45,11 +38,11 @@ public ManagedClusterLoadBalancerProfileOutboundIPs() /// partial void CustomInit(); + /// /// Gets or sets a list of public IP resources. /// - [JsonProperty(PropertyName = "publicIPs")] - public IList PublicIPs { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "publicIPs")] + public System.Collections.Generic.IList PublicIPs {get; set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterManagedOutboundIPProfile.cs b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterManagedOutboundIPProfile.cs index f3a717cc0b73..90183fd48e9c 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterManagedOutboundIPProfile.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterManagedOutboundIPProfile.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +13,7 @@ namespace Microsoft.Azure.Management.ContainerService.Models public partial class ManagedClusterManagedOutboundIPProfile { /// - /// Initializes a new instance of the - /// ManagedClusterManagedOutboundIPProfile class. + /// Initializes a new instance of the ManagedClusterManagedOutboundIPProfile class. /// public ManagedClusterManagedOutboundIPProfile() { @@ -29,15 +21,16 @@ public ManagedClusterManagedOutboundIPProfile() } /// - /// Initializes a new instance of the - /// ManagedClusterManagedOutboundIPProfile class. + /// Initializes a new instance of the ManagedClusterManagedOutboundIPProfile class. /// - /// The desired number of outbound IPs - /// created/managed by Azure. Allowed values must be in the range of 1 - /// to 16 (inclusive). The default value is 1. + + /// The desired number of outbound IPs created/managed by Azure. Allowed values + /// must be in the range of 1 to 16 (inclusive). The default value is 1. + /// public ManagedClusterManagedOutboundIPProfile(int? count = default(int?)) + { - Count = count; + this.Count = count; CustomInit(); } @@ -46,33 +39,33 @@ public ManagedClusterManagedOutboundIPProfile() /// partial void CustomInit(); + /// - /// Gets or sets the desired number of outbound IPs created/managed by - /// Azure. Allowed values must be in the range of 1 to 16 (inclusive). - /// The default value is 1. + /// Gets or sets the desired number of outbound IPs created/managed by Azure. + /// Allowed values must be in the range of 1 to 16 (inclusive). The default + /// value is 1. /// - [JsonProperty(PropertyName = "count")] - public int? Count { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "count")] + public int? Count {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (Count != null) + if (this.Count != null) { - if (Count > 16) + if (this.Count > 16) { - throw new ValidationException(ValidationRules.InclusiveMaximum, "Count", 16); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.InclusiveMaximum, "Count", 16); } - if (Count < 1) + if (this.Count < 1) { - throw new ValidationException(ValidationRules.InclusiveMinimum, "Count", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.InclusiveMinimum, "Count", 1); } } } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterNATGatewayProfile.cs b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterNATGatewayProfile.cs index 0722d4c83cb3..e22baf4613ed 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterNATGatewayProfile.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterNATGatewayProfile.cs @@ -1,19 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -22,8 +13,7 @@ namespace Microsoft.Azure.Management.ContainerService.Models public partial class ManagedClusterNATGatewayProfile { /// - /// Initializes a new instance of the ManagedClusterNATGatewayProfile - /// class. + /// Initializes a new instance of the ManagedClusterNATGatewayProfile class. /// public ManagedClusterNATGatewayProfile() { @@ -31,21 +21,24 @@ public ManagedClusterNATGatewayProfile() } /// - /// Initializes a new instance of the ManagedClusterNATGatewayProfile - /// class. + /// Initializes a new instance of the ManagedClusterNATGatewayProfile class. /// - /// Profile of the managed - /// outbound IP resources of the cluster NAT gateway. - /// The effective outbound IP - /// resources of the cluster NAT gateway. - /// Desired outbound flow idle - /// timeout in minutes. Allowed values are in the range of 4 to 120 - /// (inclusive). The default value is 4 minutes. - public ManagedClusterNATGatewayProfile(ManagedClusterManagedOutboundIPProfile managedOutboundIPProfile = default(ManagedClusterManagedOutboundIPProfile), IList effectiveOutboundIPs = default(IList), int? idleTimeoutInMinutes = default(int?)) + + /// Profile of the managed outbound IP resources of the cluster NAT gateway. + /// + + /// The effective outbound IP resources of the cluster NAT gateway. + /// + + /// Desired outbound flow idle timeout in minutes. Allowed values are in the + /// range of 4 to 120 (inclusive). The default value is 4 minutes. + /// + public ManagedClusterNATGatewayProfile(ManagedClusterManagedOutboundIPProfile managedOutboundIPProfile = default(ManagedClusterManagedOutboundIPProfile), System.Collections.Generic.IList effectiveOutboundIPs = default(System.Collections.Generic.IList), int? idleTimeoutInMinutes = default(int?)) + { - ManagedOutboundIPProfile = managedOutboundIPProfile; - EffectiveOutboundIPs = effectiveOutboundIPs; - IdleTimeoutInMinutes = idleTimeoutInMinutes; + this.ManagedOutboundIPProfile = managedOutboundIPProfile; + this.EffectiveOutboundIPs = effectiveOutboundIPs; + this.IdleTimeoutInMinutes = idleTimeoutInMinutes; CustomInit(); } @@ -54,51 +47,51 @@ public ManagedClusterNATGatewayProfile() /// partial void CustomInit(); + /// - /// Gets or sets profile of the managed outbound IP resources of the - /// cluster NAT gateway. + /// Gets or sets profile of the managed outbound IP resources of the cluster + /// NAT gateway. /// - [JsonProperty(PropertyName = "managedOutboundIPProfile")] - public ManagedClusterManagedOutboundIPProfile ManagedOutboundIPProfile { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "managedOutboundIPProfile")] + public ManagedClusterManagedOutboundIPProfile ManagedOutboundIPProfile {get; set; } /// /// Gets or sets the effective outbound IP resources of the cluster NAT /// gateway. /// - [JsonProperty(PropertyName = "effectiveOutboundIPs")] - public IList EffectiveOutboundIPs { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "effectiveOutboundIPs")] + public System.Collections.Generic.IList EffectiveOutboundIPs {get; set; } /// - /// Gets or sets desired outbound flow idle timeout in minutes. Allowed - /// values are in the range of 4 to 120 (inclusive). The default value - /// is 4 minutes. + /// Gets or sets desired outbound flow idle timeout in minutes. Allowed values + /// are in the range of 4 to 120 (inclusive). The default value is 4 minutes. /// - [JsonProperty(PropertyName = "idleTimeoutInMinutes")] - public int? IdleTimeoutInMinutes { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "idleTimeoutInMinutes")] + public int? IdleTimeoutInMinutes {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (ManagedOutboundIPProfile != null) + if (this.ManagedOutboundIPProfile != null) { - ManagedOutboundIPProfile.Validate(); + this.ManagedOutboundIPProfile.Validate(); } - if (IdleTimeoutInMinutes != null) + + if (this.IdleTimeoutInMinutes != null) { - if (IdleTimeoutInMinutes > 120) + if (this.IdleTimeoutInMinutes > 120) { - throw new ValidationException(ValidationRules.InclusiveMaximum, "IdleTimeoutInMinutes", 120); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.InclusiveMaximum, "IdleTimeoutInMinutes", 120); } - if (IdleTimeoutInMinutes < 4) + if (this.IdleTimeoutInMinutes < 4) { - throw new ValidationException(ValidationRules.InclusiveMinimum, "IdleTimeoutInMinutes", 4); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.InclusiveMinimum, "IdleTimeoutInMinutes", 4); } } } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterOIDCIssuerProfile.cs b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterOIDCIssuerProfile.cs index 741365683c29..e8afb0cc7f17 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterOIDCIssuerProfile.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterOIDCIssuerProfile.cs @@ -1,43 +1,39 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; using System.Linq; /// /// The OIDC issuer profile of the Managed Cluster. /// - public partial class ManagedClusterOIDCIssuerProfile + public partial class ManagedClusterOidcIssuerProfile { /// - /// Initializes a new instance of the ManagedClusterOIDCIssuerProfile - /// class. + /// Initializes a new instance of the ManagedClusterOidcIssuerProfile class. /// - public ManagedClusterOIDCIssuerProfile() + public ManagedClusterOidcIssuerProfile() { CustomInit(); } /// - /// Initializes a new instance of the ManagedClusterOIDCIssuerProfile - /// class. + /// Initializes a new instance of the ManagedClusterOidcIssuerProfile class. /// - /// The OIDC issuer url of the Managed - /// Cluster. - /// Whether the OIDC issuer is enabled. - public ManagedClusterOIDCIssuerProfile(string issuerURL = default(string), bool? enabled = default(bool?)) + + /// The OIDC issuer url of the Managed Cluster. + /// + + /// Whether the OIDC issuer is enabled. + /// + public ManagedClusterOidcIssuerProfile(string issuerUrl = default(string), bool? enabled = default(bool?)) + { - IssuerURL = issuerURL; - Enabled = enabled; + this.IssuerUrl = issuerUrl; + this.Enabled = enabled; CustomInit(); } @@ -46,17 +42,17 @@ public ManagedClusterOIDCIssuerProfile() /// partial void CustomInit(); + /// /// Gets the OIDC issuer url of the Managed Cluster. /// - [JsonProperty(PropertyName = "issuerURL")] - public string IssuerURL { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "issuerURL")] + public string IssuerUrl {get; private set; } /// /// Gets or sets whether the OIDC issuer is enabled. /// - [JsonProperty(PropertyName = "enabled")] - public bool? Enabled { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "enabled")] + public bool? Enabled {get; set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterPodIdentity.cs b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterPodIdentity.cs index 284a72016422..53f96a388247 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterPodIdentity.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterPodIdentity.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -30,23 +23,34 @@ public ManagedClusterPodIdentity() /// /// Initializes a new instance of the ManagedClusterPodIdentity class. /// - /// The name of the pod identity. - /// The namespace of the pod - /// identity. - /// The user assigned identity details. - /// The binding selector to use for the - /// AzureIdentityBinding resource. - /// The current provisioning state of - /// the pod identity. Possible values include: 'Assigned', 'Canceled', - /// 'Deleting', 'Failed', 'Succeeded', 'Updating' + + /// The name of the pod identity. + /// + + /// The namespace of the pod identity. + /// + + /// The binding selector to use for the AzureIdentityBinding resource. + /// + + /// The user assigned identity details. + /// + + /// The current provisioning state of the pod identity. + /// Possible values include: 'Assigned', 'Canceled', 'Deleting', 'Failed', + /// 'Succeeded', 'Updating' + + /// + /// public ManagedClusterPodIdentity(string name, string namespaceProperty, UserAssignedIdentity identity, string bindingSelector = default(string), string provisioningState = default(string), ManagedClusterPodIdentityProvisioningInfo provisioningInfo = default(ManagedClusterPodIdentityProvisioningInfo)) + { - Name = name; - NamespaceProperty = namespaceProperty; - BindingSelector = bindingSelector; - Identity = identity; - ProvisioningState = provisioningState; - ProvisioningInfo = provisioningInfo; + this.Name = name; + this.NamespaceProperty = namespaceProperty; + this.BindingSelector = bindingSelector; + this.Identity = identity; + this.ProvisioningState = provisioningState; + this.ProvisioningInfo = provisioningInfo; CustomInit(); } @@ -55,64 +59,69 @@ public ManagedClusterPodIdentity() /// partial void CustomInit(); + /// /// Gets or sets the name of the pod identity. /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; set; } /// /// Gets or sets the namespace of the pod identity. /// - [JsonProperty(PropertyName = "namespace")] - public string NamespaceProperty { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "namespace")] + public string NamespaceProperty {get; set; } /// - /// Gets or sets the binding selector to use for the - /// AzureIdentityBinding resource. + /// Gets or sets the binding selector to use for the AzureIdentityBinding + /// resource. /// - [JsonProperty(PropertyName = "bindingSelector")] - public string BindingSelector { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "bindingSelector")] + public string BindingSelector {get; set; } /// /// Gets or sets the user assigned identity details. /// - [JsonProperty(PropertyName = "identity")] - public UserAssignedIdentity Identity { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "identity")] + public UserAssignedIdentity Identity {get; set; } /// - /// Gets the current provisioning state of the pod identity. Possible - /// values include: 'Assigned', 'Canceled', 'Deleting', 'Failed', - /// 'Succeeded', 'Updating' + /// Gets the current provisioning state of the pod identity. Possible values include: 'Assigned', 'Canceled', 'Deleting', 'Failed', 'Succeeded', 'Updating' /// - [JsonProperty(PropertyName = "provisioningState")] - public string ProvisioningState { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "provisioningState")] + public string ProvisioningState {get; private set; } /// + /// Gets /// - [JsonProperty(PropertyName = "provisioningInfo")] - public ManagedClusterPodIdentityProvisioningInfo ProvisioningInfo { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "provisioningInfo")] + public ManagedClusterPodIdentityProvisioningInfo ProvisioningInfo {get; private set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (Name == null) + if (this.Name == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "Name"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Name"); } - if (NamespaceProperty == null) + if (this.NamespaceProperty == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "NamespaceProperty"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "NamespaceProperty"); } - if (Identity == null) + if (this.Identity == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "Identity"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Identity"); } + + + + + + } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterPodIdentityException.cs b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterPodIdentityException.cs index 7aff319f93b7..04915ccef199 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterPodIdentityException.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterPodIdentityException.cs @@ -1,25 +1,16 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// - /// A pod identity exception, which allows pods with certain labels to - /// access the Azure Instance Metadata Service (IMDS) endpoint without - /// being intercepted by the node-managed identity (NMI) server. + /// See [disable AAD Pod Identity for a specific + /// Pod/Application](https://azure.github.io/aad-pod-identity/docs/configure/application_exception/) + /// for more details. /// /// /// See [disable AAD Pod Identity for a specific @@ -29,8 +20,7 @@ namespace Microsoft.Azure.Management.ContainerService.Models public partial class ManagedClusterPodIdentityException { /// - /// Initializes a new instance of the - /// ManagedClusterPodIdentityException class. + /// Initializes a new instance of the ManagedClusterPodIdentityException class. /// public ManagedClusterPodIdentityException() { @@ -38,18 +28,23 @@ public ManagedClusterPodIdentityException() } /// - /// Initializes a new instance of the - /// ManagedClusterPodIdentityException class. + /// Initializes a new instance of the ManagedClusterPodIdentityException class. /// - /// The name of the pod identity exception. - /// The namespace of the pod identity - /// exception. - /// The pod labels to match. - public ManagedClusterPodIdentityException(string name, string namespaceProperty, IDictionary podLabels) + + /// The name of the pod identity exception. + /// + + /// The namespace of the pod identity exception. + /// + + /// The pod labels to match. + /// + public ManagedClusterPodIdentityException(string name, string namespaceProperty, System.Collections.Generic.IDictionary podLabels) + { - Name = name; - NamespaceProperty = namespaceProperty; - PodLabels = podLabels; + this.Name = name; + this.NamespaceProperty = namespaceProperty; + this.PodLabels = podLabels; CustomInit(); } @@ -58,44 +53,47 @@ public ManagedClusterPodIdentityException(string name, string namespaceProperty, /// partial void CustomInit(); + /// /// Gets or sets the name of the pod identity exception. /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; set; } /// /// Gets or sets the namespace of the pod identity exception. /// - [JsonProperty(PropertyName = "namespace")] - public string NamespaceProperty { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "namespace")] + public string NamespaceProperty {get; set; } /// /// Gets or sets the pod labels to match. /// - [JsonProperty(PropertyName = "podLabels")] - public IDictionary PodLabels { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "podLabels")] + public System.Collections.Generic.IDictionary PodLabels {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (Name == null) + if (this.Name == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "Name"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Name"); } - if (NamespaceProperty == null) + if (this.NamespaceProperty == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "NamespaceProperty"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "NamespaceProperty"); } - if (PodLabels == null) + if (this.PodLabels == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "PodLabels"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "PodLabels"); } + + + } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterPodIdentityProfile.cs b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterPodIdentityProfile.cs index a2439ec7389c..8f2040a93e19 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterPodIdentityProfile.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterPodIdentityProfile.cs @@ -1,22 +1,16 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// - /// The pod identity profile of the Managed Cluster. + /// See [use AAD pod + /// identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity) + /// for more details on pod identity integration. /// /// /// See [use AAD pod @@ -26,8 +20,7 @@ namespace Microsoft.Azure.Management.ContainerService.Models public partial class ManagedClusterPodIdentityProfile { /// - /// Initializes a new instance of the ManagedClusterPodIdentityProfile - /// class. + /// Initializes a new instance of the ManagedClusterPodIdentityProfile class. /// public ManagedClusterPodIdentityProfile() { @@ -35,23 +28,31 @@ public ManagedClusterPodIdentityProfile() } /// - /// Initializes a new instance of the ManagedClusterPodIdentityProfile - /// class. + /// Initializes a new instance of the ManagedClusterPodIdentityProfile class. /// - /// Whether the pod identity addon is - /// enabled. - /// Whether pod identity is - /// allowed to run on clusters with Kubenet networking. - /// The pod identities to use in - /// the cluster. - /// The pod identity - /// exceptions to allow. - public ManagedClusterPodIdentityProfile(bool? enabled = default(bool?), bool? allowNetworkPluginKubenet = default(bool?), IList userAssignedIdentities = default(IList), IList userAssignedIdentityExceptions = default(IList)) + + /// Whether the pod identity addon is enabled. + /// + + /// Running in Kubenet is disabled by default due to the security related + /// nature of AAD Pod Identity and the risks of IP spoofing. See [using Kubenet + /// network plugin with AAD Pod + /// Identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity#using-kubenet-network-plugin-with-azure-active-directory-pod-managed-identities) + /// for more information. + /// + + /// The pod identities to use in the cluster. + /// + + /// The pod identity exceptions to allow. + /// + public ManagedClusterPodIdentityProfile(bool? enabled = default(bool?), bool? allowNetworkPluginKubenet = default(bool?), System.Collections.Generic.IList userAssignedIdentities = default(System.Collections.Generic.IList), System.Collections.Generic.IList userAssignedIdentityExceptions = default(System.Collections.Generic.IList)) + { - Enabled = enabled; - AllowNetworkPluginKubenet = allowNetworkPluginKubenet; - UserAssignedIdentities = userAssignedIdentities; - UserAssignedIdentityExceptions = userAssignedIdentityExceptions; + this.Enabled = enabled; + this.AllowNetworkPluginKubenet = allowNetworkPluginKubenet; + this.UserAssignedIdentities = userAssignedIdentities; + this.UserAssignedIdentityExceptions = userAssignedIdentityExceptions; CustomInit(); } @@ -60,37 +61,33 @@ public ManagedClusterPodIdentityProfile() /// partial void CustomInit(); + /// /// Gets or sets whether the pod identity addon is enabled. /// - [JsonProperty(PropertyName = "enabled")] - public bool? Enabled { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "enabled")] + public bool? Enabled {get; set; } /// - /// Gets or sets whether pod identity is allowed to run on clusters - /// with Kubenet networking. - /// - /// - /// Running in Kubenet is disabled by default due to the security - /// related nature of AAD Pod Identity and the risks of IP spoofing. - /// See [using Kubenet network plugin with AAD Pod + /// Gets or sets running in Kubenet is disabled by default due to the security + /// related nature of AAD Pod Identity and the risks of IP spoofing. See [using + /// Kubenet network plugin with AAD Pod /// Identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity#using-kubenet-network-plugin-with-azure-active-directory-pod-managed-identities) /// for more information. - /// - [JsonProperty(PropertyName = "allowNetworkPluginKubenet")] - public bool? AllowNetworkPluginKubenet { get; set; } + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "allowNetworkPluginKubenet")] + public bool? AllowNetworkPluginKubenet {get; set; } /// /// Gets or sets the pod identities to use in the cluster. /// - [JsonProperty(PropertyName = "userAssignedIdentities")] - public IList UserAssignedIdentities { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "userAssignedIdentities")] + public System.Collections.Generic.IList UserAssignedIdentities {get; set; } /// /// Gets or sets the pod identity exceptions to allow. /// - [JsonProperty(PropertyName = "userAssignedIdentityExceptions")] - public IList UserAssignedIdentityExceptions { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "userAssignedIdentityExceptions")] + public System.Collections.Generic.IList UserAssignedIdentityExceptions {get; set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterPodIdentityProvisioningError.cs b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterPodIdentityProvisioningError.cs index 7bbe043394ce..2fa5d86e21c9 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterPodIdentityProvisioningError.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterPodIdentityProvisioningError.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.ContainerService.Models public partial class ManagedClusterPodIdentityProvisioningError { /// - /// Initializes a new instance of the - /// ManagedClusterPodIdentityProvisioningError class. + /// Initializes a new instance of the ManagedClusterPodIdentityProvisioningError class. /// public ManagedClusterPodIdentityProvisioningError() { @@ -28,13 +21,15 @@ public ManagedClusterPodIdentityProvisioningError() } /// - /// Initializes a new instance of the - /// ManagedClusterPodIdentityProvisioningError class. + /// Initializes a new instance of the ManagedClusterPodIdentityProvisioningError class. /// - /// Details about the error. + + /// Details about the error. + /// public ManagedClusterPodIdentityProvisioningError(ManagedClusterPodIdentityProvisioningErrorBody error = default(ManagedClusterPodIdentityProvisioningErrorBody)) + { - Error = error; + this.Error = error; CustomInit(); } @@ -43,11 +38,11 @@ public ManagedClusterPodIdentityProvisioningError() /// partial void CustomInit(); + /// /// Gets or sets details about the error. /// - [JsonProperty(PropertyName = "error")] - public ManagedClusterPodIdentityProvisioningErrorBody Error { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "error")] + public ManagedClusterPodIdentityProvisioningErrorBody Error {get; set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterPodIdentityProvisioningErrorBody.cs b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterPodIdentityProvisioningErrorBody.cs index 5f430c688c7e..a52de3b51a6b 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterPodIdentityProvisioningErrorBody.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterPodIdentityProvisioningErrorBody.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -21,8 +13,7 @@ namespace Microsoft.Azure.Management.ContainerService.Models public partial class ManagedClusterPodIdentityProvisioningErrorBody { /// - /// Initializes a new instance of the - /// ManagedClusterPodIdentityProvisioningErrorBody class. + /// Initializes a new instance of the ManagedClusterPodIdentityProvisioningErrorBody class. /// public ManagedClusterPodIdentityProvisioningErrorBody() { @@ -30,23 +21,30 @@ public ManagedClusterPodIdentityProvisioningErrorBody() } /// - /// Initializes a new instance of the - /// ManagedClusterPodIdentityProvisioningErrorBody class. + /// Initializes a new instance of the ManagedClusterPodIdentityProvisioningErrorBody class. /// - /// An identifier for the error. Codes are invariant - /// and are intended to be consumed programmatically. - /// A message describing the error, intended to - /// be suitable for display in a user interface. - /// The target of the particular error. For - /// example, the name of the property in error. - /// A list of additional details about the - /// error. - public ManagedClusterPodIdentityProvisioningErrorBody(string code = default(string), string message = default(string), string target = default(string), IList details = default(IList)) + + /// An identifier for the error. Codes are invariant and are intended to be + /// consumed programmatically. + /// + + /// A message describing the error, intended to be suitable for display in a + /// user interface. + /// + + /// The target of the particular error. For example, the name of the property + /// in error. + /// + + /// A list of additional details about the error. + /// + public ManagedClusterPodIdentityProvisioningErrorBody(string code = default(string), string message = default(string), string target = default(string), System.Collections.Generic.IList details = default(System.Collections.Generic.IList)) + { - Code = code; - Message = message; - Target = target; - Details = details; + this.Code = code; + this.Message = message; + this.Target = target; + this.Details = details; CustomInit(); } @@ -55,32 +53,32 @@ public ManagedClusterPodIdentityProvisioningErrorBody() /// partial void CustomInit(); + /// - /// Gets or sets an identifier for the error. Codes are invariant and - /// are intended to be consumed programmatically. + /// Gets or sets an identifier for the error. Codes are invariant and are + /// intended to be consumed programmatically. /// - [JsonProperty(PropertyName = "code")] - public string Code { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "code")] + public string Code {get; set; } /// - /// Gets or sets a message describing the error, intended to be - /// suitable for display in a user interface. + /// Gets or sets a message describing the error, intended to be suitable for + /// display in a user interface. /// - [JsonProperty(PropertyName = "message")] - public string Message { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "message")] + public string Message {get; set; } /// - /// Gets or sets the target of the particular error. For example, the - /// name of the property in error. + /// Gets or sets the target of the particular error. For example, the name of + /// the property in error. /// - [JsonProperty(PropertyName = "target")] - public string Target { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "target")] + public string Target {get; set; } /// /// Gets or sets a list of additional details about the error. /// - [JsonProperty(PropertyName = "details")] - public IList Details { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "details")] + public System.Collections.Generic.IList Details {get; set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterPodIdentityProvisioningInfo.cs b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterPodIdentityProvisioningInfo.cs index 2f1379c148e9..0f37a10d0377 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterPodIdentityProvisioningInfo.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterPodIdentityProvisioningInfo.cs @@ -1,23 +1,16 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; using System.Linq; public partial class ManagedClusterPodIdentityProvisioningInfo { /// - /// Initializes a new instance of the - /// ManagedClusterPodIdentityProvisioningInfo class. + /// Initializes a new instance of the ManagedClusterPodIdentityProvisioningInfo class. /// public ManagedClusterPodIdentityProvisioningInfo() { @@ -25,13 +18,15 @@ public ManagedClusterPodIdentityProvisioningInfo() } /// - /// Initializes a new instance of the - /// ManagedClusterPodIdentityProvisioningInfo class. + /// Initializes a new instance of the ManagedClusterPodIdentityProvisioningInfo class. /// - /// Pod identity assignment error (if any). + + /// Pod identity assignment error (if any). + /// public ManagedClusterPodIdentityProvisioningInfo(ManagedClusterPodIdentityProvisioningError error = default(ManagedClusterPodIdentityProvisioningError)) + { - Error = error; + this.Error = error; CustomInit(); } @@ -40,11 +35,11 @@ public ManagedClusterPodIdentityProvisioningInfo() /// partial void CustomInit(); + /// /// Gets or sets pod identity assignment error (if any). /// - [JsonProperty(PropertyName = "error")] - public ManagedClusterPodIdentityProvisioningError Error { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "error")] + public ManagedClusterPodIdentityProvisioningError Error {get; set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterPodIdentityProvisioningState.cs b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterPodIdentityProvisioningState.cs index a91eca044440..4b83f4d11c53 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterPodIdentityProvisioningState.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterPodIdentityProvisioningState.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.ContainerService.Models /// /// Defines values for ManagedClusterPodIdentityProvisioningState. /// + + public static class ManagedClusterPodIdentityProvisioningState { public const string Assigned = "Assigned"; @@ -23,4 +20,4 @@ public static class ManagedClusterPodIdentityProvisioningState public const string Succeeded = "Succeeded"; public const string Updating = "Updating"; } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterPoolUpgradeProfile.cs b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterPoolUpgradeProfile.cs index fa395bb79744..c4de64e0871a 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterPoolUpgradeProfile.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterPoolUpgradeProfile.cs @@ -1,19 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -22,8 +13,7 @@ namespace Microsoft.Azure.Management.ContainerService.Models public partial class ManagedClusterPoolUpgradeProfile { /// - /// Initializes a new instance of the ManagedClusterPoolUpgradeProfile - /// class. + /// Initializes a new instance of the ManagedClusterPoolUpgradeProfile class. /// public ManagedClusterPoolUpgradeProfile() { @@ -31,22 +21,27 @@ public ManagedClusterPoolUpgradeProfile() } /// - /// Initializes a new instance of the ManagedClusterPoolUpgradeProfile - /// class. + /// Initializes a new instance of the ManagedClusterPoolUpgradeProfile class. /// - /// The Kubernetes version - /// (major.minor.patch). - /// Possible values include: 'Linux', - /// 'Windows' - /// The Agent Pool name. - /// List of orchestrator types and versions - /// available for upgrade. - public ManagedClusterPoolUpgradeProfile(string kubernetesVersion, string osType, string name = default(string), IList upgrades = default(IList)) + + /// The Kubernetes version (major.minor.patch). + /// + + /// The Agent Pool name. + /// + + /// The operating system type. The default is Linux. + /// Possible values include: 'Linux', 'Windows' + + /// List of orchestrator types and versions available for upgrade. + /// + public ManagedClusterPoolUpgradeProfile(string kubernetesVersion, string osType, string name = default(string), System.Collections.Generic.IList upgrades = default(System.Collections.Generic.IList)) + { - KubernetesVersion = kubernetesVersion; - Name = name; - OsType = osType; - Upgrades = upgrades; + this.KubernetesVersion = kubernetesVersion; + this.Name = name; + this.OSType = osType; + this.Upgrades = upgrades; CustomInit(); } @@ -55,47 +50,50 @@ public ManagedClusterPoolUpgradeProfile() /// partial void CustomInit(); + /// /// Gets or sets the Kubernetes version (major.minor.patch). /// - [JsonProperty(PropertyName = "kubernetesVersion")] - public string KubernetesVersion { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "kubernetesVersion")] + public string KubernetesVersion {get; set; } /// /// Gets or sets the Agent Pool name. /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; set; } /// - /// Gets or sets possible values include: 'Linux', 'Windows' + /// Gets or sets the operating system type. The default is Linux. Possible values include: 'Linux', 'Windows' /// - [JsonProperty(PropertyName = "osType")] - public string OsType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "osType")] + public string OSType {get; set; } /// - /// Gets or sets list of orchestrator types and versions available for - /// upgrade. + /// Gets or sets list of orchestrator types and versions available for upgrade. /// - [JsonProperty(PropertyName = "upgrades")] - public IList Upgrades { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "upgrades")] + public System.Collections.Generic.IList Upgrades {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (KubernetesVersion == null) + if (this.KubernetesVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "KubernetesVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "KubernetesVersion"); } - if (OsType == null) + if (this.OSType == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "OsType"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "OSType"); } + + + + } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterPoolUpgradeProfileUpgradesItem.cs b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterPoolUpgradeProfileUpgradesItem.cs index 303ee0f5c66e..4bbdb82a596b 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterPoolUpgradeProfileUpgradesItem.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterPoolUpgradeProfileUpgradesItem.cs @@ -1,23 +1,16 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; using System.Linq; public partial class ManagedClusterPoolUpgradeProfileUpgradesItem { /// - /// Initializes a new instance of the - /// ManagedClusterPoolUpgradeProfileUpgradesItem class. + /// Initializes a new instance of the ManagedClusterPoolUpgradeProfileUpgradesItem class. /// public ManagedClusterPoolUpgradeProfileUpgradesItem() { @@ -25,17 +18,19 @@ public ManagedClusterPoolUpgradeProfileUpgradesItem() } /// - /// Initializes a new instance of the - /// ManagedClusterPoolUpgradeProfileUpgradesItem class. + /// Initializes a new instance of the ManagedClusterPoolUpgradeProfileUpgradesItem class. /// - /// The Kubernetes version - /// (major.minor.patch). - /// Whether the Kubernetes version is currently - /// in preview. + + /// The Kubernetes version (major.minor.patch). + /// + + /// Whether the Kubernetes version is currently in preview. + /// public ManagedClusterPoolUpgradeProfileUpgradesItem(string kubernetesVersion = default(string), bool? isPreview = default(bool?)) + { - KubernetesVersion = kubernetesVersion; - IsPreview = isPreview; + this.KubernetesVersion = kubernetesVersion; + this.IsPreview = isPreview; CustomInit(); } @@ -44,18 +39,17 @@ public ManagedClusterPoolUpgradeProfileUpgradesItem() /// partial void CustomInit(); + /// /// Gets or sets the Kubernetes version (major.minor.patch). /// - [JsonProperty(PropertyName = "kubernetesVersion")] - public string KubernetesVersion { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "kubernetesVersion")] + public string KubernetesVersion {get; set; } /// - /// Gets or sets whether the Kubernetes version is currently in - /// preview. + /// Gets or sets whether the Kubernetes version is currently in preview. /// - [JsonProperty(PropertyName = "isPreview")] - public bool? IsPreview { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "isPreview")] + public bool? IsPreview {get; set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterProperties.cs b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterProperties.cs new file mode 100644 index 000000000000..59ed48e553e5 --- /dev/null +++ b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterProperties.cs @@ -0,0 +1,535 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.ContainerService.Models +{ + using System.Linq; + + /// + /// Properties of the managed cluster. + /// + public partial class ManagedClusterProperties + { + /// + /// Initializes a new instance of the ManagedClusterProperties class. + /// + public ManagedClusterProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ManagedClusterProperties class. + /// + + /// The current provisioning state. + /// + + /// The Power State of the cluster. + /// + + /// The max number of agent pools for the managed cluster. + /// + + /// Both patch version (major.minor.patch) (e.g. 1.20.13) and (major.minor) + /// (e.g. 1.20) are supported. When (major.minor) is specified, the latest + /// supported GA patch version is chosen automatically. Updating the cluster + /// with the same (major.minor) once it has been created (e.g. 1.14.x -) 1.14) + /// will not trigger an upgrade, even if a newer patch version is available. + /// When you upgrade a supported AKS cluster, Kubernetes minor versions cannot + /// be skipped. All upgrades must be performed sequentially by major version + /// number. For example, upgrades between 1.14.x -) 1.15.x or 1.15.x -) 1.16.x + /// are allowed, however 1.14.x -) 1.16.x is not allowed. See [upgrading an AKS + /// cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) for more + /// details. + /// + + /// If kubernetesVersion was a fully specified version (major.minor.patch), + /// this field will be exactly equal to it. If kubernetesVersion was + /// (major.minor), this field will contain the full (major.minor.patch) version + /// being used. + /// + + /// This cannot be updated once the Managed Cluster has been created. + /// + + /// This cannot be updated once the Managed Cluster has been created. + /// + + /// The FQDN of the master pool. + /// + + /// The FQDN of private cluster. + /// + + /// The Azure Portal requires certain Cross-Origin Resource Sharing (CORS) + /// headers to be sent in some responses, which Kubernetes APIServer doesn't + /// handle by default. This special FQDN supports CORS, allowing the Azure + /// Portal to function properly. + /// + + /// The agent pool properties. + /// + + /// The profile for Linux VMs in the Managed Cluster. + /// + + /// The profile for Windows VMs in the Managed Cluster. + /// + + /// Information about a service principal identity for the cluster to use for + /// manipulating Azure APIs. + /// + + /// The profile of managed cluster add-on. + /// + + /// See [use AAD pod + /// identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity) + /// for more details on AAD pod identity integration. + /// + + /// The OIDC issuer profile of the Managed Cluster. + /// + + /// The name of the resource group containing agent pool nodes. + /// + + /// Whether to enable Kubernetes Role-Based Access Control. + /// + + /// The support plan for the Managed Cluster. If unspecified, the default is + /// 'KubernetesOfficial'. + /// Possible values include: 'KubernetesOfficial', 'AKSLongTermSupport' + + /// (DEPRECATED) Whether to enable Kubernetes pod security policy (preview). + /// PodSecurityPolicy was deprecated in Kubernetes v1.21, and removed from + /// Kubernetes in v1.25. Learn more at https://aka.ms/k8s/psp and + /// https://aka.ms/aks/psp. + /// + + /// The network configuration profile. + /// + + /// The Azure Active Directory configuration. + /// + + /// The auto upgrade configuration. + /// + + /// Parameters to be applied to the cluster-autoscaler when enabled + /// + + /// The access profile for managed cluster API server. + /// + + /// This is of the form: + /// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{encryptionSetName}' + /// + + /// Identities associated with the cluster. + /// + + /// Private link resources associated with the cluster. + /// + + /// If set to true, getting static credentials will be disabled for this + /// cluster. This must only be used on Managed Clusters that are AAD enabled. + /// For more details see [disable local + /// accounts](https://docs.microsoft.com/azure/aks/managed-aad#disable-local-accounts-preview). + /// + + /// Configurations for provisioning the cluster with HTTP proxy servers. + /// + + /// Security profile for the managed cluster. + /// + + /// Storage profile for the managed cluster. + /// + + /// Allow or deny public network access for AKS + /// Possible values include: 'Enabled', 'Disabled' + + /// Workload Auto-scaler profile for the managed cluster. + /// + + /// Azure Monitor addon profiles for monitoring the managed cluster. + /// + public ManagedClusterProperties(string provisioningState = default(string), PowerState powerState = default(PowerState), int? maxAgentPools = default(int?), string kubernetesVersion = default(string), string currentKubernetesVersion = default(string), string dnsPrefix = default(string), string fqdnSubdomain = default(string), string fqdn = default(string), string privateFqdn = default(string), string azurePortalFqdn = default(string), System.Collections.Generic.IList agentPoolProfiles = default(System.Collections.Generic.IList), ContainerServiceLinuxProfile linuxProfile = default(ContainerServiceLinuxProfile), ManagedClusterWindowsProfile windowsProfile = default(ManagedClusterWindowsProfile), ManagedClusterServicePrincipalProfile servicePrincipalProfile = default(ManagedClusterServicePrincipalProfile), System.Collections.Generic.IDictionary addonProfiles = default(System.Collections.Generic.IDictionary), ManagedClusterPodIdentityProfile podIdentityProfile = default(ManagedClusterPodIdentityProfile), ManagedClusterOidcIssuerProfile oidcIssuerProfile = default(ManagedClusterOidcIssuerProfile), string nodeResourceGroup = default(string), bool? enableRbac = default(bool?), string supportPlan = default(string), bool? enablePodSecurityPolicy = default(bool?), ContainerServiceNetworkProfile networkProfile = default(ContainerServiceNetworkProfile), ManagedClusterAADProfile aadProfile = default(ManagedClusterAADProfile), ManagedClusterAutoUpgradeProfile autoUpgradeProfile = default(ManagedClusterAutoUpgradeProfile), ManagedClusterPropertiesAutoScalerProfile autoScalerProfile = default(ManagedClusterPropertiesAutoScalerProfile), ManagedClusterAPIServerAccessProfile apiServerAccessProfile = default(ManagedClusterAPIServerAccessProfile), string diskEncryptionSetId = default(string), System.Collections.Generic.IDictionary identityProfile = default(System.Collections.Generic.IDictionary), System.Collections.Generic.IList privateLinkResources = default(System.Collections.Generic.IList), bool? disableLocalAccounts = default(bool?), ManagedClusterHttpProxyConfig httpProxyConfig = default(ManagedClusterHttpProxyConfig), ManagedClusterSecurityProfile securityProfile = default(ManagedClusterSecurityProfile), ManagedClusterStorageProfile storageProfile = default(ManagedClusterStorageProfile), string publicNetworkAccess = default(string), ManagedClusterWorkloadAutoScalerProfile workloadAutoScalerProfile = default(ManagedClusterWorkloadAutoScalerProfile), ManagedClusterAzureMonitorProfile azureMonitorProfile = default(ManagedClusterAzureMonitorProfile)) + + { + this.ProvisioningState = provisioningState; + this.PowerState = powerState; + this.MaxAgentPools = maxAgentPools; + this.KubernetesVersion = kubernetesVersion; + this.CurrentKubernetesVersion = currentKubernetesVersion; + this.DnsPrefix = dnsPrefix; + this.FqdnSubdomain = fqdnSubdomain; + this.Fqdn = fqdn; + this.PrivateFqdn = privateFqdn; + this.AzurePortalFqdn = azurePortalFqdn; + this.AgentPoolProfiles = agentPoolProfiles; + this.LinuxProfile = linuxProfile; + this.WindowsProfile = windowsProfile; + this.ServicePrincipalProfile = servicePrincipalProfile; + this.AddonProfiles = addonProfiles; + this.PodIdentityProfile = podIdentityProfile; + this.OidcIssuerProfile = oidcIssuerProfile; + this.NodeResourceGroup = nodeResourceGroup; + this.EnableRbac = enableRbac; + this.SupportPlan = supportPlan; + this.EnablePodSecurityPolicy = enablePodSecurityPolicy; + this.NetworkProfile = networkProfile; + this.AadProfile = aadProfile; + this.AutoUpgradeProfile = autoUpgradeProfile; + this.AutoScalerProfile = autoScalerProfile; + this.ApiServerAccessProfile = apiServerAccessProfile; + this.DiskEncryptionSetId = diskEncryptionSetId; + this.IdentityProfile = identityProfile; + this.PrivateLinkResources = privateLinkResources; + this.DisableLocalAccounts = disableLocalAccounts; + this.HttpProxyConfig = httpProxyConfig; + this.SecurityProfile = securityProfile; + this.StorageProfile = storageProfile; + this.PublicNetworkAccess = publicNetworkAccess; + this.WorkloadAutoScalerProfile = workloadAutoScalerProfile; + this.AzureMonitorProfile = azureMonitorProfile; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets the current provisioning state. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "provisioningState")] + public string ProvisioningState {get; private set; } + + /// + /// Gets the Power State of the cluster. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "powerState")] + public PowerState PowerState {get; private set; } + + /// + /// Gets the max number of agent pools for the managed cluster. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "maxAgentPools")] + public int? MaxAgentPools {get; private set; } + + /// + /// Gets or sets both patch version (major.minor.patch) (e.g. 1.20.13) and + /// (major.minor) (e.g. 1.20) are supported. When (major.minor) is specified, + /// the latest supported GA patch version is chosen automatically. Updating the + /// cluster with the same (major.minor) once it has been created (e.g. 1.14.x + /// -) 1.14) will not trigger an upgrade, even if a newer patch version is + /// available. When you upgrade a supported AKS cluster, Kubernetes minor + /// versions cannot be skipped. All upgrades must be performed sequentially by + /// major version number. For example, upgrades between 1.14.x -) 1.15.x or + /// 1.15.x -) 1.16.x are allowed, however 1.14.x -) 1.16.x is not allowed. See + /// [upgrading an AKS + /// cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) for more + /// details. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "kubernetesVersion")] + public string KubernetesVersion {get; set; } + + /// + /// Gets if kubernetesVersion was a fully specified version + /// (major.minor.patch), this field will be exactly equal to it. If + /// kubernetesVersion was (major.minor), this field will contain the full + /// (major.minor.patch) version being used. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "currentKubernetesVersion")] + public string CurrentKubernetesVersion {get; private set; } + + /// + /// Gets or sets this cannot be updated once the Managed Cluster has been + /// created. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "dnsPrefix")] + public string DnsPrefix {get; set; } + + /// + /// Gets or sets this cannot be updated once the Managed Cluster has been + /// created. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "fqdnSubdomain")] + public string FqdnSubdomain {get; set; } + + /// + /// Gets the FQDN of the master pool. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "fqdn")] + public string Fqdn {get; private set; } + + /// + /// Gets the FQDN of private cluster. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "privateFQDN")] + public string PrivateFqdn {get; private set; } + + /// + /// Gets the Azure Portal requires certain Cross-Origin Resource Sharing (CORS) + /// headers to be sent in some responses, which Kubernetes APIServer doesn't + /// handle by default. This special FQDN supports CORS, allowing the Azure + /// Portal to function properly. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "azurePortalFQDN")] + public string AzurePortalFqdn {get; private set; } + + /// + /// Gets or sets the agent pool properties. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "agentPoolProfiles")] + public System.Collections.Generic.IList AgentPoolProfiles {get; set; } + + /// + /// Gets or sets the profile for Linux VMs in the Managed Cluster. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "linuxProfile")] + public ContainerServiceLinuxProfile LinuxProfile {get; set; } + + /// + /// Gets or sets the profile for Windows VMs in the Managed Cluster. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "windowsProfile")] + public ManagedClusterWindowsProfile WindowsProfile {get; set; } + + /// + /// Gets or sets information about a service principal identity for the cluster + /// to use for manipulating Azure APIs. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "servicePrincipalProfile")] + public ManagedClusterServicePrincipalProfile ServicePrincipalProfile {get; set; } + + /// + /// Gets or sets the profile of managed cluster add-on. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "addonProfiles")] + public System.Collections.Generic.IDictionary AddonProfiles {get; set; } + + /// + /// Gets or sets see [use AAD pod + /// identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity) + /// for more details on AAD pod identity integration. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "podIdentityProfile")] + public ManagedClusterPodIdentityProfile PodIdentityProfile {get; set; } + + /// + /// Gets or sets the OIDC issuer profile of the Managed Cluster. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "oidcIssuerProfile")] + public ManagedClusterOidcIssuerProfile OidcIssuerProfile {get; set; } + + /// + /// Gets or sets the name of the resource group containing agent pool nodes. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "nodeResourceGroup")] + public string NodeResourceGroup {get; set; } + + /// + /// Gets or sets whether to enable Kubernetes Role-Based Access Control. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "enableRBAC")] + public bool? EnableRbac {get; set; } + + /// + /// Gets or sets the support plan for the Managed Cluster. If unspecified, the + /// default is 'KubernetesOfficial'. Possible values include: 'KubernetesOfficial', 'AKSLongTermSupport' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "supportPlan")] + public string SupportPlan {get; set; } + + /// + /// Gets or sets (DEPRECATED) Whether to enable Kubernetes pod security policy + /// (preview). PodSecurityPolicy was deprecated in Kubernetes v1.21, and + /// removed from Kubernetes in v1.25. Learn more at https://aka.ms/k8s/psp and + /// https://aka.ms/aks/psp. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "enablePodSecurityPolicy")] + public bool? EnablePodSecurityPolicy {get; set; } + + /// + /// Gets or sets the network configuration profile. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "networkProfile")] + public ContainerServiceNetworkProfile NetworkProfile {get; set; } + + /// + /// Gets or sets the Azure Active Directory configuration. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "aadProfile")] + public ManagedClusterAADProfile AadProfile {get; set; } + + /// + /// Gets or sets the auto upgrade configuration. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "autoUpgradeProfile")] + public ManagedClusterAutoUpgradeProfile AutoUpgradeProfile {get; set; } + + /// + /// Gets or sets parameters to be applied to the cluster-autoscaler when + /// enabled + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "autoScalerProfile")] + public ManagedClusterPropertiesAutoScalerProfile AutoScalerProfile {get; set; } + + /// + /// Gets or sets the access profile for managed cluster API server. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "apiServerAccessProfile")] + public ManagedClusterAPIServerAccessProfile ApiServerAccessProfile {get; set; } + + /// + /// Gets or sets this is of the form: + /// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{encryptionSetName}' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "diskEncryptionSetID")] + public string DiskEncryptionSetId {get; set; } + + /// + /// Gets or sets identities associated with the cluster. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "identityProfile")] + public System.Collections.Generic.IDictionary IdentityProfile {get; set; } + + /// + /// Gets or sets private link resources associated with the cluster. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "privateLinkResources")] + public System.Collections.Generic.IList PrivateLinkResources {get; set; } + + /// + /// Gets or sets if set to true, getting static credentials will be disabled + /// for this cluster. This must only be used on Managed Clusters that are AAD + /// enabled. For more details see [disable local + /// accounts](https://docs.microsoft.com/azure/aks/managed-aad#disable-local-accounts-preview). + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "disableLocalAccounts")] + public bool? DisableLocalAccounts {get; set; } + + /// + /// Gets or sets configurations for provisioning the cluster with HTTP proxy + /// servers. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "httpProxyConfig")] + public ManagedClusterHttpProxyConfig HttpProxyConfig {get; set; } + + /// + /// Gets or sets security profile for the managed cluster. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "securityProfile")] + public ManagedClusterSecurityProfile SecurityProfile {get; set; } + + /// + /// Gets or sets storage profile for the managed cluster. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "storageProfile")] + public ManagedClusterStorageProfile StorageProfile {get; set; } + + /// + /// Gets or sets allow or deny public network access for AKS Possible values include: 'Enabled', 'Disabled' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "publicNetworkAccess")] + public string PublicNetworkAccess {get; set; } + + /// + /// Gets or sets workload Auto-scaler profile for the managed cluster. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "workloadAutoScalerProfile")] + public ManagedClusterWorkloadAutoScalerProfile WorkloadAutoScalerProfile {get; set; } + + /// + /// Gets or sets azure Monitor addon profiles for monitoring the managed + /// cluster. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "azureMonitorProfile")] + public ManagedClusterAzureMonitorProfile AzureMonitorProfile {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + + + + + + + + + + if (this.AgentPoolProfiles != null) + { + foreach (var element in this.AgentPoolProfiles) + { + if (element != null) + { + element.Validate(); + } + } + } + if (this.LinuxProfile != null) + { + this.LinuxProfile.Validate(); + } + if (this.WindowsProfile != null) + { + this.WindowsProfile.Validate(); + } + if (this.ServicePrincipalProfile != null) + { + this.ServicePrincipalProfile.Validate(); + } + if (this.AddonProfiles != null) + { + foreach (var valueElement in this.AddonProfiles.Values) + { + if (valueElement != null) + { + valueElement.Validate(); + } + } + } + + + + + if (this.NetworkProfile != null) + { + this.NetworkProfile.Validate(); + } + + + + + + + + + + + + if (this.WorkloadAutoScalerProfile != null) + { + this.WorkloadAutoScalerProfile.Validate(); + } + if (this.AzureMonitorProfile != null) + { + this.AzureMonitorProfile.Validate(); + } + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterPropertiesAutoScalerProfile.cs b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterPropertiesAutoScalerProfile.cs index 69dc0f79aadf..9e595b2493da 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterPropertiesAutoScalerProfile.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterPropertiesAutoScalerProfile.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.ContainerService.Models public partial class ManagedClusterPropertiesAutoScalerProfile { /// - /// Initializes a new instance of the - /// ManagedClusterPropertiesAutoScalerProfile class. + /// Initializes a new instance of the ManagedClusterPropertiesAutoScalerProfile class. /// public ManagedClusterPropertiesAutoScalerProfile() { @@ -28,67 +21,91 @@ public ManagedClusterPropertiesAutoScalerProfile() } /// - /// Initializes a new instance of the - /// ManagedClusterPropertiesAutoScalerProfile class. + /// Initializes a new instance of the ManagedClusterPropertiesAutoScalerProfile class. /// - /// Detects similar node pools - /// and balances the number of nodes between them. - /// The expander to use when scaling up - /// The maximum number of empty nodes - /// that can be deleted at the same time. This must be a positive - /// integer. - /// The maximum number of - /// seconds the cluster autoscaler waits for pod termination when - /// trying to scale down a node. - /// The maximum time the autoscaler - /// waits for a node to be provisioned. - /// The maximum percentage of - /// unready nodes in the cluster. After this percentage is exceeded, - /// cluster autoscaler halts operations. - /// Ignore unscheduled pods before - /// they're a certain age. - /// The number of allowed unready - /// nodes, irrespective of max-total-unready-percentage. - /// How often cluster is reevaluated for - /// scale up or down. - /// How long after scale up that - /// scale down evaluation resumes - /// How long after node - /// deletion that scale down evaluation resumes. - /// How long after scale down - /// failure that scale down evaluation resumes. - /// How long a node should be - /// unneeded before it is eligible for scale down. - /// How long an unready node should - /// be unneeded before it is eligible for scale down - /// Node utilization level, - /// defined as sum of requested resources divided by capacity, below - /// which a node can be considered for scale down. - /// If cluster autoscaler will - /// skip deleting nodes with pods with local storage, for example, - /// EmptyDir or HostPath. - /// If cluster autoscaler will - /// skip deleting nodes with pods from kube-system (except for - /// DaemonSet or mirror pods) + + /// Valid values are 'true' and 'false' + /// + + /// If not specified, the default is 'random'. See + /// [expanders](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-expanders) + /// for more information. + /// Possible values include: 'least-waste', 'most-pods', 'priority', 'random' + + /// The default is 10. + /// + + /// The default is 600. + /// + + /// The default is '15m'. Values must be an integer followed by an 'm'. No unit + /// of time other than minutes (m) is supported. + /// + + /// The default is 45. The maximum is 100 and the minimum is 0. + /// + + /// For scenarios like burst/batch scale where you don't want CA to act before + /// the kubernetes scheduler could schedule all the pods, you can tell CA to + /// ignore unscheduled pods before they're a certain age. The default is '0s'. + /// Values must be an integer followed by a unit ('s' for seconds, 'm' for + /// minutes, 'h' for hours, etc). + /// + + /// This must be an integer. The default is 3. + /// + + /// The default is '10'. Values must be an integer number of seconds. + /// + + /// The default is '10m'. Values must be an integer followed by an 'm'. No unit + /// of time other than minutes (m) is supported. + /// + + /// The default is the scan-interval. Values must be an integer followed by an + /// 'm'. No unit of time other than minutes (m) is supported. + /// + + /// The default is '3m'. Values must be an integer followed by an 'm'. No unit + /// of time other than minutes (m) is supported. + /// + + /// The default is '10m'. Values must be an integer followed by an 'm'. No unit + /// of time other than minutes (m) is supported. + /// + + /// The default is '20m'. Values must be an integer followed by an 'm'. No unit + /// of time other than minutes (m) is supported. + /// + + /// The default is '0.5'. + /// + + /// The default is true. + /// + + /// The default is true. + /// public ManagedClusterPropertiesAutoScalerProfile(string balanceSimilarNodeGroups = default(string), string expander = default(string), string maxEmptyBulkDelete = default(string), string maxGracefulTerminationSec = default(string), string maxNodeProvisionTime = default(string), string maxTotalUnreadyPercentage = default(string), string newPodScaleUpDelay = default(string), string okTotalUnreadyCount = default(string), string scanInterval = default(string), string scaleDownDelayAfterAdd = default(string), string scaleDownDelayAfterDelete = default(string), string scaleDownDelayAfterFailure = default(string), string scaleDownUnneededTime = default(string), string scaleDownUnreadyTime = default(string), string scaleDownUtilizationThreshold = default(string), string skipNodesWithLocalStorage = default(string), string skipNodesWithSystemPods = default(string)) + { - BalanceSimilarNodeGroups = balanceSimilarNodeGroups; - Expander = expander; - MaxEmptyBulkDelete = maxEmptyBulkDelete; - MaxGracefulTerminationSec = maxGracefulTerminationSec; - MaxNodeProvisionTime = maxNodeProvisionTime; - MaxTotalUnreadyPercentage = maxTotalUnreadyPercentage; - NewPodScaleUpDelay = newPodScaleUpDelay; - OkTotalUnreadyCount = okTotalUnreadyCount; - ScanInterval = scanInterval; - ScaleDownDelayAfterAdd = scaleDownDelayAfterAdd; - ScaleDownDelayAfterDelete = scaleDownDelayAfterDelete; - ScaleDownDelayAfterFailure = scaleDownDelayAfterFailure; - ScaleDownUnneededTime = scaleDownUnneededTime; - ScaleDownUnreadyTime = scaleDownUnreadyTime; - ScaleDownUtilizationThreshold = scaleDownUtilizationThreshold; - SkipNodesWithLocalStorage = skipNodesWithLocalStorage; - SkipNodesWithSystemPods = skipNodesWithSystemPods; + this.BalanceSimilarNodeGroups = balanceSimilarNodeGroups; + this.Expander = expander; + this.MaxEmptyBulkDelete = maxEmptyBulkDelete; + this.MaxGracefulTerminationSec = maxGracefulTerminationSec; + this.MaxNodeProvisionTime = maxNodeProvisionTime; + this.MaxTotalUnreadyPercentage = maxTotalUnreadyPercentage; + this.NewPodScaleUpDelay = newPodScaleUpDelay; + this.OkTotalUnreadyCount = okTotalUnreadyCount; + this.ScanInterval = scanInterval; + this.ScaleDownDelayAfterAdd = scaleDownDelayAfterAdd; + this.ScaleDownDelayAfterDelete = scaleDownDelayAfterDelete; + this.ScaleDownDelayAfterFailure = scaleDownDelayAfterFailure; + this.ScaleDownUnneededTime = scaleDownUnneededTime; + this.ScaleDownUnreadyTime = scaleDownUnreadyTime; + this.ScaleDownUtilizationThreshold = scaleDownUtilizationThreshold; + this.SkipNodesWithLocalStorage = skipNodesWithLocalStorage; + this.SkipNodesWithSystemPods = skipNodesWithSystemPods; CustomInit(); } @@ -97,188 +114,120 @@ public ManagedClusterPropertiesAutoScalerProfile() /// partial void CustomInit(); + /// - /// Gets or sets detects similar node pools and balances the number of - /// nodes between them. + /// Gets or sets valid values are 'true' and 'false' /// - /// - /// Valid values are 'true' and 'false' - /// - [JsonProperty(PropertyName = "balance-similar-node-groups")] - public string BalanceSimilarNodeGroups { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "balance-similar-node-groups")] + public string BalanceSimilarNodeGroups {get; set; } /// - /// Gets or sets the expander to use when scaling up - /// - /// - /// If not specified, the default is 'random'. See + /// Gets or sets if not specified, the default is 'random'. See /// [expanders](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-expanders) - /// for more information. Possible values include: 'least-waste', - /// 'most-pods', 'priority', 'random' - /// - [JsonProperty(PropertyName = "expander")] - public string Expander { get; set; } + /// for more information. Possible values include: 'least-waste', 'most-pods', 'priority', 'random' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "expander")] + public string Expander {get; set; } /// - /// Gets or sets the maximum number of empty nodes that can be deleted - /// at the same time. This must be a positive integer. + /// Gets or sets the default is 10. /// - /// - /// The default is 10. - /// - [JsonProperty(PropertyName = "max-empty-bulk-delete")] - public string MaxEmptyBulkDelete { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "max-empty-bulk-delete")] + public string MaxEmptyBulkDelete {get; set; } /// - /// Gets or sets the maximum number of seconds the cluster autoscaler - /// waits for pod termination when trying to scale down a node. + /// Gets or sets the default is 600. /// - /// - /// The default is 600. - /// - [JsonProperty(PropertyName = "max-graceful-termination-sec")] - public string MaxGracefulTerminationSec { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "max-graceful-termination-sec")] + public string MaxGracefulTerminationSec {get; set; } /// - /// Gets or sets the maximum time the autoscaler waits for a node to be - /// provisioned. + /// Gets or sets the default is '15m'. Values must be an integer followed by an + /// 'm'. No unit of time other than minutes (m) is supported. /// - /// - /// The default is '15m'. Values must be an integer followed by an 'm'. - /// No unit of time other than minutes (m) is supported. - /// - [JsonProperty(PropertyName = "max-node-provision-time")] - public string MaxNodeProvisionTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "max-node-provision-time")] + public string MaxNodeProvisionTime {get; set; } /// - /// Gets or sets the maximum percentage of unready nodes in the - /// cluster. After this percentage is exceeded, cluster autoscaler - /// halts operations. + /// Gets or sets the default is 45. The maximum is 100 and the minimum is 0. /// - /// - /// The default is 45. The maximum is 100 and the minimum is 0. - /// - [JsonProperty(PropertyName = "max-total-unready-percentage")] - public string MaxTotalUnreadyPercentage { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "max-total-unready-percentage")] + public string MaxTotalUnreadyPercentage {get; set; } /// - /// Gets or sets ignore unscheduled pods before they're a certain age. + /// Gets or sets for scenarios like burst/batch scale where you don't want CA + /// to act before the kubernetes scheduler could schedule all the pods, you can + /// tell CA to ignore unscheduled pods before they're a certain age. The + /// default is '0s'. Values must be an integer followed by a unit ('s' for + /// seconds, 'm' for minutes, 'h' for hours, etc). /// - /// - /// For scenarios like burst/batch scale where you don't want CA to act - /// before the kubernetes scheduler could schedule all the pods, you - /// can tell CA to ignore unscheduled pods before they're a certain - /// age. The default is '0s'. Values must be an integer followed by a - /// unit ('s' for seconds, 'm' for minutes, 'h' for hours, etc). - /// - [JsonProperty(PropertyName = "new-pod-scale-up-delay")] - public string NewPodScaleUpDelay { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "new-pod-scale-up-delay")] + public string NewPodScaleUpDelay {get; set; } /// - /// Gets or sets the number of allowed unready nodes, irrespective of - /// max-total-unready-percentage. + /// Gets or sets this must be an integer. The default is 3. /// - /// - /// This must be an integer. The default is 3. - /// - [JsonProperty(PropertyName = "ok-total-unready-count")] - public string OkTotalUnreadyCount { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "ok-total-unready-count")] + public string OkTotalUnreadyCount {get; set; } /// - /// Gets or sets how often cluster is reevaluated for scale up or down. + /// Gets or sets the default is '10'. Values must be an integer number of + /// seconds. /// - /// - /// The default is '10'. Values must be an integer number of seconds. - /// - [JsonProperty(PropertyName = "scan-interval")] - public string ScanInterval { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "scan-interval")] + public string ScanInterval {get; set; } /// - /// Gets or sets how long after scale up that scale down evaluation - /// resumes + /// Gets or sets the default is '10m'. Values must be an integer followed by an + /// 'm'. No unit of time other than minutes (m) is supported. /// - /// - /// The default is '10m'. Values must be an integer followed by an 'm'. - /// No unit of time other than minutes (m) is supported. - /// - [JsonProperty(PropertyName = "scale-down-delay-after-add")] - public string ScaleDownDelayAfterAdd { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "scale-down-delay-after-add")] + public string ScaleDownDelayAfterAdd {get; set; } /// - /// Gets or sets how long after node deletion that scale down - /// evaluation resumes. + /// Gets or sets the default is the scan-interval. Values must be an integer + /// followed by an 'm'. No unit of time other than minutes (m) is supported. /// - /// - /// The default is the scan-interval. Values must be an integer - /// followed by an 'm'. No unit of time other than minutes (m) is - /// supported. - /// - [JsonProperty(PropertyName = "scale-down-delay-after-delete")] - public string ScaleDownDelayAfterDelete { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "scale-down-delay-after-delete")] + public string ScaleDownDelayAfterDelete {get; set; } /// - /// Gets or sets how long after scale down failure that scale down - /// evaluation resumes. + /// Gets or sets the default is '3m'. Values must be an integer followed by an + /// 'm'. No unit of time other than minutes (m) is supported. /// - /// - /// The default is '3m'. Values must be an integer followed by an 'm'. - /// No unit of time other than minutes (m) is supported. - /// - [JsonProperty(PropertyName = "scale-down-delay-after-failure")] - public string ScaleDownDelayAfterFailure { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "scale-down-delay-after-failure")] + public string ScaleDownDelayAfterFailure {get; set; } /// - /// Gets or sets how long a node should be unneeded before it is - /// eligible for scale down. + /// Gets or sets the default is '10m'. Values must be an integer followed by an + /// 'm'. No unit of time other than minutes (m) is supported. /// - /// - /// The default is '10m'. Values must be an integer followed by an 'm'. - /// No unit of time other than minutes (m) is supported. - /// - [JsonProperty(PropertyName = "scale-down-unneeded-time")] - public string ScaleDownUnneededTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "scale-down-unneeded-time")] + public string ScaleDownUnneededTime {get; set; } /// - /// Gets or sets how long an unready node should be unneeded before it - /// is eligible for scale down + /// Gets or sets the default is '20m'. Values must be an integer followed by an + /// 'm'. No unit of time other than minutes (m) is supported. /// - /// - /// The default is '20m'. Values must be an integer followed by an 'm'. - /// No unit of time other than minutes (m) is supported. - /// - [JsonProperty(PropertyName = "scale-down-unready-time")] - public string ScaleDownUnreadyTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "scale-down-unready-time")] + public string ScaleDownUnreadyTime {get; set; } /// - /// Gets or sets node utilization level, defined as sum of requested - /// resources divided by capacity, below which a node can be considered - /// for scale down. + /// Gets or sets the default is '0.5'. /// - /// - /// The default is '0.5'. - /// - [JsonProperty(PropertyName = "scale-down-utilization-threshold")] - public string ScaleDownUtilizationThreshold { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "scale-down-utilization-threshold")] + public string ScaleDownUtilizationThreshold {get; set; } /// - /// Gets or sets if cluster autoscaler will skip deleting nodes with - /// pods with local storage, for example, EmptyDir or HostPath. + /// Gets or sets the default is true. /// - /// - /// The default is true. - /// - [JsonProperty(PropertyName = "skip-nodes-with-local-storage")] - public string SkipNodesWithLocalStorage { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "skip-nodes-with-local-storage")] + public string SkipNodesWithLocalStorage {get; set; } /// - /// Gets or sets if cluster autoscaler will skip deleting nodes with - /// pods from kube-system (except for DaemonSet or mirror pods) + /// Gets or sets the default is true. /// - /// - /// The default is true. - /// - [JsonProperty(PropertyName = "skip-nodes-with-system-pods")] - public string SkipNodesWithSystemPods { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "skip-nodes-with-system-pods")] + public string SkipNodesWithSystemPods {get; set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterSKU.cs b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterSKU.cs index 261763aeb9bc..0c8754499f35 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterSKU.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterSKU.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,13 +23,19 @@ public ManagedClusterSKU() /// /// Initializes a new instance of the ManagedClusterSKU class. /// - /// The name of a managed cluster SKU. Possible - /// values include: 'Base' - /// The tier of a managed cluster SKU. + + /// The name of a managed cluster SKU. + /// Possible values include: 'Base' + + /// If not specified, the default is 'Free'. See [AKS Pricing + /// Tier](https://learn.microsoft.com/azure/aks/free-standard-pricing-tiers) + /// for more details. + /// Possible values include: 'Premium', 'Standard', 'Free' public ManagedClusterSKU(string name = default(string), string tier = default(string)) + { - Name = name; - Tier = tier; + this.Name = name; + this.Tier = tier; CustomInit(); } @@ -44,24 +44,19 @@ public ManagedClusterSKU() /// partial void CustomInit(); + /// - /// Gets or sets the name of a managed cluster SKU. Possible values - /// include: 'Base' + /// Gets or sets the name of a managed cluster SKU. Possible values include: 'Base' /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; set; } /// - /// Gets or sets the tier of a managed cluster SKU. - /// - /// - /// If not specified, the default is 'Free'. See [AKS Pricing + /// Gets or sets if not specified, the default is 'Free'. See [AKS Pricing /// Tier](https://learn.microsoft.com/azure/aks/free-standard-pricing-tiers) - /// for more details. Possible values include: 'Premium', 'Standard', - /// 'Free' - /// - [JsonProperty(PropertyName = "tier")] - public string Tier { get; set; } - + /// for more details. Possible values include: 'Premium', 'Standard', 'Free' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "tier")] + public string Tier {get; set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterSKUName.cs b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterSKUName.cs index 4e79d09a90ce..843996f163f3 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterSKUName.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterSKUName.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.ContainerService.Models /// /// Defines values for ManagedClusterSKUName. /// + + public static class ManagedClusterSKUName { /// @@ -21,4 +18,4 @@ public static class ManagedClusterSKUName /// public const string Base = "Base"; } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterSKUTier.cs b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterSKUTier.cs index 2e3537a6f0fe..d1f2dc039d1c 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterSKUTier.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterSKUTier.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { @@ -14,29 +9,21 @@ namespace Microsoft.Azure.Management.ContainerService.Models /// /// Defines values for ManagedClusterSKUTier. /// + + public static class ManagedClusterSKUTier { /// - /// Cluster has premium capabilities in addition to all of the - /// capabilities included in 'Standard'. Premium enables selection of - /// LongTermSupport (aka.ms/aks/lts) for certain Kubernetes versions. + /// Cluster has premium capabilities in addition to all of the capabilities included in 'Standard'. Premium enables selection of LongTermSupport (aka.ms/aks/lts) for certain Kubernetes versions. /// public const string Premium = "Premium"; /// - /// Recommended for mission-critical and production workloads. Includes - /// Kubernetes control plane autoscaling, workload-intensive testing, - /// and up to 5,000 nodes per cluster. Guarantees 99.95% availability - /// of the Kubernetes API server endpoint for clusters that use - /// Availability Zones and 99.9% of availability for clusters that - /// don't use Availability Zones. + /// Recommended for mission-critical and production workloads. Includes Kubernetes control plane autoscaling, workload-intensive testing, and up to 5,000 nodes per cluster. Guarantees 99.95% availability of the Kubernetes API server endpoint for clusters that use Availability Zones and 99.9% of availability for clusters that don't use Availability Zones. /// public const string Standard = "Standard"; /// - /// The cluster management is free, but charged for VM, storage, and - /// networking usage. Best for experimenting, learning, simple testing, - /// or workloads with fewer than 10 nodes. Not recommended for - /// production use cases. + /// The cluster management is free, but charged for VM, storage, and networking usage. Best for experimenting, learning, simple testing, or workloads with fewer than 10 nodes. Not recommended for production use cases. /// public const string Free = "Free"; } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterSecurityProfile.cs b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterSecurityProfile.cs index dd9a9760febe..f05fb2da7340 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterSecurityProfile.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterSecurityProfile.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.ContainerService.Models public partial class ManagedClusterSecurityProfile { /// - /// Initializes a new instance of the ManagedClusterSecurityProfile - /// class. + /// Initializes a new instance of the ManagedClusterSecurityProfile class. /// public ManagedClusterSecurityProfile() { @@ -28,26 +21,31 @@ public ManagedClusterSecurityProfile() } /// - /// Initializes a new instance of the ManagedClusterSecurityProfile - /// class. + /// Initializes a new instance of the ManagedClusterSecurityProfile class. /// - /// Microsoft Defender settings for the security - /// profile. + + /// Microsoft Defender settings for the security profile. + /// + /// Azure Key Vault [key management /// service](https://kubernetes.io/docs/tasks/administer-cluster/kms-provider/) - /// settings for the security profile. - /// Workload identity settings for the - /// security profile. Workload identity enables Kubernetes applications - /// to access Azure cloud resources securely with Azure AD. See - /// https://aka.ms/aks/wi for more details. - /// Image Cleaner settings for the security - /// profile. + /// settings for the security profile. + /// + + /// Workload identity settings for the security profile. Workload identity + /// enables Kubernetes applications to access Azure cloud resources securely + /// with Azure AD. See https://aka.ms/aks/wi for more details. + /// + + /// Image Cleaner settings for the security profile. + /// public ManagedClusterSecurityProfile(ManagedClusterSecurityProfileDefender defender = default(ManagedClusterSecurityProfileDefender), AzureKeyVaultKms azureKeyVaultKms = default(AzureKeyVaultKms), ManagedClusterSecurityProfileWorkloadIdentity workloadIdentity = default(ManagedClusterSecurityProfileWorkloadIdentity), ManagedClusterSecurityProfileImageCleaner imageCleaner = default(ManagedClusterSecurityProfileImageCleaner)) + { - Defender = defender; - AzureKeyVaultKms = azureKeyVaultKms; - WorkloadIdentity = workloadIdentity; - ImageCleaner = imageCleaner; + this.Defender = defender; + this.AzureKeyVaultKms = azureKeyVaultKms; + this.WorkloadIdentity = workloadIdentity; + this.ImageCleaner = imageCleaner; CustomInit(); } @@ -56,34 +54,33 @@ public ManagedClusterSecurityProfile() /// partial void CustomInit(); + /// /// Gets or sets microsoft Defender settings for the security profile. /// - [JsonProperty(PropertyName = "defender")] - public ManagedClusterSecurityProfileDefender Defender { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "defender")] + public ManagedClusterSecurityProfileDefender Defender {get; set; } /// /// Gets or sets azure Key Vault [key management /// service](https://kubernetes.io/docs/tasks/administer-cluster/kms-provider/) /// settings for the security profile. /// - [JsonProperty(PropertyName = "azureKeyVaultKms")] - public AzureKeyVaultKms AzureKeyVaultKms { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "azureKeyVaultKms")] + public AzureKeyVaultKms AzureKeyVaultKms {get; set; } /// - /// Gets or sets workload identity settings for the security profile. - /// Workload identity enables Kubernetes applications to access Azure - /// cloud resources securely with Azure AD. See https://aka.ms/aks/wi - /// for more details. + /// Gets or sets workload identity settings for the security profile. Workload + /// identity enables Kubernetes applications to access Azure cloud resources + /// securely with Azure AD. See https://aka.ms/aks/wi for more details. /// - [JsonProperty(PropertyName = "workloadIdentity")] - public ManagedClusterSecurityProfileWorkloadIdentity WorkloadIdentity { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "workloadIdentity")] + public ManagedClusterSecurityProfileWorkloadIdentity WorkloadIdentity {get; set; } /// /// Gets or sets image Cleaner settings for the security profile. /// - [JsonProperty(PropertyName = "imageCleaner")] - public ManagedClusterSecurityProfileImageCleaner ImageCleaner { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "imageCleaner")] + public ManagedClusterSecurityProfileImageCleaner ImageCleaner {get; set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterSecurityProfileDefender.cs b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterSecurityProfileDefender.cs index 2089b2353d85..0a411ca71af7 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterSecurityProfileDefender.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterSecurityProfileDefender.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.ContainerService.Models public partial class ManagedClusterSecurityProfileDefender { /// - /// Initializes a new instance of the - /// ManagedClusterSecurityProfileDefender class. + /// Initializes a new instance of the ManagedClusterSecurityProfileDefender class. /// public ManagedClusterSecurityProfileDefender() { @@ -28,20 +21,23 @@ public ManagedClusterSecurityProfileDefender() } /// - /// Initializes a new instance of the - /// ManagedClusterSecurityProfileDefender class. + /// Initializes a new instance of the ManagedClusterSecurityProfileDefender class. /// - /// Resource ID of the - /// Log Analytics workspace to be associated with Microsoft Defender. - /// When Microsoft Defender is enabled, this field is required and must - /// be a valid workspace resource ID. When Microsoft Defender is - /// disabled, leave the field empty. - /// Microsoft Defender threat - /// detection for Cloud settings for the security profile. + + /// Resource ID of the Log Analytics workspace to be associated with Microsoft + /// Defender. When Microsoft Defender is enabled, this field is required and + /// must be a valid workspace resource ID. When Microsoft Defender is disabled, + /// leave the field empty. + /// + + /// Microsoft Defender threat detection for Cloud settings for the security + /// profile. + /// public ManagedClusterSecurityProfileDefender(string logAnalyticsWorkspaceResourceId = default(string), ManagedClusterSecurityProfileDefenderSecurityMonitoring securityMonitoring = default(ManagedClusterSecurityProfileDefenderSecurityMonitoring)) + { - LogAnalyticsWorkspaceResourceId = logAnalyticsWorkspaceResourceId; - SecurityMonitoring = securityMonitoring; + this.LogAnalyticsWorkspaceResourceId = logAnalyticsWorkspaceResourceId; + this.SecurityMonitoring = securityMonitoring; CustomInit(); } @@ -50,22 +46,21 @@ public ManagedClusterSecurityProfileDefender() /// partial void CustomInit(); + /// - /// Gets or sets resource ID of the Log Analytics workspace to be - /// associated with Microsoft Defender. When Microsoft Defender is - /// enabled, this field is required and must be a valid workspace - /// resource ID. When Microsoft Defender is disabled, leave the field - /// empty. + /// Gets or sets resource ID of the Log Analytics workspace to be associated + /// with Microsoft Defender. When Microsoft Defender is enabled, this field is + /// required and must be a valid workspace resource ID. When Microsoft Defender + /// is disabled, leave the field empty. /// - [JsonProperty(PropertyName = "logAnalyticsWorkspaceResourceId")] - public string LogAnalyticsWorkspaceResourceId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "logAnalyticsWorkspaceResourceId")] + public string LogAnalyticsWorkspaceResourceId {get; set; } /// - /// Gets or sets microsoft Defender threat detection for Cloud settings - /// for the security profile. + /// Gets or sets microsoft Defender threat detection for Cloud settings for the + /// security profile. /// - [JsonProperty(PropertyName = "securityMonitoring")] - public ManagedClusterSecurityProfileDefenderSecurityMonitoring SecurityMonitoring { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "securityMonitoring")] + public ManagedClusterSecurityProfileDefenderSecurityMonitoring SecurityMonitoring {get; set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterSecurityProfileDefenderSecurityMonitoring.cs b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterSecurityProfileDefenderSecurityMonitoring.cs index cef009a18f09..af6c922ab810 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterSecurityProfileDefenderSecurityMonitoring.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterSecurityProfileDefenderSecurityMonitoring.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.ContainerService.Models public partial class ManagedClusterSecurityProfileDefenderSecurityMonitoring { /// - /// Initializes a new instance of the - /// ManagedClusterSecurityProfileDefenderSecurityMonitoring class. + /// Initializes a new instance of the ManagedClusterSecurityProfileDefenderSecurityMonitoring class. /// public ManagedClusterSecurityProfileDefenderSecurityMonitoring() { @@ -28,14 +21,15 @@ public ManagedClusterSecurityProfileDefenderSecurityMonitoring() } /// - /// Initializes a new instance of the - /// ManagedClusterSecurityProfileDefenderSecurityMonitoring class. + /// Initializes a new instance of the ManagedClusterSecurityProfileDefenderSecurityMonitoring class. /// - /// Whether to enable Defender threat - /// detection + + /// Whether to enable Defender threat detection + /// public ManagedClusterSecurityProfileDefenderSecurityMonitoring(bool? enabled = default(bool?)) + { - Enabled = enabled; + this.Enabled = enabled; CustomInit(); } @@ -44,11 +38,11 @@ public ManagedClusterSecurityProfileDefenderSecurityMonitoring() /// partial void CustomInit(); + /// /// Gets or sets whether to enable Defender threat detection /// - [JsonProperty(PropertyName = "enabled")] - public bool? Enabled { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "enabled")] + public bool? Enabled {get; set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterSecurityProfileImageCleaner.cs b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterSecurityProfileImageCleaner.cs index c7118c14d034..275c9957f028 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterSecurityProfileImageCleaner.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterSecurityProfileImageCleaner.cs @@ -1,28 +1,21 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; using System.Linq; /// - /// Image Cleaner removes unused images from nodes, freeing up disk space - /// and helping to reduce attack surface area. Here are settings for the - /// security profile. + /// Image Cleaner removes unused images from nodes, freeing up disk space and + /// helping to reduce attack surface area. Here are settings for the security + /// profile. /// public partial class ManagedClusterSecurityProfileImageCleaner { /// - /// Initializes a new instance of the - /// ManagedClusterSecurityProfileImageCleaner class. + /// Initializes a new instance of the ManagedClusterSecurityProfileImageCleaner class. /// public ManagedClusterSecurityProfileImageCleaner() { @@ -30,17 +23,19 @@ public ManagedClusterSecurityProfileImageCleaner() } /// - /// Initializes a new instance of the - /// ManagedClusterSecurityProfileImageCleaner class. + /// Initializes a new instance of the ManagedClusterSecurityProfileImageCleaner class. /// - /// Whether to enable Image Cleaner on AKS - /// cluster. - /// Image Cleaner scanning interval in - /// hours. + + /// Whether to enable Image Cleaner on AKS cluster. + /// + + /// Image Cleaner scanning interval in hours. + /// public ManagedClusterSecurityProfileImageCleaner(bool? enabled = default(bool?), int? intervalHours = default(int?)) + { - Enabled = enabled; - IntervalHours = intervalHours; + this.Enabled = enabled; + this.IntervalHours = intervalHours; CustomInit(); } @@ -49,17 +44,17 @@ public ManagedClusterSecurityProfileImageCleaner() /// partial void CustomInit(); + /// /// Gets or sets whether to enable Image Cleaner on AKS cluster. /// - [JsonProperty(PropertyName = "enabled")] - public bool? Enabled { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "enabled")] + public bool? Enabled {get; set; } /// /// Gets or sets image Cleaner scanning interval in hours. /// - [JsonProperty(PropertyName = "intervalHours")] - public int? IntervalHours { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "intervalHours")] + public int? IntervalHours {get; set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterSecurityProfileWorkloadIdentity.cs b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterSecurityProfileWorkloadIdentity.cs index 8170d45ef403..52c6d0085534 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterSecurityProfileWorkloadIdentity.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterSecurityProfileWorkloadIdentity.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.ContainerService.Models public partial class ManagedClusterSecurityProfileWorkloadIdentity { /// - /// Initializes a new instance of the - /// ManagedClusterSecurityProfileWorkloadIdentity class. + /// Initializes a new instance of the ManagedClusterSecurityProfileWorkloadIdentity class. /// public ManagedClusterSecurityProfileWorkloadIdentity() { @@ -28,13 +21,15 @@ public ManagedClusterSecurityProfileWorkloadIdentity() } /// - /// Initializes a new instance of the - /// ManagedClusterSecurityProfileWorkloadIdentity class. + /// Initializes a new instance of the ManagedClusterSecurityProfileWorkloadIdentity class. /// - /// Whether to enable workload identity. + + /// Whether to enable workload identity. + /// public ManagedClusterSecurityProfileWorkloadIdentity(bool? enabled = default(bool?)) + { - Enabled = enabled; + this.Enabled = enabled; CustomInit(); } @@ -43,11 +38,11 @@ public ManagedClusterSecurityProfileWorkloadIdentity() /// partial void CustomInit(); + /// /// Gets or sets whether to enable workload identity. /// - [JsonProperty(PropertyName = "enabled")] - public bool? Enabled { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "enabled")] + public bool? Enabled {get; set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterServicePrincipalProfile.cs b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterServicePrincipalProfile.cs index 76ab750c8a8e..6d6fb065cb93 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterServicePrincipalProfile.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterServicePrincipalProfile.cs @@ -1,28 +1,20 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// - /// Information about a service principal identity for the cluster to use - /// for manipulating Azure APIs. + /// Information about a service principal identity for the cluster to use for + /// manipulating Azure APIs. /// public partial class ManagedClusterServicePrincipalProfile { /// - /// Initializes a new instance of the - /// ManagedClusterServicePrincipalProfile class. + /// Initializes a new instance of the ManagedClusterServicePrincipalProfile class. /// public ManagedClusterServicePrincipalProfile() { @@ -30,16 +22,19 @@ public ManagedClusterServicePrincipalProfile() } /// - /// Initializes a new instance of the - /// ManagedClusterServicePrincipalProfile class. + /// Initializes a new instance of the ManagedClusterServicePrincipalProfile class. /// - /// The ID for the service principal. - /// The secret password associated with the - /// service principal in plain text. + + /// The ID for the service principal. + /// + + /// The secret password associated with the service principal in plain text. + /// public ManagedClusterServicePrincipalProfile(string clientId, string secret = default(string)) + { - ClientId = clientId; - Secret = secret; + this.ClientId = clientId; + this.Secret = secret; CustomInit(); } @@ -48,31 +43,33 @@ public ManagedClusterServicePrincipalProfile() /// partial void CustomInit(); + /// /// Gets or sets the ID for the service principal. /// - [JsonProperty(PropertyName = "clientId")] - public string ClientId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "clientId")] + public string ClientId {get; set; } /// - /// Gets or sets the secret password associated with the service - /// principal in plain text. + /// Gets or sets the secret password associated with the service principal in + /// plain text. /// - [JsonProperty(PropertyName = "secret")] - public string Secret { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "secret")] + public string Secret {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (ClientId == null) + if (this.ClientId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "ClientId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "ClientId"); } + + } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterStorageProfile.cs b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterStorageProfile.cs index 690e37593365..e779aaf15a82 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterStorageProfile.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterStorageProfile.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.ContainerService.Models public partial class ManagedClusterStorageProfile { /// - /// Initializes a new instance of the ManagedClusterStorageProfile - /// class. + /// Initializes a new instance of the ManagedClusterStorageProfile class. /// public ManagedClusterStorageProfile() { @@ -28,23 +21,27 @@ public ManagedClusterStorageProfile() } /// - /// Initializes a new instance of the ManagedClusterStorageProfile - /// class. + /// Initializes a new instance of the ManagedClusterStorageProfile class. /// - /// AzureDisk CSI Driver settings for the - /// storage profile. - /// AzureFile CSI Driver settings for the - /// storage profile. - /// Snapshot Controller settings for - /// the storage profile. - /// AzureBlob CSI Driver settings for the - /// storage profile. - public ManagedClusterStorageProfile(ManagedClusterStorageProfileDiskCSIDriver diskCSIDriver = default(ManagedClusterStorageProfileDiskCSIDriver), ManagedClusterStorageProfileFileCSIDriver fileCSIDriver = default(ManagedClusterStorageProfileFileCSIDriver), ManagedClusterStorageProfileSnapshotController snapshotController = default(ManagedClusterStorageProfileSnapshotController), ManagedClusterStorageProfileBlobCSIDriver blobCSIDriver = default(ManagedClusterStorageProfileBlobCSIDriver)) + + /// AzureDisk CSI Driver settings for the storage profile. + /// + + /// AzureFile CSI Driver settings for the storage profile. + /// + + /// Snapshot Controller settings for the storage profile. + /// + + /// AzureBlob CSI Driver settings for the storage profile. + /// + public ManagedClusterStorageProfile(ManagedClusterStorageProfileDiskCSIDriver diskCsiDriver = default(ManagedClusterStorageProfileDiskCSIDriver), ManagedClusterStorageProfileFileCSIDriver fileCsiDriver = default(ManagedClusterStorageProfileFileCSIDriver), ManagedClusterStorageProfileSnapshotController snapshotController = default(ManagedClusterStorageProfileSnapshotController), ManagedClusterStorageProfileBlobCSIDriver blobCsiDriver = default(ManagedClusterStorageProfileBlobCSIDriver)) + { - DiskCSIDriver = diskCSIDriver; - FileCSIDriver = fileCSIDriver; - SnapshotController = snapshotController; - BlobCSIDriver = blobCSIDriver; + this.DiskCsiDriver = diskCsiDriver; + this.FileCsiDriver = fileCsiDriver; + this.SnapshotController = snapshotController; + this.BlobCsiDriver = blobCsiDriver; CustomInit(); } @@ -53,29 +50,29 @@ public ManagedClusterStorageProfile() /// partial void CustomInit(); + /// /// Gets or sets azureDisk CSI Driver settings for the storage profile. /// - [JsonProperty(PropertyName = "diskCSIDriver")] - public ManagedClusterStorageProfileDiskCSIDriver DiskCSIDriver { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "diskCSIDriver")] + public ManagedClusterStorageProfileDiskCSIDriver DiskCsiDriver {get; set; } /// /// Gets or sets azureFile CSI Driver settings for the storage profile. /// - [JsonProperty(PropertyName = "fileCSIDriver")] - public ManagedClusterStorageProfileFileCSIDriver FileCSIDriver { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "fileCSIDriver")] + public ManagedClusterStorageProfileFileCSIDriver FileCsiDriver {get; set; } /// /// Gets or sets snapshot Controller settings for the storage profile. /// - [JsonProperty(PropertyName = "snapshotController")] - public ManagedClusterStorageProfileSnapshotController SnapshotController { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "snapshotController")] + public ManagedClusterStorageProfileSnapshotController SnapshotController {get; set; } /// /// Gets or sets azureBlob CSI Driver settings for the storage profile. /// - [JsonProperty(PropertyName = "blobCSIDriver")] - public ManagedClusterStorageProfileBlobCSIDriver BlobCSIDriver { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "blobCSIDriver")] + public ManagedClusterStorageProfileBlobCSIDriver BlobCsiDriver {get; set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterStorageProfileBlobCSIDriver.cs b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterStorageProfileBlobCSIDriver.cs index 96715c9dc55f..43e22627ecec 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterStorageProfileBlobCSIDriver.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterStorageProfileBlobCSIDriver.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.ContainerService.Models public partial class ManagedClusterStorageProfileBlobCSIDriver { /// - /// Initializes a new instance of the - /// ManagedClusterStorageProfileBlobCSIDriver class. + /// Initializes a new instance of the ManagedClusterStorageProfileBlobCSIDriver class. /// public ManagedClusterStorageProfileBlobCSIDriver() { @@ -28,14 +21,15 @@ public ManagedClusterStorageProfileBlobCSIDriver() } /// - /// Initializes a new instance of the - /// ManagedClusterStorageProfileBlobCSIDriver class. + /// Initializes a new instance of the ManagedClusterStorageProfileBlobCSIDriver class. /// - /// Whether to enable AzureBlob CSI Driver. The - /// default value is false. + + /// Whether to enable AzureBlob CSI Driver. The default value is false. + /// public ManagedClusterStorageProfileBlobCSIDriver(bool? enabled = default(bool?)) + { - Enabled = enabled; + this.Enabled = enabled; CustomInit(); } @@ -44,12 +38,12 @@ public ManagedClusterStorageProfileBlobCSIDriver() /// partial void CustomInit(); + /// - /// Gets or sets whether to enable AzureBlob CSI Driver. The default - /// value is false. + /// Gets or sets whether to enable AzureBlob CSI Driver. The default value is + /// false. /// - [JsonProperty(PropertyName = "enabled")] - public bool? Enabled { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "enabled")] + public bool? Enabled {get; set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterStorageProfileDiskCSIDriver.cs b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterStorageProfileDiskCSIDriver.cs index 5bf6ecf04523..7e84dacfd25a 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterStorageProfileDiskCSIDriver.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterStorageProfileDiskCSIDriver.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.ContainerService.Models public partial class ManagedClusterStorageProfileDiskCSIDriver { /// - /// Initializes a new instance of the - /// ManagedClusterStorageProfileDiskCSIDriver class. + /// Initializes a new instance of the ManagedClusterStorageProfileDiskCSIDriver class. /// public ManagedClusterStorageProfileDiskCSIDriver() { @@ -28,14 +21,15 @@ public ManagedClusterStorageProfileDiskCSIDriver() } /// - /// Initializes a new instance of the - /// ManagedClusterStorageProfileDiskCSIDriver class. + /// Initializes a new instance of the ManagedClusterStorageProfileDiskCSIDriver class. /// - /// Whether to enable AzureDisk CSI Driver. The - /// default value is true. + + /// Whether to enable AzureDisk CSI Driver. The default value is true. + /// public ManagedClusterStorageProfileDiskCSIDriver(bool? enabled = default(bool?)) + { - Enabled = enabled; + this.Enabled = enabled; CustomInit(); } @@ -44,12 +38,12 @@ public ManagedClusterStorageProfileDiskCSIDriver() /// partial void CustomInit(); + /// - /// Gets or sets whether to enable AzureDisk CSI Driver. The default - /// value is true. + /// Gets or sets whether to enable AzureDisk CSI Driver. The default value is + /// true. /// - [JsonProperty(PropertyName = "enabled")] - public bool? Enabled { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "enabled")] + public bool? Enabled {get; set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterStorageProfileFileCSIDriver.cs b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterStorageProfileFileCSIDriver.cs index 0693a9f757a7..a55d117ac5c3 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterStorageProfileFileCSIDriver.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterStorageProfileFileCSIDriver.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.ContainerService.Models public partial class ManagedClusterStorageProfileFileCSIDriver { /// - /// Initializes a new instance of the - /// ManagedClusterStorageProfileFileCSIDriver class. + /// Initializes a new instance of the ManagedClusterStorageProfileFileCSIDriver class. /// public ManagedClusterStorageProfileFileCSIDriver() { @@ -28,14 +21,15 @@ public ManagedClusterStorageProfileFileCSIDriver() } /// - /// Initializes a new instance of the - /// ManagedClusterStorageProfileFileCSIDriver class. + /// Initializes a new instance of the ManagedClusterStorageProfileFileCSIDriver class. /// - /// Whether to enable AzureFile CSI Driver. The - /// default value is true. + + /// Whether to enable AzureFile CSI Driver. The default value is true. + /// public ManagedClusterStorageProfileFileCSIDriver(bool? enabled = default(bool?)) + { - Enabled = enabled; + this.Enabled = enabled; CustomInit(); } @@ -44,12 +38,12 @@ public ManagedClusterStorageProfileFileCSIDriver() /// partial void CustomInit(); + /// - /// Gets or sets whether to enable AzureFile CSI Driver. The default - /// value is true. + /// Gets or sets whether to enable AzureFile CSI Driver. The default value is + /// true. /// - [JsonProperty(PropertyName = "enabled")] - public bool? Enabled { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "enabled")] + public bool? Enabled {get; set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterStorageProfileSnapshotController.cs b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterStorageProfileSnapshotController.cs index 3b6761c14246..5bb79f463082 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterStorageProfileSnapshotController.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterStorageProfileSnapshotController.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.ContainerService.Models public partial class ManagedClusterStorageProfileSnapshotController { /// - /// Initializes a new instance of the - /// ManagedClusterStorageProfileSnapshotController class. + /// Initializes a new instance of the ManagedClusterStorageProfileSnapshotController class. /// public ManagedClusterStorageProfileSnapshotController() { @@ -28,14 +21,15 @@ public ManagedClusterStorageProfileSnapshotController() } /// - /// Initializes a new instance of the - /// ManagedClusterStorageProfileSnapshotController class. + /// Initializes a new instance of the ManagedClusterStorageProfileSnapshotController class. /// - /// Whether to enable Snapshot Controller. The - /// default value is true. + + /// Whether to enable Snapshot Controller. The default value is true. + /// public ManagedClusterStorageProfileSnapshotController(bool? enabled = default(bool?)) + { - Enabled = enabled; + this.Enabled = enabled; CustomInit(); } @@ -44,12 +38,12 @@ public ManagedClusterStorageProfileSnapshotController() /// partial void CustomInit(); + /// - /// Gets or sets whether to enable Snapshot Controller. The default - /// value is true. + /// Gets or sets whether to enable Snapshot Controller. The default value is + /// true. /// - [JsonProperty(PropertyName = "enabled")] - public bool? Enabled { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "enabled")] + public bool? Enabled {get; set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterUpgradeProfile.cs b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterUpgradeProfile.cs index 1125c142e9ef..3449a26af453 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterUpgradeProfile.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterUpgradeProfile.cs @@ -1,31 +1,20 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// /// The list of available upgrades for compute pools. /// - [Rest.Serialization.JsonTransformation] + [Microsoft.Rest.Serialization.JsonTransformation] public partial class ManagedClusterUpgradeProfile { /// - /// Initializes a new instance of the ManagedClusterUpgradeProfile - /// class. + /// Initializes a new instance of the ManagedClusterUpgradeProfile class. /// public ManagedClusterUpgradeProfile() { @@ -33,23 +22,31 @@ public ManagedClusterUpgradeProfile() } /// - /// Initializes a new instance of the ManagedClusterUpgradeProfile - /// class. + /// Initializes a new instance of the ManagedClusterUpgradeProfile class. /// - /// The list of available upgrade - /// versions for the control plane. - /// The list of available upgrade - /// versions for agent pools. - /// The ID of the upgrade profile. - /// The name of the upgrade profile. - /// The type of the upgrade profile. - public ManagedClusterUpgradeProfile(ManagedClusterPoolUpgradeProfile controlPlaneProfile, IList agentPoolProfiles, string id = default(string), string name = default(string), string type = default(string)) + + /// The ID of the upgrade profile. + /// + + /// The name of the upgrade profile. + /// + + /// The type of the upgrade profile. + /// + + /// The list of available upgrade versions for the control plane. + /// + + /// The list of available upgrade versions for agent pools. + /// + public ManagedClusterUpgradeProfile(ManagedClusterPoolUpgradeProfile controlPlaneProfile, System.Collections.Generic.IList agentPoolProfiles, string id = default(string), string name = default(string), string type = default(string)) + { - Id = id; - Name = name; - Type = type; - ControlPlaneProfile = controlPlaneProfile; - AgentPoolProfiles = agentPoolProfiles; + this.Id = id; + this.Name = name; + this.Type = type; + this.ControlPlaneProfile = controlPlaneProfile; + this.AgentPoolProfiles = agentPoolProfiles; CustomInit(); } @@ -58,61 +55,62 @@ public ManagedClusterUpgradeProfile() /// partial void CustomInit(); + /// /// Gets the ID of the upgrade profile. /// - [JsonProperty(PropertyName = "id")] - public string Id { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "id")] + public string Id {get; private set; } /// /// Gets the name of the upgrade profile. /// - [JsonProperty(PropertyName = "name")] - public string Name { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; private set; } /// /// Gets the type of the upgrade profile. /// - [JsonProperty(PropertyName = "type")] - public string Type { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public string Type {get; private set; } /// - /// Gets or sets the list of available upgrade versions for the control - /// plane. + /// Gets or sets the list of available upgrade versions for the control plane. /// - [JsonProperty(PropertyName = "properties.controlPlaneProfile")] - public ManagedClusterPoolUpgradeProfile ControlPlaneProfile { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.controlPlaneProfile")] + public ManagedClusterPoolUpgradeProfile ControlPlaneProfile {get; set; } /// - /// Gets or sets the list of available upgrade versions for agent - /// pools. + /// Gets or sets the list of available upgrade versions for agent pools. /// - [JsonProperty(PropertyName = "properties.agentPoolProfiles")] - public IList AgentPoolProfiles { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.agentPoolProfiles")] + public System.Collections.Generic.IList AgentPoolProfiles {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (ControlPlaneProfile == null) + if (this.ControlPlaneProfile == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "ControlPlaneProfile"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "ControlPlaneProfile"); } - if (AgentPoolProfiles == null) + if (this.AgentPoolProfiles == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "AgentPoolProfiles"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "AgentPoolProfiles"); } - if (ControlPlaneProfile != null) + + + + if (this.ControlPlaneProfile != null) { - ControlPlaneProfile.Validate(); + this.ControlPlaneProfile.Validate(); } - if (AgentPoolProfiles != null) + if (this.AgentPoolProfiles != null) { - foreach (var element in AgentPoolProfiles) + foreach (var element in this.AgentPoolProfiles) { if (element != null) { @@ -122,4 +120,4 @@ public virtual void Validate() } } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterUpgradeProfileProperties.cs b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterUpgradeProfileProperties.cs new file mode 100644 index 000000000000..ee37e8dbf9bb --- /dev/null +++ b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterUpgradeProfileProperties.cs @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.ContainerService.Models +{ + using System.Linq; + + /// + /// Control plane and agent pool upgrade profiles. + /// + public partial class ManagedClusterUpgradeProfileProperties + { + /// + /// Initializes a new instance of the ManagedClusterUpgradeProfileProperties class. + /// + public ManagedClusterUpgradeProfileProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ManagedClusterUpgradeProfileProperties class. + /// + + /// The list of available upgrade versions for the control plane. + /// + + /// The list of available upgrade versions for agent pools. + /// + public ManagedClusterUpgradeProfileProperties(ManagedClusterPoolUpgradeProfile controlPlaneProfile, System.Collections.Generic.IList agentPoolProfiles) + + { + this.ControlPlaneProfile = controlPlaneProfile; + this.AgentPoolProfiles = agentPoolProfiles; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the list of available upgrade versions for the control plane. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "controlPlaneProfile")] + public ManagedClusterPoolUpgradeProfile ControlPlaneProfile {get; set; } + + /// + /// Gets or sets the list of available upgrade versions for agent pools. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "agentPoolProfiles")] + public System.Collections.Generic.IList AgentPoolProfiles {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.ControlPlaneProfile == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "ControlPlaneProfile"); + } + if (this.AgentPoolProfiles == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "AgentPoolProfiles"); + } + if (this.ControlPlaneProfile != null) + { + this.ControlPlaneProfile.Validate(); + } + if (this.AgentPoolProfiles != null) + { + foreach (var element in this.AgentPoolProfiles) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterWindowsProfile.cs b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterWindowsProfile.cs index 54bc1bf9d27a..fed520d8be1d 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterWindowsProfile.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterWindowsProfile.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +13,7 @@ namespace Microsoft.Azure.Management.ContainerService.Models public partial class ManagedClusterWindowsProfile { /// - /// Initializes a new instance of the ManagedClusterWindowsProfile - /// class. + /// Initializes a new instance of the ManagedClusterWindowsProfile class. /// public ManagedClusterWindowsProfile() { @@ -29,44 +21,47 @@ public ManagedClusterWindowsProfile() } /// - /// Initializes a new instance of the ManagedClusterWindowsProfile - /// class. + /// Initializes a new instance of the ManagedClusterWindowsProfile class. /// - /// Specifies the name of the administrator - /// account. <br><br> **Restriction:** Cannot end in "." - /// <br><br> **Disallowed values:** "administrator", - /// "admin", "user", "user1", "test", "user2", "test1", "user3", - /// "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", - /// "backup", "console", "david", "guest", "john", "owner", "root", - /// "server", "sql", "support", "support_388945a0", "sys", "test2", - /// "test3", "user4", "user5". <br><br> **Minimum-length:** - /// 1 character <br><br> **Max-length:** 20 - /// characters - /// Specifies the password of the - /// administrator account. <br><br> **Minimum-length:** 8 - /// characters <br><br> **Max-length:** 123 characters - /// <br><br> **Complexity requirements:** 3 out of 4 - /// conditions below need to be fulfilled <br> Has lower - /// characters <br>Has upper characters <br> Has a digit - /// <br> Has a special character (Regex match [\W_]) - /// <br><br> **Disallowed values:** "abc@123", "P@$$w0rd", - /// "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", - /// "Password1", "Password22", "iloveyou!" - /// The license type to use for Windows VMs. - /// See [Azure Hybrid User - /// Benefits](https://azure.microsoft.com/pricing/hybrid-benefit/faq/) - /// for more details. Possible values include: 'None', - /// 'Windows_Server' - /// Whether to enable CSI proxy. - /// The Windows gMSA Profile in the Managed - /// Cluster. - public ManagedClusterWindowsProfile(string adminUsername, string adminPassword = default(string), string licenseType = default(string), bool? enableCSIProxy = default(bool?), WindowsGmsaProfile gmsaProfile = default(WindowsGmsaProfile)) + + /// Specifies the name of the administrator account. <br><br> **Restriction:** + /// Cannot end in "." <br><br> **Disallowed values:** "administrator", "admin", + /// "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", + /// "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", + /// "guest", "john", "owner", "root", "server", "sql", "support", + /// "support_388945a0", "sys", "test2", "test3", "user4", "user5". <br><br> + /// **Minimum-length:** 1 character <br><br> **Max-length:** 20 characters + /// + + /// Specifies the password of the administrator account. <br><br> + /// **Minimum-length:** 8 characters <br><br> **Max-length:** 123 characters + /// <br><br> **Complexity requirements:** 3 out of 4 conditions below need to + /// be fulfilled <br> Has lower characters <br>Has upper characters <br> Has a + /// digit <br> Has a special character (Regex match [\W_]) <br><br> + /// **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", + /// "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", + /// "iloveyou!" + /// + + /// The license type to use for Windows VMs. See [Azure Hybrid User + /// Benefits](https://azure.microsoft.com/pricing/hybrid-benefit/faq/) for more + /// details. + /// Possible values include: 'None', 'Windows_Server' + + /// For more details on CSI proxy, see the [CSI proxy GitHub + /// repo](https://github.com/kubernetes-csi/csi-proxy). + /// + + /// The Windows gMSA Profile in the Managed Cluster. + /// + public ManagedClusterWindowsProfile(string adminUsername, string adminPassword = default(string), string licenseType = default(string), bool? enableCsiProxy = default(bool?), WindowsGmsaProfile gmsaProfile = default(WindowsGmsaProfile)) + { - AdminUsername = adminUsername; - AdminPassword = adminPassword; - LicenseType = licenseType; - EnableCSIProxy = enableCSIProxy; - GmsaProfile = gmsaProfile; + this.AdminUsername = adminUsername; + this.AdminPassword = adminPassword; + this.LicenseType = licenseType; + this.EnableCsiProxy = enableCsiProxy; + this.GmsaProfile = gmsaProfile; CustomInit(); } @@ -75,75 +70,69 @@ public ManagedClusterWindowsProfile() /// partial void CustomInit(); + /// - /// Gets or sets specifies the name of the administrator account. - /// &lt;br&gt;&lt;br&gt; **Restriction:** Cannot end in - /// "." &lt;br&gt;&lt;br&gt; **Disallowed values:** - /// "administrator", "admin", "user", "user1", "test", "user2", - /// "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", - /// "admin2", "aspnet", "backup", "console", "david", "guest", "john", - /// "owner", "root", "server", "sql", "support", "support_388945a0", - /// "sys", "test2", "test3", "user4", "user5". - /// &lt;br&gt;&lt;br&gt; **Minimum-length:** 1 - /// character &lt;br&gt;&lt;br&gt; **Max-length:** 20 - /// characters + /// Gets or sets specifies the name of the administrator account. <br><br> + /// **Restriction:** Cannot end in "." <br><br> **Disallowed values:** + /// "administrator", "admin", "user", "user1", "test", "user2", "test1", + /// "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", + /// "backup", "console", "david", "guest", "john", "owner", "root", "server", + /// "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", + /// "user5". <br><br> **Minimum-length:** 1 character <br><br> **Max-length:** + /// 20 characters /// - [JsonProperty(PropertyName = "adminUsername")] - public string AdminUsername { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "adminUsername")] + public string AdminUsername {get; set; } /// - /// Gets or sets specifies the password of the administrator account. - /// &lt;br&gt;&lt;br&gt; **Minimum-length:** 8 - /// characters &lt;br&gt;&lt;br&gt; **Max-length:** 123 - /// characters &lt;br&gt;&lt;br&gt; **Complexity - /// requirements:** 3 out of 4 conditions below need to be fulfilled - /// &lt;br&gt; Has lower characters &lt;br&gt;Has upper - /// characters &lt;br&gt; Has a digit &lt;br&gt; Has a - /// special character (Regex match [\W_]) - /// &lt;br&gt;&lt;br&gt; **Disallowed values:** - /// "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", - /// "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" + /// Gets or sets specifies the password of the administrator account. <br><br> + /// **Minimum-length:** 8 characters <br><br> **Max-length:** 123 characters + /// <br><br> **Complexity requirements:** 3 out of 4 conditions below need to + /// be fulfilled <br> Has lower characters <br>Has upper characters <br> Has a + /// digit <br> Has a special character (Regex match [\W_]) <br><br> + /// **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", + /// "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", + /// "iloveyou!" /// - [JsonProperty(PropertyName = "adminPassword")] - public string AdminPassword { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "adminPassword")] + public string AdminPassword {get; set; } /// - /// Gets or sets the license type to use for Windows VMs. See [Azure - /// Hybrid User - /// Benefits](https://azure.microsoft.com/pricing/hybrid-benefit/faq/) - /// for more details. Possible values include: 'None', 'Windows_Server' + /// Gets or sets the license type to use for Windows VMs. See [Azure Hybrid + /// User Benefits](https://azure.microsoft.com/pricing/hybrid-benefit/faq/) for + /// more details. Possible values include: 'None', 'Windows_Server' /// - [JsonProperty(PropertyName = "licenseType")] - public string LicenseType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "licenseType")] + public string LicenseType {get; set; } /// - /// Gets or sets whether to enable CSI proxy. - /// - /// - /// For more details on CSI proxy, see the [CSI proxy GitHub + /// Gets or sets for more details on CSI proxy, see the [CSI proxy GitHub /// repo](https://github.com/kubernetes-csi/csi-proxy). - /// - [JsonProperty(PropertyName = "enableCSIProxy")] - public bool? EnableCSIProxy { get; set; } + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "enableCSIProxy")] + public bool? EnableCsiProxy {get; set; } /// /// Gets or sets the Windows gMSA Profile in the Managed Cluster. /// - [JsonProperty(PropertyName = "gmsaProfile")] - public WindowsGmsaProfile GmsaProfile { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "gmsaProfile")] + public WindowsGmsaProfile GmsaProfile {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (AdminUsername == null) + if (this.AdminUsername == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "AdminUsername"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "AdminUsername"); } + + + + } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterWorkloadAutoScalerProfile.cs b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterWorkloadAutoScalerProfile.cs index 153d1e0ed864..7074b62a5aab 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterWorkloadAutoScalerProfile.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterWorkloadAutoScalerProfile.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.ContainerService.Models public partial class ManagedClusterWorkloadAutoScalerProfile { /// - /// Initializes a new instance of the - /// ManagedClusterWorkloadAutoScalerProfile class. + /// Initializes a new instance of the ManagedClusterWorkloadAutoScalerProfile class. /// public ManagedClusterWorkloadAutoScalerProfile() { @@ -28,12 +21,16 @@ public ManagedClusterWorkloadAutoScalerProfile() } /// - /// Initializes a new instance of the - /// ManagedClusterWorkloadAutoScalerProfile class. + /// Initializes a new instance of the ManagedClusterWorkloadAutoScalerProfile class. /// + + /// KEDA (Kubernetes Event-driven Autoscaling) settings for the workload + /// auto-scaler profile. + /// public ManagedClusterWorkloadAutoScalerProfile(ManagedClusterWorkloadAutoScalerProfileKeda keda = default(ManagedClusterWorkloadAutoScalerProfileKeda)) + { - Keda = keda; + this.Keda = keda; CustomInit(); } @@ -42,23 +39,25 @@ public ManagedClusterWorkloadAutoScalerProfile() /// partial void CustomInit(); + /// + /// Gets or sets kEDA (Kubernetes Event-driven Autoscaling) settings for the + /// workload auto-scaler profile. /// - [JsonProperty(PropertyName = "keda")] - public ManagedClusterWorkloadAutoScalerProfileKeda Keda { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "keda")] + public ManagedClusterWorkloadAutoScalerProfileKeda Keda {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (Keda != null) + if (this.Keda != null) { - Keda.Validate(); + this.Keda.Validate(); } } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterWorkloadAutoScalerProfileKeda.cs b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterWorkloadAutoScalerProfileKeda.cs index 201f9629e965..f1a988769af6 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterWorkloadAutoScalerProfileKeda.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterWorkloadAutoScalerProfileKeda.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -20,8 +14,7 @@ namespace Microsoft.Azure.Management.ContainerService.Models public partial class ManagedClusterWorkloadAutoScalerProfileKeda { /// - /// Initializes a new instance of the - /// ManagedClusterWorkloadAutoScalerProfileKeda class. + /// Initializes a new instance of the ManagedClusterWorkloadAutoScalerProfileKeda class. /// public ManagedClusterWorkloadAutoScalerProfileKeda() { @@ -29,13 +22,15 @@ public ManagedClusterWorkloadAutoScalerProfileKeda() } /// - /// Initializes a new instance of the - /// ManagedClusterWorkloadAutoScalerProfileKeda class. + /// Initializes a new instance of the ManagedClusterWorkloadAutoScalerProfileKeda class. /// - /// Whether to enable KEDA. + + /// Whether to enable KEDA. + /// public ManagedClusterWorkloadAutoScalerProfileKeda(bool enabled) + { - Enabled = enabled; + this.Enabled = enabled; CustomInit(); } @@ -44,16 +39,16 @@ public ManagedClusterWorkloadAutoScalerProfileKeda(bool enabled) /// partial void CustomInit(); + /// /// Gets or sets whether to enable KEDA. /// - [JsonProperty(PropertyName = "enabled")] - public bool Enabled { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "enabled")] + public bool Enabled {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() @@ -61,4 +56,4 @@ public virtual void Validate() //Nothing to validate } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ManagedClustersAbortLatestOperationHeaders.cs b/src/Aks/Aks.Sdk/Generated/Models/ManagedClustersAbortLatestOperationHeaders.cs index b7780b0ec190..dbf4ba9592ac 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ManagedClustersAbortLatestOperationHeaders.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ManagedClustersAbortLatestOperationHeaders.cs @@ -1,26 +1,16 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; using System.Linq; - /// - /// Defines headers for AbortLatestOperation operation. - /// public partial class ManagedClustersAbortLatestOperationHeaders { /// - /// Initializes a new instance of the - /// ManagedClustersAbortLatestOperationHeaders class. + /// Initializes a new instance of the ManagedClustersAbortLatestOperationHeaders class. /// public ManagedClustersAbortLatestOperationHeaders() { @@ -28,17 +18,19 @@ public ManagedClustersAbortLatestOperationHeaders() } /// - /// Initializes a new instance of the - /// ManagedClustersAbortLatestOperationHeaders class. + /// Initializes a new instance of the ManagedClustersAbortLatestOperationHeaders class. /// - /// URL to query for status of the - /// operation. - /// URL to query for status of the - /// operation. + + /// + /// + + /// + /// public ManagedClustersAbortLatestOperationHeaders(string location = default(string), string azureAsyncOperation = default(string)) + { - Location = location; - AzureAsyncOperation = azureAsyncOperation; + this.Location = location; + this.AzureAsyncOperation = azureAsyncOperation; CustomInit(); } @@ -47,17 +39,17 @@ public ManagedClustersAbortLatestOperationHeaders() /// partial void CustomInit(); + /// - /// Gets or sets URL to query for status of the operation. + /// Gets or sets /// - [JsonProperty(PropertyName = "location")] - public string Location { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "location")] + public string Location {get; set; } /// - /// Gets or sets URL to query for status of the operation. + /// Gets or sets /// - [JsonProperty(PropertyName = "Azure-AsyncOperation")] - public string AzureAsyncOperation { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "Azure-AsyncOperation")] + public string AzureAsyncOperation {get; set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ManagedClustersDeleteHeaders.cs b/src/Aks/Aks.Sdk/Generated/Models/ManagedClustersDeleteHeaders.cs index 0853e7adffbb..f0d4822abcf7 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ManagedClustersDeleteHeaders.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ManagedClustersDeleteHeaders.cs @@ -1,26 +1,16 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; using System.Linq; - /// - /// Defines headers for Delete operation. - /// public partial class ManagedClustersDeleteHeaders { /// - /// Initializes a new instance of the ManagedClustersDeleteHeaders - /// class. + /// Initializes a new instance of the ManagedClustersDeleteHeaders class. /// public ManagedClustersDeleteHeaders() { @@ -28,14 +18,15 @@ public ManagedClustersDeleteHeaders() } /// - /// Initializes a new instance of the ManagedClustersDeleteHeaders - /// class. + /// Initializes a new instance of the ManagedClustersDeleteHeaders class. /// - /// URL to query for status of the - /// operation. + + /// + /// public ManagedClustersDeleteHeaders(string location = default(string)) + { - Location = location; + this.Location = location; CustomInit(); } @@ -44,11 +35,11 @@ public ManagedClustersDeleteHeaders() /// partial void CustomInit(); + /// - /// Gets or sets URL to query for status of the operation. + /// Gets or sets /// - [JsonProperty(PropertyName = "Location")] - public string Location { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "Location")] + public string Location {get; set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ManagedClustersGetCommandResultHeaders.cs b/src/Aks/Aks.Sdk/Generated/Models/ManagedClustersGetCommandResultHeaders.cs index 6964f3e7a4da..c31f92172486 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ManagedClustersGetCommandResultHeaders.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ManagedClustersGetCommandResultHeaders.cs @@ -1,26 +1,16 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; using System.Linq; - /// - /// Defines headers for GetCommandResult operation. - /// public partial class ManagedClustersGetCommandResultHeaders { /// - /// Initializes a new instance of the - /// ManagedClustersGetCommandResultHeaders class. + /// Initializes a new instance of the ManagedClustersGetCommandResultHeaders class. /// public ManagedClustersGetCommandResultHeaders() { @@ -28,14 +18,15 @@ public ManagedClustersGetCommandResultHeaders() } /// - /// Initializes a new instance of the - /// ManagedClustersGetCommandResultHeaders class. + /// Initializes a new instance of the ManagedClustersGetCommandResultHeaders class. /// - /// URL to query for status of the - /// operation. + + /// + /// public ManagedClustersGetCommandResultHeaders(string location = default(string)) + { - Location = location; + this.Location = location; CustomInit(); } @@ -44,11 +35,11 @@ public ManagedClustersGetCommandResultHeaders() /// partial void CustomInit(); + /// - /// Gets or sets URL to query for status of the operation. + /// Gets or sets /// - [JsonProperty(PropertyName = "Location")] - public string Location { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "Location")] + public string Location {get; set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ManagedClustersResetAADProfileHeaders.cs b/src/Aks/Aks.Sdk/Generated/Models/ManagedClustersResetAADProfileHeaders.cs index 0388c9157da8..e27b7c9dd3ff 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ManagedClustersResetAADProfileHeaders.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ManagedClustersResetAADProfileHeaders.cs @@ -1,41 +1,32 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; using System.Linq; - /// - /// Defines headers for ResetAADProfile operation. - /// - public partial class ManagedClustersResetAADProfileHeaders + public partial class ManagedClustersResetAadProfileHeaders { /// - /// Initializes a new instance of the - /// ManagedClustersResetAADProfileHeaders class. + /// Initializes a new instance of the ManagedClustersResetAadProfileHeaders class. /// - public ManagedClustersResetAADProfileHeaders() + public ManagedClustersResetAadProfileHeaders() { CustomInit(); } /// - /// Initializes a new instance of the - /// ManagedClustersResetAADProfileHeaders class. + /// Initializes a new instance of the ManagedClustersResetAadProfileHeaders class. /// - /// URL to query for status of the - /// operation. - public ManagedClustersResetAADProfileHeaders(string location = default(string)) + + /// + /// + public ManagedClustersResetAadProfileHeaders(string location = default(string)) + { - Location = location; + this.Location = location; CustomInit(); } @@ -44,11 +35,11 @@ public ManagedClustersResetAADProfileHeaders() /// partial void CustomInit(); + /// - /// Gets or sets URL to query for status of the operation. + /// Gets or sets /// - [JsonProperty(PropertyName = "Location")] - public string Location { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "Location")] + public string Location {get; set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ManagedClustersResetServicePrincipalProfileHeaders.cs b/src/Aks/Aks.Sdk/Generated/Models/ManagedClustersResetServicePrincipalProfileHeaders.cs index cb8159caac0c..fdeb15835168 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ManagedClustersResetServicePrincipalProfileHeaders.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ManagedClustersResetServicePrincipalProfileHeaders.cs @@ -1,26 +1,16 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; using System.Linq; - /// - /// Defines headers for ResetServicePrincipalProfile operation. - /// public partial class ManagedClustersResetServicePrincipalProfileHeaders { /// - /// Initializes a new instance of the - /// ManagedClustersResetServicePrincipalProfileHeaders class. + /// Initializes a new instance of the ManagedClustersResetServicePrincipalProfileHeaders class. /// public ManagedClustersResetServicePrincipalProfileHeaders() { @@ -28,14 +18,15 @@ public ManagedClustersResetServicePrincipalProfileHeaders() } /// - /// Initializes a new instance of the - /// ManagedClustersResetServicePrincipalProfileHeaders class. + /// Initializes a new instance of the ManagedClustersResetServicePrincipalProfileHeaders class. /// - /// URL to query for status of the - /// operation. + + /// + /// public ManagedClustersResetServicePrincipalProfileHeaders(string location = default(string)) + { - Location = location; + this.Location = location; CustomInit(); } @@ -44,11 +35,11 @@ public ManagedClustersResetServicePrincipalProfileHeaders() /// partial void CustomInit(); + /// - /// Gets or sets URL to query for status of the operation. + /// Gets or sets /// - [JsonProperty(PropertyName = "Location")] - public string Location { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "Location")] + public string Location {get; set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ManagedClustersRotateClusterCertificatesHeaders.cs b/src/Aks/Aks.Sdk/Generated/Models/ManagedClustersRotateClusterCertificatesHeaders.cs index f1cdd5194ef8..ca2b8e60948b 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ManagedClustersRotateClusterCertificatesHeaders.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ManagedClustersRotateClusterCertificatesHeaders.cs @@ -1,26 +1,16 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; using System.Linq; - /// - /// Defines headers for RotateClusterCertificates operation. - /// public partial class ManagedClustersRotateClusterCertificatesHeaders { /// - /// Initializes a new instance of the - /// ManagedClustersRotateClusterCertificatesHeaders class. + /// Initializes a new instance of the ManagedClustersRotateClusterCertificatesHeaders class. /// public ManagedClustersRotateClusterCertificatesHeaders() { @@ -28,14 +18,15 @@ public ManagedClustersRotateClusterCertificatesHeaders() } /// - /// Initializes a new instance of the - /// ManagedClustersRotateClusterCertificatesHeaders class. + /// Initializes a new instance of the ManagedClustersRotateClusterCertificatesHeaders class. /// - /// URL to query for status of the - /// operation. + + /// + /// public ManagedClustersRotateClusterCertificatesHeaders(string location = default(string)) + { - Location = location; + this.Location = location; CustomInit(); } @@ -44,11 +35,11 @@ public ManagedClustersRotateClusterCertificatesHeaders() /// partial void CustomInit(); + /// - /// Gets or sets URL to query for status of the operation. + /// Gets or sets /// - [JsonProperty(PropertyName = "Location")] - public string Location { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "Location")] + public string Location {get; set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ManagedClustersRotateServiceAccountSigningKeysHeaders.cs b/src/Aks/Aks.Sdk/Generated/Models/ManagedClustersRotateServiceAccountSigningKeysHeaders.cs index bf5396175dc1..c0575bb147ca 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ManagedClustersRotateServiceAccountSigningKeysHeaders.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ManagedClustersRotateServiceAccountSigningKeysHeaders.cs @@ -1,26 +1,16 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; using System.Linq; - /// - /// Defines headers for RotateServiceAccountSigningKeys operation. - /// public partial class ManagedClustersRotateServiceAccountSigningKeysHeaders { /// - /// Initializes a new instance of the - /// ManagedClustersRotateServiceAccountSigningKeysHeaders class. + /// Initializes a new instance of the ManagedClustersRotateServiceAccountSigningKeysHeaders class. /// public ManagedClustersRotateServiceAccountSigningKeysHeaders() { @@ -28,12 +18,15 @@ public ManagedClustersRotateServiceAccountSigningKeysHeaders() } /// - /// Initializes a new instance of the - /// ManagedClustersRotateServiceAccountSigningKeysHeaders class. + /// Initializes a new instance of the ManagedClustersRotateServiceAccountSigningKeysHeaders class. /// + + /// + /// public ManagedClustersRotateServiceAccountSigningKeysHeaders(string location = default(string)) + { - Location = location; + this.Location = location; CustomInit(); } @@ -42,10 +35,11 @@ public ManagedClustersRotateServiceAccountSigningKeysHeaders() /// partial void CustomInit(); + /// + /// Gets or sets /// - [JsonProperty(PropertyName = "Location")] - public string Location { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "Location")] + public string Location {get; set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ManagedClustersRunCommandHeaders.cs b/src/Aks/Aks.Sdk/Generated/Models/ManagedClustersRunCommandHeaders.cs index 19abc6cf8c79..1354637316ca 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ManagedClustersRunCommandHeaders.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ManagedClustersRunCommandHeaders.cs @@ -1,26 +1,16 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; using System.Linq; - /// - /// Defines headers for RunCommand operation. - /// public partial class ManagedClustersRunCommandHeaders { /// - /// Initializes a new instance of the ManagedClustersRunCommandHeaders - /// class. + /// Initializes a new instance of the ManagedClustersRunCommandHeaders class. /// public ManagedClustersRunCommandHeaders() { @@ -28,14 +18,15 @@ public ManagedClustersRunCommandHeaders() } /// - /// Initializes a new instance of the ManagedClustersRunCommandHeaders - /// class. + /// Initializes a new instance of the ManagedClustersRunCommandHeaders class. /// - /// URL to query for status of the - /// operation. + + /// + /// public ManagedClustersRunCommandHeaders(string location = default(string)) + { - Location = location; + this.Location = location; CustomInit(); } @@ -44,11 +35,11 @@ public ManagedClustersRunCommandHeaders() /// partial void CustomInit(); + /// - /// Gets or sets URL to query for status of the operation. + /// Gets or sets /// - [JsonProperty(PropertyName = "Location")] - public string Location { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "Location")] + public string Location {get; set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ManagedClustersStartHeaders.cs b/src/Aks/Aks.Sdk/Generated/Models/ManagedClustersStartHeaders.cs index 87fbc191570d..2a581a283576 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ManagedClustersStartHeaders.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ManagedClustersStartHeaders.cs @@ -1,26 +1,16 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; using System.Linq; - /// - /// Defines headers for Start operation. - /// public partial class ManagedClustersStartHeaders { /// - /// Initializes a new instance of the ManagedClustersStartHeaders - /// class. + /// Initializes a new instance of the ManagedClustersStartHeaders class. /// public ManagedClustersStartHeaders() { @@ -28,14 +18,15 @@ public ManagedClustersStartHeaders() } /// - /// Initializes a new instance of the ManagedClustersStartHeaders - /// class. + /// Initializes a new instance of the ManagedClustersStartHeaders class. /// - /// URL to query for status of the - /// operation. + + /// + /// public ManagedClustersStartHeaders(string location = default(string)) + { - Location = location; + this.Location = location; CustomInit(); } @@ -44,11 +35,11 @@ public ManagedClustersStartHeaders() /// partial void CustomInit(); + /// - /// Gets or sets URL to query for status of the operation. + /// Gets or sets /// - [JsonProperty(PropertyName = "Location")] - public string Location { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "Location")] + public string Location {get; set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ManagedClustersStopHeaders.cs b/src/Aks/Aks.Sdk/Generated/Models/ManagedClustersStopHeaders.cs index 1b166ef3c620..f4bf6bb0eef9 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ManagedClustersStopHeaders.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ManagedClustersStopHeaders.cs @@ -1,21 +1,12 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; using System.Linq; - /// - /// Defines headers for Stop operation. - /// public partial class ManagedClustersStopHeaders { /// @@ -29,11 +20,13 @@ public ManagedClustersStopHeaders() /// /// Initializes a new instance of the ManagedClustersStopHeaders class. /// - /// URL to query for status of the - /// operation. + + /// + /// public ManagedClustersStopHeaders(string location = default(string)) + { - Location = location; + this.Location = location; CustomInit(); } @@ -42,11 +35,11 @@ public ManagedClustersStopHeaders() /// partial void CustomInit(); + /// - /// Gets or sets URL to query for status of the operation. + /// Gets or sets /// - [JsonProperty(PropertyName = "Location")] - public string Location { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "Location")] + public string Location {get; set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterIdentityUserAssignedIdentitiesValue.cs b/src/Aks/Aks.Sdk/Generated/Models/ManagedServiceIdentityUserAssignedIdentitiesValue.cs similarity index 55% rename from src/Aks/Aks.Sdk/Generated/Models/ManagedClusterIdentityUserAssignedIdentitiesValue.cs rename to src/Aks/Aks.Sdk/Generated/Models/ManagedServiceIdentityUserAssignedIdentitiesValue.cs index b8a643eb2b6d..3b3c36092551 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ManagedClusterIdentityUserAssignedIdentitiesValue.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ManagedServiceIdentityUserAssignedIdentitiesValue.cs @@ -1,41 +1,36 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; using System.Linq; - public partial class ManagedClusterIdentityUserAssignedIdentitiesValue + public partial class ManagedServiceIdentityUserAssignedIdentitiesValue { /// - /// Initializes a new instance of the - /// ManagedClusterIdentityUserAssignedIdentitiesValue class. + /// Initializes a new instance of the ManagedServiceIdentityUserAssignedIdentitiesValue class. /// - public ManagedClusterIdentityUserAssignedIdentitiesValue() + public ManagedServiceIdentityUserAssignedIdentitiesValue() { CustomInit(); } /// - /// Initializes a new instance of the - /// ManagedClusterIdentityUserAssignedIdentitiesValue class. + /// Initializes a new instance of the ManagedServiceIdentityUserAssignedIdentitiesValue class. /// - /// The principal id of user assigned - /// identity. - /// The client id of user assigned - /// identity. - public ManagedClusterIdentityUserAssignedIdentitiesValue(string principalId = default(string), string clientId = default(string)) + + /// The principal id of user assigned identity. + /// + + /// The client id of user assigned identity. + /// + public ManagedServiceIdentityUserAssignedIdentitiesValue(string principalId = default(string), string clientId = default(string)) + { - PrincipalId = principalId; - ClientId = clientId; + this.PrincipalId = principalId; + this.ClientId = clientId; CustomInit(); } @@ -44,17 +39,17 @@ public ManagedClusterIdentityUserAssignedIdentitiesValue() /// partial void CustomInit(); + /// /// Gets the principal id of user assigned identity. /// - [JsonProperty(PropertyName = "principalId")] - public string PrincipalId { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "principalId")] + public string PrincipalId {get; private set; } /// /// Gets the client id of user assigned identity. /// - [JsonProperty(PropertyName = "clientId")] - public string ClientId { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "clientId")] + public string ClientId {get; private set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/NetworkDataplane.cs b/src/Aks/Aks.Sdk/Generated/Models/NetworkDataplane.cs index ed5677d68dd6..139acaade3a5 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/NetworkDataplane.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/NetworkDataplane.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.ContainerService.Models /// /// Defines values for NetworkDataplane. /// + + public static class NetworkDataplane { /// @@ -21,10 +18,8 @@ public static class NetworkDataplane /// public const string Azure = "azure"; /// - /// Use Cilium network dataplane. See [Azure CNI Powered by - /// Cilium](https://learn.microsoft.com/azure/aks/azure-cni-powered-by-cilium) - /// for more information. + /// Use Cilium network dataplane. See [Azure CNI Powered by Cilium](https://learn.microsoft.com/azure/aks/azure-cni-powered-by-cilium) for more information. /// public const string Cilium = "cilium"; } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/NetworkMode.cs b/src/Aks/Aks.Sdk/Generated/Models/NetworkMode.cs index 0aae0378dfa4..5c080f8181fc 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/NetworkMode.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/NetworkMode.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { @@ -14,13 +9,12 @@ namespace Microsoft.Azure.Management.ContainerService.Models /// /// Defines values for NetworkMode. /// + + public static class NetworkMode { /// - /// No bridge is created. Intra-VM Pod to Pod communication is through - /// IP routes created by Azure CNI. See [Transparent - /// Mode](https://docs.microsoft.com/azure/aks/faq#transparent-mode) - /// for more information. + /// No bridge is created. Intra-VM Pod to Pod communication is through IP routes created by Azure CNI. See [Transparent Mode](https://docs.microsoft.com/azure/aks/faq#transparent-mode) for more information. /// public const string Transparent = "transparent"; /// @@ -28,4 +22,4 @@ public static class NetworkMode /// public const string Bridge = "bridge"; } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/NetworkPlugin.cs b/src/Aks/Aks.Sdk/Generated/Models/NetworkPlugin.cs index 08ae031867cc..4184379a4f76 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/NetworkPlugin.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/NetworkPlugin.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { @@ -14,25 +9,21 @@ namespace Microsoft.Azure.Management.ContainerService.Models /// /// Defines values for NetworkPlugin. /// + + public static class NetworkPlugin { /// - /// Use the Azure CNI network plugin. See [Azure CNI (advanced) - /// networking](https://docs.microsoft.com/azure/aks/concepts-network#azure-cni-advanced-networking) - /// for more information. + /// Use the Azure CNI network plugin. See [Azure CNI (advanced) networking](https://docs.microsoft.com/azure/aks/concepts-network#azure-cni-advanced-networking) for more information. /// public const string Azure = "azure"; /// - /// Use the Kubenet network plugin. See [Kubenet (basic) - /// networking](https://docs.microsoft.com/azure/aks/concepts-network#kubenet-basic-networking) - /// for more information. + /// Use the Kubenet network plugin. See [Kubenet (basic) networking](https://docs.microsoft.com/azure/aks/concepts-network#kubenet-basic-networking) for more information. /// public const string Kubenet = "kubenet"; /// - /// No CNI plugin is pre-installed. See [BYO - /// CNI](https://docs.microsoft.com/en-us/azure/aks/use-byo-cni) for - /// more information. + /// No CNI plugin is pre-installed. See [BYO CNI](https://docs.microsoft.com/en-us/azure/aks/use-byo-cni) for more information. /// public const string None = "none"; } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/NetworkPluginMode.cs b/src/Aks/Aks.Sdk/Generated/Models/NetworkPluginMode.cs index 302e9a7a43c8..120d42994ab6 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/NetworkPluginMode.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/NetworkPluginMode.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { @@ -14,14 +9,13 @@ namespace Microsoft.Azure.Management.ContainerService.Models /// /// Defines values for NetworkPluginMode. /// + + public static class NetworkPluginMode { /// - /// Used with networkPlugin=azure, pods are given IPs from the PodCIDR - /// address space but use Azure Routing Domains rather than Kubenet's - /// method of route tables. For more information visit - /// https://aka.ms/aks/azure-cni-overlay. + /// Used with networkPlugin=azure, pods are given IPs from the PodCIDR address space but use Azure Routing Domains rather than Kubenet's method of route tables. For more information visit https://aka.ms/aks/azure-cni-overlay. /// public const string Overlay = "overlay"; } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/NetworkPolicy.cs b/src/Aks/Aks.Sdk/Generated/Models/NetworkPolicy.cs index e29f12c4a425..2edb85a08677 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/NetworkPolicy.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/NetworkPolicy.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { @@ -14,26 +9,21 @@ namespace Microsoft.Azure.Management.ContainerService.Models /// /// Defines values for NetworkPolicy. /// + + public static class NetworkPolicy { /// - /// Use Calico network policies. See [differences between Azure and - /// Calico - /// policies](https://docs.microsoft.com/azure/aks/use-network-policies#differences-between-azure-and-calico-policies-and-their-capabilities) - /// for more information. + /// Use Calico network policies. See [differences between Azure and Calico policies](https://docs.microsoft.com/azure/aks/use-network-policies#differences-between-azure-and-calico-policies-and-their-capabilities) for more information. /// public const string Calico = "calico"; /// - /// Use Azure network policies. See [differences between Azure and - /// Calico - /// policies](https://docs.microsoft.com/azure/aks/use-network-policies#differences-between-azure-and-calico-policies-and-their-capabilities) - /// for more information. + /// Use Azure network policies. See [differences between Azure and Calico policies](https://docs.microsoft.com/azure/aks/use-network-policies#differences-between-azure-and-calico-policies-and-their-capabilities) for more information. /// public const string Azure = "azure"; /// - /// Use Cilium to enforce network policies. This requires - /// networkDataplane to be 'cilium'. + /// Use Cilium to enforce network policies. This requires networkDataplane to be 'cilium'. /// public const string Cilium = "cilium"; } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/OSDiskType.cs b/src/Aks/Aks.Sdk/Generated/Models/OSDiskType.cs index 7777d8ceafb2..ba62f588d06e 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/OSDiskType.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/OSDiskType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { @@ -14,22 +9,17 @@ namespace Microsoft.Azure.Management.ContainerService.Models /// /// Defines values for OSDiskType. /// + + public static class OSDiskType { /// - /// Azure replicates the operating system disk for a virtual machine to - /// Azure storage to avoid data loss should the VM need to be relocated - /// to another host. Since containers aren't designed to have local - /// state persisted, this behavior offers limited value while providing - /// some drawbacks, including slower node provisioning and higher - /// read/write latency. + /// Azure replicates the operating system disk for a virtual machine to Azure storage to avoid data loss should the VM need to be relocated to another host. Since containers aren't designed to have local state persisted, this behavior offers limited value while providing some drawbacks, including slower node provisioning and higher read/write latency. /// public const string Managed = "Managed"; /// - /// Ephemeral OS disks are stored only on the host machine, just like a - /// temporary disk. This provides lower read/write latency, along with - /// faster node scaling and cluster upgrades. + /// Ephemeral OS disks are stored only on the host machine, just like a temporary disk. This provides lower read/write latency, along with faster node scaling and cluster upgrades. /// public const string Ephemeral = "Ephemeral"; } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/OSOptionProfile.cs b/src/Aks/Aks.Sdk/Generated/Models/OSOptionProfile.cs index b0883409d3b8..a60933f63637 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/OSOptionProfile.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/OSOptionProfile.cs @@ -1,26 +1,16 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// /// The OS option profile. /// - [Rest.Serialization.JsonTransformation] + [Microsoft.Rest.Serialization.JsonTransformation] public partial class OSOptionProfile { /// @@ -34,16 +24,25 @@ public OSOptionProfile() /// /// Initializes a new instance of the OSOptionProfile class. /// - /// The list of OS options. - /// The ID of the OS option resource. - /// The name of the OS option resource. - /// The type of the OS option resource. - public OSOptionProfile(IList osOptionPropertyList, string id = default(string), string name = default(string), string type = default(string)) + + /// The ID of the OS option resource. + /// + + /// The name of the OS option resource. + /// + + /// The type of the OS option resource. + /// + + /// The list of OS options. + /// + public OSOptionProfile(System.Collections.Generic.IList osOptionPropertyList, string id = default(string), string name = default(string), string type = default(string)) + { - Id = id; - Name = name; - Type = type; - OsOptionPropertyList = osOptionPropertyList; + this.Id = id; + this.Name = name; + this.Type = type; + this.OSOptionPropertyList = osOptionPropertyList; CustomInit(); } @@ -52,45 +51,48 @@ public OSOptionProfile() /// partial void CustomInit(); + /// /// Gets the ID of the OS option resource. /// - [JsonProperty(PropertyName = "id")] - public string Id { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "id")] + public string Id {get; private set; } /// /// Gets the name of the OS option resource. /// - [JsonProperty(PropertyName = "name")] - public string Name { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; private set; } /// /// Gets the type of the OS option resource. /// - [JsonProperty(PropertyName = "type")] - public string Type { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public string Type {get; private set; } /// /// Gets or sets the list of OS options. /// - [JsonProperty(PropertyName = "properties.osOptionPropertyList")] - public IList OsOptionPropertyList { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.osOptionPropertyList")] + public System.Collections.Generic.IList OSOptionPropertyList {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (OsOptionPropertyList == null) + if (this.OSOptionPropertyList == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "OsOptionPropertyList"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "OSOptionPropertyList"); } - if (OsOptionPropertyList != null) + + + + if (this.OSOptionPropertyList != null) { - foreach (var element in OsOptionPropertyList) + foreach (var element in this.OSOptionPropertyList) { if (element != null) { @@ -100,4 +102,4 @@ public virtual void Validate() } } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/OSOptionProperty.cs b/src/Aks/Aks.Sdk/Generated/Models/OSOptionProperty.cs index 2a1f78b1443a..1e37d9d3c4dd 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/OSOptionProperty.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/OSOptionProperty.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -30,13 +23,17 @@ public OSOptionProperty() /// /// Initializes a new instance of the OSOptionProperty class. /// - /// The OS type. - /// Whether the image is - /// FIPS-enabled. + + /// The OS type. + /// + + /// Whether the image is FIPS-enabled. + /// public OSOptionProperty(string osType, bool enableFipsImage) + { - OsType = osType; - EnableFipsImage = enableFipsImage; + this.OSType = osType; + this.EnableFipsImage = enableFipsImage; CustomInit(); } @@ -45,30 +42,31 @@ public OSOptionProperty(string osType, bool enableFipsImage) /// partial void CustomInit(); + /// /// Gets or sets the OS type. /// - [JsonProperty(PropertyName = "os-type")] - public string OsType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "os-type")] + public string OSType {get; set; } /// /// Gets or sets whether the image is FIPS-enabled. /// - [JsonProperty(PropertyName = "enable-fips-image")] - public bool EnableFipsImage { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "enable-fips-image")] + public bool EnableFipsImage {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (OsType == null) + if (this.OSType == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "OsType"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "OSType"); } + } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/OSOptionPropertyList.cs b/src/Aks/Aks.Sdk/Generated/Models/OSOptionPropertyList.cs new file mode 100644 index 000000000000..95613b7d61ed --- /dev/null +++ b/src/Aks/Aks.Sdk/Generated/Models/OSOptionPropertyList.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.ContainerService.Models +{ + using System.Linq; + + /// + /// The list of OS option properties. + /// + public partial class OSOptionPropertyList + { + /// + /// Initializes a new instance of the OSOptionPropertyList class. + /// + public OSOptionPropertyList() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the OSOptionPropertyList class. + /// + + /// The list of OS options. + /// + public OSOptionPropertyList(System.Collections.Generic.IList osOptionPropertyListProperty) + + { + this.OSOptionPropertyListProperty = osOptionPropertyListProperty; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the list of OS options. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "osOptionPropertyList")] + public System.Collections.Generic.IList OSOptionPropertyListProperty {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.OSOptionPropertyListProperty == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "OSOptionPropertyListProperty"); + } + if (this.OSOptionPropertyListProperty != null) + { + foreach (var element in this.OSOptionPropertyListProperty) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/OSSKU.cs b/src/Aks/Aks.Sdk/Generated/Models/OSSKU.cs index bcec69b6c1df..191d50689651 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/OSSKU.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/OSSKU.cs @@ -1,47 +1,37 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { /// - /// Defines values for OSSKU. + /// Defines values for Ossku. /// - public static class OSSKU + + + public static class Ossku { /// /// Use Ubuntu as the OS for node images. /// public const string Ubuntu = "Ubuntu"; /// - /// Use AzureLinux as the OS for node images. Azure Linux is a - /// container-optimized Linux distro built by Microsoft, visit - /// https://aka.ms/azurelinux for more information. + /// Use AzureLinux as the OS for node images. Azure Linux is a container-optimized Linux distro built by Microsoft, visit https://aka.ms/azurelinux for more information. /// public const string AzureLinux = "AzureLinux"; /// - /// Deprecated OSSKU. Microsoft recommends that new deployments choose - /// 'AzureLinux' instead. + /// Deprecated OSSKU. Microsoft recommends that new deployments choose 'AzureLinux' instead. /// public const string CBLMariner = "CBLMariner"; /// - /// Use Windows2019 as the OS for node images. Unsupported for system - /// node pools. Windows2019 only supports Windows2019 containers; it - /// cannot run Windows2022 containers and vice versa. + /// Use Windows2019 as the OS for node images. Unsupported for system node pools. Windows2019 only supports Windows2019 containers; it cannot run Windows2022 containers and vice versa. /// public const string Windows2019 = "Windows2019"; /// - /// Use Windows2022 as the OS for node images. Unsupported for system - /// node pools. Windows2022 only supports Windows2022 containers; it - /// cannot run Windows2019 containers and vice versa. + /// Use Windows2022 as the OS for node images. Unsupported for system node pools. Windows2022 only supports Windows2022 containers; it cannot run Windows2019 containers and vice versa. /// public const string Windows2022 = "Windows2022"; } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/OSType.cs b/src/Aks/Aks.Sdk/Generated/Models/OSType.cs index 6d35fe09e7e6..66424615990d 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/OSType.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/OSType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.ContainerService.Models /// /// Defines values for OSType. /// + + public static class OSType { /// @@ -25,4 +22,4 @@ public static class OSType /// public const string Windows = "Windows"; } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/OperationValue.cs b/src/Aks/Aks.Sdk/Generated/Models/OperationValue.cs index 81d6eac850c0..9bcdc806b744 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/OperationValue.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/OperationValue.cs @@ -1,24 +1,16 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; using System.Linq; /// /// Describes the properties of a Operation value. /// - [Rest.Serialization.JsonTransformation] + [Microsoft.Rest.Serialization.JsonTransformation] public partial class OperationValue { /// @@ -32,22 +24,33 @@ public OperationValue() /// /// Initializes a new instance of the OperationValue class. /// - /// The origin of the operation. - /// The name of the operation. - /// The display name of the operation. - /// The display name of the resource the - /// operation applies to. - /// The description of the operation. - /// The resource provider for the - /// operation. + + /// The origin of the operation. + /// + + /// The name of the operation. + /// + + /// The display name of the operation. + /// + + /// The display name of the resource the operation applies to. + /// + + /// The description of the operation. + /// + + /// The resource provider for the operation. + /// public OperationValue(string origin = default(string), string name = default(string), string operation = default(string), string resource = default(string), string description = default(string), string provider = default(string)) + { - Origin = origin; - Name = name; - Operation = operation; - Resource = resource; - Description = description; - Provider = provider; + this.Origin = origin; + this.Name = name; + this.Operation = operation; + this.Resource = resource; + this.Description = description; + this.Provider = provider; CustomInit(); } @@ -56,41 +59,41 @@ public OperationValue() /// partial void CustomInit(); + /// /// Gets the origin of the operation. /// - [JsonProperty(PropertyName = "origin")] - public string Origin { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "origin")] + public string Origin {get; private set; } /// /// Gets the name of the operation. /// - [JsonProperty(PropertyName = "name")] - public string Name { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; private set; } /// /// Gets the display name of the operation. /// - [JsonProperty(PropertyName = "display.operation")] - public string Operation { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "display.operation")] + public string Operation {get; private set; } /// /// Gets the display name of the resource the operation applies to. /// - [JsonProperty(PropertyName = "display.resource")] - public string Resource { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "display.resource")] + public string Resource {get; private set; } /// /// Gets the description of the operation. /// - [JsonProperty(PropertyName = "display.description")] - public string Description { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "display.description")] + public string Description {get; private set; } /// /// Gets the resource provider for the operation. /// - [JsonProperty(PropertyName = "display.provider")] - public string Provider { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "display.provider")] + public string Provider {get; private set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/OperationValueDisplay.cs b/src/Aks/Aks.Sdk/Generated/Models/OperationValueDisplay.cs new file mode 100644 index 000000000000..ebc1bc898395 --- /dev/null +++ b/src/Aks/Aks.Sdk/Generated/Models/OperationValueDisplay.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.ContainerService.Models +{ + using System.Linq; + + /// + /// Describes the properties of a Operation Value Display. + /// + public partial class OperationValueDisplay + { + /// + /// Initializes a new instance of the OperationValueDisplay class. + /// + public OperationValueDisplay() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the OperationValueDisplay class. + /// + + /// The display name of the operation. + /// + + /// The display name of the resource the operation applies to. + /// + + /// The description of the operation. + /// + + /// The resource provider for the operation. + /// + public OperationValueDisplay(string operation = default(string), string resource = default(string), string description = default(string), string provider = default(string)) + + { + this.Operation = operation; + this.Resource = resource; + this.Description = description; + this.Provider = provider; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets the display name of the operation. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "operation")] + public string Operation {get; private set; } + + /// + /// Gets the display name of the resource the operation applies to. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "resource")] + public string Resource {get; private set; } + + /// + /// Gets the description of the operation. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "description")] + public string Description {get; private set; } + + /// + /// Gets the resource provider for the operation. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "provider")] + public string Provider {get; private set; } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/OutboundEnvironmentEndpoint.cs b/src/Aks/Aks.Sdk/Generated/Models/OutboundEnvironmentEndpoint.cs index e2753287908b..6c63b1288473 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/OutboundEnvironmentEndpoint.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/OutboundEnvironmentEndpoint.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -21,8 +13,7 @@ namespace Microsoft.Azure.Management.ContainerService.Models public partial class OutboundEnvironmentEndpoint { /// - /// Initializes a new instance of the OutboundEnvironmentEndpoint - /// class. + /// Initializes a new instance of the OutboundEnvironmentEndpoint class. /// public OutboundEnvironmentEndpoint() { @@ -30,18 +21,20 @@ public OutboundEnvironmentEndpoint() } /// - /// Initializes a new instance of the OutboundEnvironmentEndpoint - /// class. + /// Initializes a new instance of the OutboundEnvironmentEndpoint class. /// - /// The category of endpoints accessed by the - /// AKS agent node, e.g. azure-resource-management, apiserver, - /// etc. - /// The endpoints that AKS agent nodes connect - /// to - public OutboundEnvironmentEndpoint(string category = default(string), IList endpoints = default(IList)) + + /// The category of endpoints accessed by the AKS agent node, e.g. + /// azure-resource-management, apiserver, etc. + /// + + /// The endpoints that AKS agent nodes connect to + /// + public OutboundEnvironmentEndpoint(string category = default(string), System.Collections.Generic.IList endpoints = default(System.Collections.Generic.IList)) + { - Category = category; - Endpoints = endpoints; + this.Category = category; + this.Endpoints = endpoints; CustomInit(); } @@ -50,18 +43,18 @@ public OutboundEnvironmentEndpoint() /// partial void CustomInit(); + /// - /// Gets or sets the category of endpoints accessed by the AKS agent - /// node, e.g. azure-resource-management, apiserver, etc. + /// Gets or sets the category of endpoints accessed by the AKS agent node, e.g. + /// azure-resource-management, apiserver, etc. /// - [JsonProperty(PropertyName = "category")] - public string Category { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "category")] + public string Category {get; set; } /// /// Gets or sets the endpoints that AKS agent nodes connect to /// - [JsonProperty(PropertyName = "endpoints")] - public IList Endpoints { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "endpoints")] + public System.Collections.Generic.IList Endpoints {get; set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/OutboundType.cs b/src/Aks/Aks.Sdk/Generated/Models/OutboundType.cs index dd1ed35453f5..61c2e300a2b3 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/OutboundType.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/OutboundType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { @@ -14,20 +9,16 @@ namespace Microsoft.Azure.Management.ContainerService.Models /// /// Defines values for OutboundType. /// + + public static class OutboundType { /// - /// The load balancer is used for egress through an AKS assigned public - /// IP. This supports Kubernetes services of type 'loadBalancer'. For - /// more information see [outbound type - /// loadbalancer](https://docs.microsoft.com/azure/aks/egress-outboundtype#outbound-type-of-loadbalancer). + /// The load balancer is used for egress through an AKS assigned public IP. This supports Kubernetes services of type 'loadBalancer'. For more information see [outbound type loadbalancer](https://docs.microsoft.com/azure/aks/egress-outboundtype#outbound-type-of-loadbalancer). /// public const string LoadBalancer = "loadBalancer"; /// - /// Egress paths must be defined by the user. This is an advanced - /// scenario and requires proper network configuration. For more - /// information see [outbound type - /// userDefinedRouting](https://docs.microsoft.com/azure/aks/egress-outboundtype#outbound-type-of-userdefinedrouting). + /// Egress paths must be defined by the user. This is an advanced scenario and requires proper network configuration. For more information see [outbound type userDefinedRouting](https://docs.microsoft.com/azure/aks/egress-outboundtype#outbound-type-of-userdefinedrouting). /// public const string UserDefinedRouting = "userDefinedRouting"; /// @@ -35,10 +26,8 @@ public static class OutboundType /// public const string ManagedNATGateway = "managedNATGateway"; /// - /// The user-assigned NAT gateway associated to the cluster subnet is - /// used for egress. This is an advanced scenario and requires proper - /// network configuration. + /// The user-assigned NAT gateway associated to the cluster subnet is used for egress. This is an advanced scenario and requires proper network configuration. /// public const string UserAssignedNATGateway = "userAssignedNATGateway"; } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/Page.cs b/src/Aks/Aks.Sdk/Generated/Models/Page.cs index b3544b8d9dc9..b2158cf14f94 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/Page.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/Page.cs @@ -1,53 +1,43 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + namespace Microsoft.Azure.Management.ContainerService.Models { - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; /// /// Defines a page in Azure responses. /// /// Type of the page content items - [JsonObject] - public class Page : IPage + [Newtonsoft.Json.JsonObject] + public class Page : Microsoft.Rest.Azure.IPage { - /// - /// Gets the link to the next page. - /// - [JsonProperty("")] - public string NextPageLink { get; private set; } - - [JsonProperty("value")] - private IList Items{ get; set; } - - /// - /// Returns an enumerator that iterates through the collection. - /// - /// A an enumerator that can be used to iterate through the collection. - public IEnumerator GetEnumerator() - { - return Items == null ? System.Linq.Enumerable.Empty().GetEnumerator() : Items.GetEnumerator(); - } - - /// - /// Returns an enumerator that iterates through the collection. - /// - /// A an enumerator that can be used to iterate through the collection. - IEnumerator IEnumerable.GetEnumerator() - { - return GetEnumerator(); - } + /// + /// Gets the link to the next page. + /// + [Newtonsoft.Json.JsonProperty("")] + public System.String NextPageLink { get; private set; } + + [Newtonsoft.Json.JsonProperty("value")] + private System.Collections.Generic.IList Items{ get; set; } + + /// + /// Returns an enumerator that iterates through the collection. + /// + /// A an enumerator that can be used to iterate through the collection. + public System.Collections.Generic.IEnumerator GetEnumerator() + { + return (Items == null) ? System.Linq.Enumerable.Empty().GetEnumerator() : Items.GetEnumerator(); + } + + /// + /// Returns an enumerator that iterates through the collection. + /// + /// A an enumerator that can be used to iterate through the collection. + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/Page1.cs b/src/Aks/Aks.Sdk/Generated/Models/Page1.cs index dcebab5291e6..42f2847d94d0 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/Page1.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/Page1.cs @@ -1,53 +1,43 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + namespace Microsoft.Azure.Management.ContainerService.Models { - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; /// /// Defines a page in Azure responses. /// /// Type of the page content items - [JsonObject] - public class Page1 : IPage + [Newtonsoft.Json.JsonObject] + public class Page1 : Microsoft.Rest.Azure.IPage { - /// - /// Gets the link to the next page. - /// - [JsonProperty("nextLink")] - public string NextPageLink { get; private set; } - - [JsonProperty("value")] - private IList Items{ get; set; } - - /// - /// Returns an enumerator that iterates through the collection. - /// - /// A an enumerator that can be used to iterate through the collection. - public IEnumerator GetEnumerator() - { - return Items == null ? System.Linq.Enumerable.Empty().GetEnumerator() : Items.GetEnumerator(); - } - - /// - /// Returns an enumerator that iterates through the collection. - /// - /// A an enumerator that can be used to iterate through the collection. - IEnumerator IEnumerable.GetEnumerator() - { - return GetEnumerator(); - } + /// + /// Gets the link to the next page. + /// + [Newtonsoft.Json.JsonProperty("nextLink")] + public System.String NextPageLink { get; private set; } + + [Newtonsoft.Json.JsonProperty("value")] + private System.Collections.Generic.IList Items{ get; set; } + + /// + /// Returns an enumerator that iterates through the collection. + /// + /// A an enumerator that can be used to iterate through the collection. + public System.Collections.Generic.IEnumerator GetEnumerator() + { + return (Items == null) ? System.Linq.Enumerable.Empty().GetEnumerator() : Items.GetEnumerator(); + } + + /// + /// Returns an enumerator that iterates through the collection. + /// + /// A an enumerator that can be used to iterate through the collection. + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/Plan.cs b/src/Aks/Aks.Sdk/Generated/Models/Plan.cs deleted file mode 100644 index 413fbc933720..000000000000 --- a/src/Aks/Aks.Sdk/Generated/Models/Plan.cs +++ /dev/null @@ -1,116 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.ContainerService.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Plan for the resource. - /// - public partial class Plan - { - /// - /// Initializes a new instance of the Plan class. - /// - public Plan() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the Plan class. - /// - /// A user defined name of the 3rd Party Artifact - /// that is being procured. - /// The publisher of the 3rd Party Artifact - /// that is being bought. E.g. NewRelic - /// The 3rd Party artifact that is being - /// procured. E.g. NewRelic. Product maps to the OfferID specified for - /// the artifact at the time of Data Market onboarding. - /// A publisher provided promotion code as - /// provisioned in Data Market for the said product/artifact. - /// The version of the desired - /// product/artifact. - public Plan(string name, string publisher, string product, string promotionCode = default(string), string version = default(string)) - { - Name = name; - Publisher = publisher; - Product = product; - PromotionCode = promotionCode; - Version = version; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets a user defined name of the 3rd Party Artifact that is - /// being procured. - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - - /// - /// Gets or sets the publisher of the 3rd Party Artifact that is being - /// bought. E.g. NewRelic - /// - [JsonProperty(PropertyName = "publisher")] - public string Publisher { get; set; } - - /// - /// Gets or sets the 3rd Party artifact that is being procured. E.g. - /// NewRelic. Product maps to the OfferID specified for the artifact at - /// the time of Data Market onboarding. - /// - [JsonProperty(PropertyName = "product")] - public string Product { get; set; } - - /// - /// Gets or sets a publisher provided promotion code as provisioned in - /// Data Market for the said product/artifact. - /// - [JsonProperty(PropertyName = "promotionCode")] - public string PromotionCode { get; set; } - - /// - /// Gets or sets the version of the desired product/artifact. - /// - [JsonProperty(PropertyName = "version")] - public string Version { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (Name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Name"); - } - if (Publisher == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Publisher"); - } - if (Product == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Product"); - } - } - } -} diff --git a/src/Aks/Aks.Sdk/Generated/Models/PowerState.cs b/src/Aks/Aks.Sdk/Generated/Models/PowerState.cs index bc3c17706c5b..dbc361b337df 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/PowerState.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/PowerState.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,11 +23,13 @@ public PowerState() /// /// Initializes a new instance of the PowerState class. /// - /// Tells whether the cluster is Running or Stopped. + + /// Tells whether the cluster is Running or Stopped /// Possible values include: 'Running', 'Stopped' public PowerState(string code = default(string)) + { - Code = code; + this.Code = code; CustomInit(); } @@ -42,12 +38,11 @@ public PowerState() /// partial void CustomInit(); + /// - /// Gets or sets tells whether the cluster is Running or Stopped. - /// Possible values include: 'Running', 'Stopped' + /// Gets or sets tells whether the cluster is Running or Stopped Possible values include: 'Running', 'Stopped' /// - [JsonProperty(PropertyName = "code")] - public string Code { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "code")] + public string Code {get; set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/PrivateEndpoint.cs b/src/Aks/Aks.Sdk/Generated/Models/PrivateEndpoint.cs index 12431449470b..5fc410e6bc9d 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/PrivateEndpoint.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/PrivateEndpoint.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,10 +23,13 @@ public PrivateEndpoint() /// /// Initializes a new instance of the PrivateEndpoint class. /// - /// The resource ID of the private endpoint + + /// The resource ID of the private endpoint + /// public PrivateEndpoint(string id = default(string)) + { - Id = id; + this.Id = id; CustomInit(); } @@ -41,11 +38,11 @@ public PrivateEndpoint() /// partial void CustomInit(); + /// /// Gets or sets the resource ID of the private endpoint /// - [JsonProperty(PropertyName = "id")] - public string Id { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "id")] + public string Id {get; set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/PrivateEndpointConnection.cs b/src/Aks/Aks.Sdk/Generated/Models/PrivateEndpointConnection.cs index fc246feb6bdb..014ef33fd006 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/PrivateEndpointConnection.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/PrivateEndpointConnection.cs @@ -1,26 +1,17 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; using System.Linq; /// /// A private endpoint connection /// - [Rest.Serialization.JsonTransformation] - public partial class PrivateEndpointConnection : IResource + [Microsoft.Rest.Serialization.JsonTransformation] + public partial class PrivateEndpointConnection : Microsoft.Rest.Azure.IResource { /// /// Initializes a new instance of the PrivateEndpointConnection class. @@ -33,26 +24,35 @@ public PrivateEndpointConnection() /// /// Initializes a new instance of the PrivateEndpointConnection class. /// - /// A collection of - /// information about the state of the connection between service - /// consumer and provider. - /// The ID of the private endpoint connection. - /// The name of the private endpoint - /// connection. - /// The resource type. + + /// The ID of the private endpoint connection. + /// + + /// The name of the private endpoint connection. + /// + + /// The resource type. + /// + + /// The resource of private endpoint. + /// + /// The current provisioning state. - /// Possible values include: 'Canceled', 'Creating', 'Deleting', - /// 'Failed', 'Succeeded' - /// The resource of private - /// endpoint. - public PrivateEndpointConnection(PrivateLinkServiceConnectionState privateLinkServiceConnectionState, string id = default(string), string name = default(string), string type = default(string), string provisioningState = default(string), PrivateEndpoint privateEndpoint = default(PrivateEndpoint)) + /// Possible values include: 'Canceled', 'Creating', 'Deleting', 'Failed', + /// 'Succeeded' + + /// A collection of information about the state of the connection between + /// service consumer and provider. + /// + public PrivateEndpointConnection(string id = default(string), string name = default(string), string type = default(string), PrivateEndpoint privateEndpoint = default(PrivateEndpoint), string provisioningState = default(string), PrivateLinkServiceConnectionState privateLinkServiceConnectionState = default(PrivateLinkServiceConnectionState)) + { - Id = id; - Name = name; - Type = type; - ProvisioningState = provisioningState; - PrivateEndpoint = privateEndpoint; - PrivateLinkServiceConnectionState = privateLinkServiceConnectionState; + this.Id = id; + this.Name = name; + this.Type = type; + this.PrivateEndpoint = privateEndpoint; + this.ProvisioningState = provisioningState; + this.PrivateLinkServiceConnectionState = privateLinkServiceConnectionState; CustomInit(); } @@ -61,56 +61,42 @@ public PrivateEndpointConnection() /// partial void CustomInit(); + /// /// Gets the ID of the private endpoint connection. /// - [JsonProperty(PropertyName = "id")] - public string Id { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "id")] + public string Id {get; private set; } /// /// Gets the name of the private endpoint connection. /// - [JsonProperty(PropertyName = "name")] - public string Name { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; private set; } /// /// Gets the resource type. /// - [JsonProperty(PropertyName = "type")] - public string Type { get; private set; } - - /// - /// Gets the current provisioning state. Possible values include: - /// 'Canceled', 'Creating', 'Deleting', 'Failed', 'Succeeded' - /// - [JsonProperty(PropertyName = "properties.provisioningState")] - public string ProvisioningState { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public string Type {get; private set; } /// /// Gets or sets the resource of private endpoint. /// - [JsonProperty(PropertyName = "properties.privateEndpoint")] - public PrivateEndpoint PrivateEndpoint { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.privateEndpoint")] + public PrivateEndpoint PrivateEndpoint {get; set; } /// - /// Gets or sets a collection of information about the state of the - /// connection between service consumer and provider. + /// Gets the current provisioning state. Possible values include: 'Canceled', 'Creating', 'Deleting', 'Failed', 'Succeeded' /// - [JsonProperty(PropertyName = "properties.privateLinkServiceConnectionState")] - public PrivateLinkServiceConnectionState PrivateLinkServiceConnectionState { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.provisioningState")] + public string ProvisioningState {get; private set; } /// - /// Validate the object. + /// Gets or sets a collection of information about the state of the connection + /// between service consumer and provider. /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (PrivateLinkServiceConnectionState == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "PrivateLinkServiceConnectionState"); - } - } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.privateLinkServiceConnectionState")] + public PrivateLinkServiceConnectionState PrivateLinkServiceConnectionState {get; set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/PrivateEndpointConnectionListResult.cs b/src/Aks/Aks.Sdk/Generated/Models/PrivateEndpointConnectionListResult.cs index b8c1b564e101..ce6b3e093cf2 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/PrivateEndpointConnectionListResult.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/PrivateEndpointConnectionListResult.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -21,8 +13,7 @@ namespace Microsoft.Azure.Management.ContainerService.Models public partial class PrivateEndpointConnectionListResult { /// - /// Initializes a new instance of the - /// PrivateEndpointConnectionListResult class. + /// Initializes a new instance of the PrivateEndpointConnectionListResult class. /// public PrivateEndpointConnectionListResult() { @@ -30,13 +21,15 @@ public PrivateEndpointConnectionListResult() } /// - /// Initializes a new instance of the - /// PrivateEndpointConnectionListResult class. + /// Initializes a new instance of the PrivateEndpointConnectionListResult class. /// - /// The collection value. - public PrivateEndpointConnectionListResult(IList value = default(IList)) + + /// The collection value. + /// + public PrivateEndpointConnectionListResult(System.Collections.Generic.IList value = default(System.Collections.Generic.IList)) + { - Value = value; + this.Value = value; CustomInit(); } @@ -45,11 +38,11 @@ public PrivateEndpointConnectionListResult() /// partial void CustomInit(); + /// /// Gets or sets the collection value. /// - [JsonProperty(PropertyName = "value")] - public IList Value { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "value")] + public System.Collections.Generic.IList Value {get; set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/PrivateEndpointConnectionProperties.cs b/src/Aks/Aks.Sdk/Generated/Models/PrivateEndpointConnectionProperties.cs new file mode 100644 index 000000000000..fac4fcce1c33 --- /dev/null +++ b/src/Aks/Aks.Sdk/Generated/Models/PrivateEndpointConnectionProperties.cs @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.ContainerService.Models +{ + using System.Linq; + + /// + /// Properties of a private endpoint connection. + /// + public partial class PrivateEndpointConnectionProperties + { + /// + /// Initializes a new instance of the PrivateEndpointConnectionProperties class. + /// + public PrivateEndpointConnectionProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PrivateEndpointConnectionProperties class. + /// + + /// The current provisioning state. + /// Possible values include: 'Canceled', 'Creating', 'Deleting', 'Failed', + /// 'Succeeded' + + /// The resource of private endpoint. + /// + + /// A collection of information about the state of the connection between + /// service consumer and provider. + /// + public PrivateEndpointConnectionProperties(PrivateLinkServiceConnectionState privateLinkServiceConnectionState, string provisioningState = default(string), PrivateEndpoint privateEndpoint = default(PrivateEndpoint)) + + { + this.ProvisioningState = provisioningState; + this.PrivateEndpoint = privateEndpoint; + this.PrivateLinkServiceConnectionState = privateLinkServiceConnectionState; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets the current provisioning state. Possible values include: 'Canceled', 'Creating', 'Deleting', 'Failed', 'Succeeded' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "provisioningState")] + public string ProvisioningState {get; private set; } + + /// + /// Gets or sets the resource of private endpoint. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "privateEndpoint")] + public PrivateEndpoint PrivateEndpoint {get; set; } + + /// + /// Gets or sets a collection of information about the state of the connection + /// between service consumer and provider. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "privateLinkServiceConnectionState")] + public PrivateLinkServiceConnectionState PrivateLinkServiceConnectionState {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.PrivateLinkServiceConnectionState == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "PrivateLinkServiceConnectionState"); + } + + + + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/PrivateEndpointConnectionProvisioningState.cs b/src/Aks/Aks.Sdk/Generated/Models/PrivateEndpointConnectionProvisioningState.cs index debf2b7cec68..3c17096b63c2 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/PrivateEndpointConnectionProvisioningState.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/PrivateEndpointConnectionProvisioningState.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.ContainerService.Models /// /// Defines values for PrivateEndpointConnectionProvisioningState. /// + + public static class PrivateEndpointConnectionProvisioningState { public const string Canceled = "Canceled"; @@ -22,4 +19,4 @@ public static class PrivateEndpointConnectionProvisioningState public const string Failed = "Failed"; public const string Succeeded = "Succeeded"; } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/PrivateLinkResource.cs b/src/Aks/Aks.Sdk/Generated/Models/PrivateLinkResource.cs index e4be39832f5f..49315d040bae 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/PrivateLinkResource.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/PrivateLinkResource.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,22 +23,34 @@ public PrivateLinkResource() /// /// Initializes a new instance of the PrivateLinkResource class. /// - /// The ID of the private link resource. - /// The name of the private link resource. - /// The resource type. - /// The group ID of the resource. - /// The RequiredMembers of the - /// resource - /// The private link service ID of - /// the resource, this field is exposed only to NRP internally. - public PrivateLinkResource(string id = default(string), string name = default(string), string type = default(string), string groupId = default(string), IList requiredMembers = default(IList), string privateLinkServiceID = default(string)) + + /// The ID of the private link resource. + /// + + /// The name of the private link resource. + /// + + /// The resource type. + /// + + /// The group ID of the resource. + /// + + /// The RequiredMembers of the resource + /// + + /// The private link service ID of the resource, this field is exposed only to + /// NRP internally. + /// + public PrivateLinkResource(string id = default(string), string name = default(string), string type = default(string), string groupId = default(string), System.Collections.Generic.IList requiredMembers = default(System.Collections.Generic.IList), string privateLinkServiceId = default(string)) + { - Id = id; - Name = name; - Type = type; - GroupId = groupId; - RequiredMembers = requiredMembers; - PrivateLinkServiceID = privateLinkServiceID; + this.Id = id; + this.Name = name; + this.Type = type; + this.GroupId = groupId; + this.RequiredMembers = requiredMembers; + this.PrivateLinkServiceId = privateLinkServiceId; CustomInit(); } @@ -55,42 +59,42 @@ public PrivateLinkResource() /// partial void CustomInit(); + /// /// Gets or sets the ID of the private link resource. /// - [JsonProperty(PropertyName = "id")] - public string Id { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "id")] + public string Id {get; set; } /// /// Gets or sets the name of the private link resource. /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; set; } /// /// Gets or sets the resource type. /// - [JsonProperty(PropertyName = "type")] - public string Type { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public string Type {get; set; } /// /// Gets or sets the group ID of the resource. /// - [JsonProperty(PropertyName = "groupId")] - public string GroupId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "groupId")] + public string GroupId {get; set; } /// /// Gets or sets the RequiredMembers of the resource /// - [JsonProperty(PropertyName = "requiredMembers")] - public IList RequiredMembers { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "requiredMembers")] + public System.Collections.Generic.IList RequiredMembers {get; set; } /// - /// Gets the private link service ID of the resource, this field is - /// exposed only to NRP internally. + /// Gets the private link service ID of the resource, this field is exposed + /// only to NRP internally. /// - [JsonProperty(PropertyName = "privateLinkServiceID")] - public string PrivateLinkServiceID { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "privateLinkServiceID")] + public string PrivateLinkServiceId {get; private set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/PrivateLinkResourcesListResult.cs b/src/Aks/Aks.Sdk/Generated/Models/PrivateLinkResourcesListResult.cs index 87267651779d..ed6d5efe9084 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/PrivateLinkResourcesListResult.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/PrivateLinkResourcesListResult.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -21,8 +13,7 @@ namespace Microsoft.Azure.Management.ContainerService.Models public partial class PrivateLinkResourcesListResult { /// - /// Initializes a new instance of the PrivateLinkResourcesListResult - /// class. + /// Initializes a new instance of the PrivateLinkResourcesListResult class. /// public PrivateLinkResourcesListResult() { @@ -30,13 +21,15 @@ public PrivateLinkResourcesListResult() } /// - /// Initializes a new instance of the PrivateLinkResourcesListResult - /// class. + /// Initializes a new instance of the PrivateLinkResourcesListResult class. /// - /// The collection value. - public PrivateLinkResourcesListResult(IList value = default(IList)) + + /// The collection value. + /// + public PrivateLinkResourcesListResult(System.Collections.Generic.IList value = default(System.Collections.Generic.IList)) + { - Value = value; + this.Value = value; CustomInit(); } @@ -45,11 +38,11 @@ public PrivateLinkResourcesListResult() /// partial void CustomInit(); + /// /// Gets or sets the collection value. /// - [JsonProperty(PropertyName = "value")] - public IList Value { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "value")] + public System.Collections.Generic.IList Value {get; set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/PrivateLinkServiceConnectionState.cs b/src/Aks/Aks.Sdk/Generated/Models/PrivateLinkServiceConnectionState.cs index 79f291e1f0b7..667b3e6b18b0 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/PrivateLinkServiceConnectionState.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/PrivateLinkServiceConnectionState.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -19,8 +13,7 @@ namespace Microsoft.Azure.Management.ContainerService.Models public partial class PrivateLinkServiceConnectionState { /// - /// Initializes a new instance of the PrivateLinkServiceConnectionState - /// class. + /// Initializes a new instance of the PrivateLinkServiceConnectionState class. /// public PrivateLinkServiceConnectionState() { @@ -28,18 +21,19 @@ public PrivateLinkServiceConnectionState() } /// - /// Initializes a new instance of the PrivateLinkServiceConnectionState - /// class. + /// Initializes a new instance of the PrivateLinkServiceConnectionState class. /// + /// The private link service connection status. - /// Possible values include: 'Pending', 'Approved', 'Rejected', - /// 'Disconnected' - /// The private link service connection - /// description. + /// Possible values include: 'Pending', 'Approved', 'Rejected', 'Disconnected' + + /// The private link service connection description. + /// public PrivateLinkServiceConnectionState(string status = default(string), string description = default(string)) + { - Status = status; - Description = description; + this.Status = status; + this.Description = description; CustomInit(); } @@ -48,18 +42,17 @@ public PrivateLinkServiceConnectionState() /// partial void CustomInit(); + /// - /// Gets or sets the private link service connection status. Possible - /// values include: 'Pending', 'Approved', 'Rejected', 'Disconnected' + /// Gets or sets the private link service connection status. Possible values include: 'Pending', 'Approved', 'Rejected', 'Disconnected' /// - [JsonProperty(PropertyName = "status")] - public string Status { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "status")] + public string Status {get; set; } /// /// Gets or sets the private link service connection description. /// - [JsonProperty(PropertyName = "description")] - public string Description { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "description")] + public string Description {get; set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ProxyResource.cs b/src/Aks/Aks.Sdk/Generated/Models/ProxyResource.cs deleted file mode 100644 index dd3e3fda2a0f..000000000000 --- a/src/Aks/Aks.Sdk/Generated/Models/ProxyResource.cs +++ /dev/null @@ -1,55 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.ContainerService.Models -{ - using System.Linq; - - /// - /// Proxy Resource - /// - /// - /// The resource model definition for a Azure Resource Manager proxy - /// resource. It will not have tags and a location - /// - public partial class ProxyResource : Resource - { - /// - /// Initializes a new instance of the ProxyResource class. - /// - public ProxyResource() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ProxyResource class. - /// - /// Fully qualified resource ID for the resource. Ex - - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - /// The name of the resource - /// The type of the resource. E.g. - /// "Microsoft.Compute/virtualMachines" or - /// "Microsoft.Storage/storageAccounts" - /// Azure Resource Manager metadata containing - /// createdBy and modifiedBy information. - public ProxyResource(string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData)) - : base(id, name, type, systemData) - { - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - } -} diff --git a/src/Aks/Aks.Sdk/Generated/Models/PublicNetworkAccess.cs b/src/Aks/Aks.Sdk/Generated/Models/PublicNetworkAccess.cs index 2b42263c9c1e..82da70268ad0 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/PublicNetworkAccess.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/PublicNetworkAccess.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { @@ -14,9 +9,11 @@ namespace Microsoft.Azure.Management.ContainerService.Models /// /// Defines values for PublicNetworkAccess. /// + + public static class PublicNetworkAccess { public const string Enabled = "Enabled"; public const string Disabled = "Disabled"; } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/Resource.cs b/src/Aks/Aks.Sdk/Generated/Models/Resource.cs index de5201216568..f59f9b67be78 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/Resource.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/Resource.cs @@ -1,28 +1,21 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Newtonsoft.Json; using System.Linq; /// - /// Resource + /// Common fields that are returned in the response for all Azure Resource + /// Manager resources /// /// /// Common fields that are returned in the response for all Azure Resource /// Manager resources /// - public partial class Resource : IResource + public partial class Resource : Microsoft.Rest.Azure.IResource { /// /// Initializes a new instance of the Resource class. @@ -35,20 +28,28 @@ public Resource() /// /// Initializes a new instance of the Resource class. /// + /// Fully qualified resource ID for the resource. Ex - - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - /// The name of the resource - /// The type of the resource. E.g. - /// "Microsoft.Compute/virtualMachines" or - /// "Microsoft.Storage/storageAccounts" - /// Azure Resource Manager metadata containing - /// createdBy and modifiedBy information. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// + + /// The name of the resource + /// + + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" + /// + + /// Azure Resource Manager metadata containing createdBy and modifiedBy + /// information. + /// public Resource(string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData)) + { - Id = id; - Name = name; - Type = type; - SystemData = systemData; + this.Id = id; + this.Name = name; + this.Type = type; + this.SystemData = systemData; CustomInit(); } @@ -57,33 +58,32 @@ public Resource() /// partial void CustomInit(); + /// /// Gets fully qualified resource ID for the resource. Ex - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} /// - [JsonProperty(PropertyName = "id")] - public string Id { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "id")] + public string Id {get; private set; } /// /// Gets the name of the resource /// - [JsonProperty(PropertyName = "name")] - public string Name { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; private set; } /// - /// Gets the type of the resource. E.g. - /// "Microsoft.Compute/virtualMachines" or - /// "Microsoft.Storage/storageAccounts" + /// Gets the type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" /// - [JsonProperty(PropertyName = "type")] - public string Type { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public string Type {get; private set; } /// - /// Gets azure Resource Manager metadata containing createdBy and - /// modifiedBy information. + /// Gets azure Resource Manager metadata containing createdBy and modifiedBy + /// information. /// - [JsonProperty(PropertyName = "systemData")] - public SystemData SystemData { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "systemData")] + public SystemData SystemData {get; private set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ResourceIdentityType.cs b/src/Aks/Aks.Sdk/Generated/Models/ResourceIdentityType.cs index 09500275894a..82ad88604e9c 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ResourceIdentityType.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ResourceIdentityType.cs @@ -1,47 +1,33 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; /// /// Defines values for ResourceIdentityType. /// - [JsonConverter(typeof(StringEnumConverter))] + + + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public enum ResourceIdentityType { /// - /// Use an implicitly created system assigned managed identity to - /// manage cluster resources. Master components in the control plane - /// such as kube-controller-manager will use the system assigned - /// managed identity to manipulate Azure resources. + /// Use an implicitly created system assigned managed identity to manage cluster resources. Master components in the control plane such as kube-controller-manager will use the system assigned managed identity to manipulate Azure resources. /// - [EnumMember(Value = "SystemAssigned")] + [System.Runtime.Serialization.EnumMember(Value = "SystemAssigned")] SystemAssigned, /// - /// Use a user-specified identity to manage cluster resources. Master - /// components in the control plane such as kube-controller-manager - /// will use the specified user assigned managed identity to manipulate - /// Azure resources. + /// Use a user-specified identity to manage cluster resources. Master components in the control plane such as kube-controller-manager will use the specified user assigned managed identity to manipulate Azure resources. /// - [EnumMember(Value = "UserAssigned")] + [System.Runtime.Serialization.EnumMember(Value = "UserAssigned")] UserAssigned, /// - /// Do not use a managed identity for the Managed Cluster, service - /// principal will be used instead. + /// Do not use a managed identity for the Managed Cluster, service principal will be used instead. /// - [EnumMember(Value = "None")] + [System.Runtime.Serialization.EnumMember(Value = "None")] None } internal static class ResourceIdentityTypeEnumExtension @@ -50,7 +36,6 @@ internal static string ToSerializedValue(this ResourceIdentityType? value) { return value == null ? null : ((ResourceIdentityType)value).ToSerializedValue(); } - internal static string ToSerializedValue(this ResourceIdentityType value) { switch( value ) @@ -64,7 +49,6 @@ internal static string ToSerializedValue(this ResourceIdentityType value) } return null; } - internal static ResourceIdentityType? ParseResourceIdentityType(this string value) { switch( value ) @@ -79,4 +63,4 @@ internal static string ToSerializedValue(this ResourceIdentityType value) return null; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ResourceIdentityTypeForCommonTypes.cs b/src/Aks/Aks.Sdk/Generated/Models/ResourceIdentityTypeForCommonTypes.cs deleted file mode 100644 index 9c0cc030b385..000000000000 --- a/src/Aks/Aks.Sdk/Generated/Models/ResourceIdentityTypeForCommonTypes.cs +++ /dev/null @@ -1,54 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.ContainerService.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for ResourceIdentityTypeForCommonTypes. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum ResourceIdentityTypeForCommonTypes - { - [EnumMember(Value = "SystemAssigned")] - SystemAssigned - } - internal static class ResourceIdentityTypeForCommonTypesEnumExtension - { - internal static string ToSerializedValue(this ResourceIdentityTypeForCommonTypes? value) - { - return value == null ? null : ((ResourceIdentityTypeForCommonTypes)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this ResourceIdentityTypeForCommonTypes value) - { - switch( value ) - { - case ResourceIdentityTypeForCommonTypes.SystemAssigned: - return "SystemAssigned"; - } - return null; - } - - internal static ResourceIdentityTypeForCommonTypes? ParseResourceIdentityTypeForCommonTypes(this string value) - { - switch( value ) - { - case "SystemAssigned": - return ResourceIdentityTypeForCommonTypes.SystemAssigned; - } - return null; - } - } -} diff --git a/src/Aks/Aks.Sdk/Generated/Models/ResourceModelWithAllowedPropertySet.cs b/src/Aks/Aks.Sdk/Generated/Models/ResourceModelWithAllowedPropertySet.cs deleted file mode 100644 index 3965d3f60bcc..000000000000 --- a/src/Aks/Aks.Sdk/Generated/Models/ResourceModelWithAllowedPropertySet.cs +++ /dev/null @@ -1,141 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.ContainerService.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Newtonsoft.Json; - using System.Linq; - - /// - /// The resource model definition containing the full set of allowed - /// properties for a resource. Except properties bag, there cannot be a top - /// level property outside of this set. - /// - public partial class ResourceModelWithAllowedPropertySet : IResource - { - /// - /// Initializes a new instance of the - /// ResourceModelWithAllowedPropertySet class. - /// - public ResourceModelWithAllowedPropertySet() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// ResourceModelWithAllowedPropertySet class. - /// - /// The fully qualified resource ID of the - /// resource that manages this resource. Indicates if this resource is - /// managed by another Azure resource. If this is present, complete - /// mode deployment will not delete the resource if it is removed from - /// the template since it is managed by another resource. - /// Metadata used by portal/tooling/etc to render - /// different UX experiences for resources of the same type; e.g. - /// ApiApps are a kind of Microsoft.Web/sites type. If supported, the - /// resource provider must validate and persist this value. - /// The etag field is *not* required. If it is - /// provided in the response body, it must also be provided as a header - /// per the normal etag convention. Entity tags are used for comparing - /// two or more entities from the same requested resource. HTTP/1.1 - /// uses entity tags in the etag (section 14.19), If-Match (section - /// 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) - /// header fields. - public ResourceModelWithAllowedPropertySet(string managedBy = default(string), string kind = default(string), string etag = default(string), ResourceModelWithAllowedPropertySetIdentity identity = default(ResourceModelWithAllowedPropertySetIdentity), ResourceModelWithAllowedPropertySetSku sku = default(ResourceModelWithAllowedPropertySetSku), ResourceModelWithAllowedPropertySetPlan plan = default(ResourceModelWithAllowedPropertySetPlan)) - { - ManagedBy = managedBy; - Kind = kind; - Etag = etag; - Identity = identity; - Sku = sku; - Plan = plan; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the fully qualified resource ID of the resource that - /// manages this resource. Indicates if this resource is managed by - /// another Azure resource. If this is present, complete mode - /// deployment will not delete the resource if it is removed from the - /// template since it is managed by another resource. - /// - [JsonProperty(PropertyName = "managedBy")] - public string ManagedBy { get; set; } - - /// - /// Gets or sets metadata used by portal/tooling/etc to render - /// different UX experiences for resources of the same type; e.g. - /// ApiApps are a kind of Microsoft.Web/sites type. If supported, the - /// resource provider must validate and persist this value. - /// - [JsonProperty(PropertyName = "kind")] - public string Kind { get; set; } - - /// - /// Gets the etag field is *not* required. If it is provided in the - /// response body, it must also be provided as a header per the normal - /// etag convention. Entity tags are used for comparing two or more - /// entities from the same requested resource. HTTP/1.1 uses entity - /// tags in the etag (section 14.19), If-Match (section 14.24), - /// If-None-Match (section 14.26), and If-Range (section 14.27) header - /// fields. - /// - [JsonProperty(PropertyName = "etag")] - public string Etag { get; private set; } - - /// - /// - [JsonProperty(PropertyName = "identity")] - public ResourceModelWithAllowedPropertySetIdentity Identity { get; set; } - - /// - /// - [JsonProperty(PropertyName = "sku")] - public ResourceModelWithAllowedPropertySetSku Sku { get; set; } - - /// - /// - [JsonProperty(PropertyName = "plan")] - public ResourceModelWithAllowedPropertySetPlan Plan { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (Kind != null) - { - if (!System.Text.RegularExpressions.Regex.IsMatch(Kind, "^[-\\w\\._,\\(\\)]+$")) - { - throw new ValidationException(ValidationRules.Pattern, "Kind", "^[-\\w\\._,\\(\\)]+$"); - } - } - if (Sku != null) - { - Sku.Validate(); - } - if (Plan != null) - { - Plan.Validate(); - } - } - } -} diff --git a/src/Aks/Aks.Sdk/Generated/Models/ResourceModelWithAllowedPropertySetIdentity.cs b/src/Aks/Aks.Sdk/Generated/Models/ResourceModelWithAllowedPropertySetIdentity.cs deleted file mode 100644 index dd5726707247..000000000000 --- a/src/Aks/Aks.Sdk/Generated/Models/ResourceModelWithAllowedPropertySetIdentity.cs +++ /dev/null @@ -1,47 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.ContainerService.Models -{ - using System.Linq; - - public partial class ResourceModelWithAllowedPropertySetIdentity : Identity - { - /// - /// Initializes a new instance of the - /// ResourceModelWithAllowedPropertySetIdentity class. - /// - public ResourceModelWithAllowedPropertySetIdentity() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// ResourceModelWithAllowedPropertySetIdentity class. - /// - /// The principal ID of resource - /// identity. - /// The tenant ID of resource. - /// The identity type. Possible values include: - /// 'SystemAssigned' - public ResourceModelWithAllowedPropertySetIdentity(string principalId = default(string), string tenantId = default(string), ResourceIdentityTypeForCommonTypes? type = default(ResourceIdentityTypeForCommonTypes?)) - : base(principalId, tenantId, type) - { - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - } -} diff --git a/src/Aks/Aks.Sdk/Generated/Models/ResourceModelWithAllowedPropertySetPlan.cs b/src/Aks/Aks.Sdk/Generated/Models/ResourceModelWithAllowedPropertySetPlan.cs deleted file mode 100644 index f2f3e3dcd7ef..000000000000 --- a/src/Aks/Aks.Sdk/Generated/Models/ResourceModelWithAllowedPropertySetPlan.cs +++ /dev/null @@ -1,63 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.ContainerService.Models -{ - using System.Linq; - - public partial class ResourceModelWithAllowedPropertySetPlan : Plan - { - /// - /// Initializes a new instance of the - /// ResourceModelWithAllowedPropertySetPlan class. - /// - public ResourceModelWithAllowedPropertySetPlan() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// ResourceModelWithAllowedPropertySetPlan class. - /// - /// A user defined name of the 3rd Party Artifact - /// that is being procured. - /// The publisher of the 3rd Party Artifact - /// that is being bought. E.g. NewRelic - /// The 3rd Party artifact that is being - /// procured. E.g. NewRelic. Product maps to the OfferID specified for - /// the artifact at the time of Data Market onboarding. - /// A publisher provided promotion code as - /// provisioned in Data Market for the said product/artifact. - /// The version of the desired - /// product/artifact. - public ResourceModelWithAllowedPropertySetPlan(string name, string publisher, string product, string promotionCode = default(string), string version = default(string)) - : base(name, publisher, product, promotionCode, version) - { - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public override void Validate() - { - base.Validate(); - } - } -} diff --git a/src/Aks/Aks.Sdk/Generated/Models/ResourceModelWithAllowedPropertySetSku.cs b/src/Aks/Aks.Sdk/Generated/Models/ResourceModelWithAllowedPropertySetSku.cs deleted file mode 100644 index 52a0bf91a993..000000000000 --- a/src/Aks/Aks.Sdk/Generated/Models/ResourceModelWithAllowedPropertySetSku.cs +++ /dev/null @@ -1,64 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.ContainerService.Models -{ - using System.Linq; - - public partial class ResourceModelWithAllowedPropertySetSku : Sku - { - /// - /// Initializes a new instance of the - /// ResourceModelWithAllowedPropertySetSku class. - /// - public ResourceModelWithAllowedPropertySetSku() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// ResourceModelWithAllowedPropertySetSku class. - /// - /// The name of the SKU. Ex - P3. It is typically a - /// letter+number code - /// Possible values include: 'Free', 'Basic', - /// 'Standard', 'Premium' - /// The SKU size. When the name field is the - /// combination of tier and some other value, this would be the - /// standalone code. - /// If the service has different generations of - /// hardware, for the same SKU, then that can be captured here. - /// If the SKU supports scale out/in then the - /// capacity integer should be included. If scale out/in is not - /// possible for the resource this may be omitted. - public ResourceModelWithAllowedPropertySetSku(string name, SkuTier? tier = default(SkuTier?), string size = default(string), string family = default(string), int? capacity = default(int?)) - : base(name, tier, size, family, capacity) - { - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public override void Validate() - { - base.Validate(); - } - } -} diff --git a/src/Aks/Aks.Sdk/Generated/Models/ResourceReference.cs b/src/Aks/Aks.Sdk/Generated/Models/ResourceReference.cs index d272c94add12..22d2f66ed21b 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ResourceReference.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ResourceReference.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,10 +23,13 @@ public ResourceReference() /// /// Initializes a new instance of the ResourceReference class. /// - /// The fully qualified Azure resource id. + + /// The fully qualified Azure resource id. + /// public ResourceReference(string id = default(string)) + { - Id = id; + this.Id = id; CustomInit(); } @@ -41,11 +38,11 @@ public ResourceReference() /// partial void CustomInit(); + /// /// Gets or sets the fully qualified Azure resource id. /// - [JsonProperty(PropertyName = "id")] - public string Id { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "id")] + public string Id {get; set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/RunCommandRequest.cs b/src/Aks/Aks.Sdk/Generated/Models/RunCommandRequest.cs index c80f3b4ccf98..abc635e3743d 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/RunCommandRequest.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/RunCommandRequest.cs @@ -1,17 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Microsoft.Rest; - using Newtonsoft.Json; using System.Linq; /// @@ -30,16 +23,21 @@ public RunCommandRequest() /// /// Initializes a new instance of the RunCommandRequest class. /// - /// The command to run. - /// A base64 encoded zip file containing the - /// files required by the command. - /// AuthToken issued for AKS AAD Server - /// App. + + /// The command to run. + /// + + /// A base64 encoded zip file containing the files required by the command. + /// + + /// AuthToken issued for AKS AAD Server App. + /// public RunCommandRequest(string command, string context = default(string), string clusterToken = default(string)) + { - Command = command; - Context = context; - ClusterToken = clusterToken; + this.Command = command; + this.Context = context; + this.ClusterToken = clusterToken; CustomInit(); } @@ -48,37 +46,40 @@ public RunCommandRequest() /// partial void CustomInit(); + /// /// Gets or sets the command to run. /// - [JsonProperty(PropertyName = "command")] - public string Command { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "command")] + public string Command {get; set; } /// - /// Gets or sets a base64 encoded zip file containing the files - /// required by the command. + /// Gets or sets a base64 encoded zip file containing the files required by the + /// command. /// - [JsonProperty(PropertyName = "context")] - public string Context { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "context")] + public string Context {get; set; } /// /// Gets or sets authToken issued for AKS AAD Server App. /// - [JsonProperty(PropertyName = "clusterToken")] - public string ClusterToken { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "clusterToken")] + public string ClusterToken {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (Command == null) + if (this.Command == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "Command"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Command"); } + + + } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/RunCommandResult.cs b/src/Aks/Aks.Sdk/Generated/Models/RunCommandResult.cs index 9691747beff6..e88c9634d2ee 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/RunCommandResult.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/RunCommandResult.cs @@ -1,24 +1,16 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; using System.Linq; /// /// run command result. /// - [Rest.Serialization.JsonTransformation] + [Microsoft.Rest.Serialization.JsonTransformation] public partial class RunCommandResult { /// @@ -32,24 +24,37 @@ public RunCommandResult() /// /// Initializes a new instance of the RunCommandResult class. /// - /// The command id. - /// provisioning State - /// The exit code of the command - /// The time when the command started. - /// The time when the command - /// finished. - /// The command output. - /// An explanation of why provisioningState is set - /// to failed (if so). + + /// The command id. + /// + + /// provisioning State + /// + + /// The exit code of the command + /// + + /// The time when the command started. + /// + + /// The time when the command finished. + /// + + /// The command output. + /// + + /// An explanation of why provisioningState is set to failed (if so). + /// public RunCommandResult(string id = default(string), string provisioningState = default(string), int? exitCode = default(int?), System.DateTime? startedAt = default(System.DateTime?), System.DateTime? finishedAt = default(System.DateTime?), string logs = default(string), string reason = default(string)) + { - Id = id; - ProvisioningState = provisioningState; - ExitCode = exitCode; - StartedAt = startedAt; - FinishedAt = finishedAt; - Logs = logs; - Reason = reason; + this.Id = id; + this.ProvisioningState = provisioningState; + this.ExitCode = exitCode; + this.StartedAt = startedAt; + this.FinishedAt = finishedAt; + this.Logs = logs; + this.Reason = reason; CustomInit(); } @@ -58,48 +63,47 @@ public RunCommandResult() /// partial void CustomInit(); + /// /// Gets the command id. /// - [JsonProperty(PropertyName = "id")] - public string Id { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "id")] + public string Id {get; private set; } /// /// Gets provisioning State /// - [JsonProperty(PropertyName = "properties.provisioningState")] - public string ProvisioningState { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.provisioningState")] + public string ProvisioningState {get; private set; } /// /// Gets the exit code of the command /// - [JsonProperty(PropertyName = "properties.exitCode")] - public int? ExitCode { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.exitCode")] + public int? ExitCode {get; private set; } /// /// Gets the time when the command started. /// - [JsonProperty(PropertyName = "properties.startedAt")] - public System.DateTime? StartedAt { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.startedAt")] + public System.DateTime? StartedAt {get; private set; } /// /// Gets the time when the command finished. /// - [JsonProperty(PropertyName = "properties.finishedAt")] - public System.DateTime? FinishedAt { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.finishedAt")] + public System.DateTime? FinishedAt {get; private set; } /// /// Gets the command output. /// - [JsonProperty(PropertyName = "properties.logs")] - public string Logs { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.logs")] + public string Logs {get; private set; } /// - /// Gets an explanation of why provisioningState is set to failed (if - /// so). + /// Gets an explanation of why provisioningState is set to failed (if so). /// - [JsonProperty(PropertyName = "properties.reason")] - public string Reason { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.reason")] + public string Reason {get; private set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ScaleDownMode.cs b/src/Aks/Aks.Sdk/Generated/Models/ScaleDownMode.cs index e78a045d16c8..672e720f39f5 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ScaleDownMode.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ScaleDownMode.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { @@ -14,17 +9,17 @@ namespace Microsoft.Azure.Management.ContainerService.Models /// /// Defines values for ScaleDownMode. /// + + public static class ScaleDownMode { /// - /// Create new instances during scale up and remove instances during - /// scale down. + /// Create new instances during scale up and remove instances during scale down. /// public const string Delete = "Delete"; /// - /// Attempt to start deallocated instances (if they exist) during scale - /// up and deallocate instances during scale down. + /// Attempt to start deallocated instances (if they exist) during scale up and deallocate instances during scale down. /// public const string Deallocate = "Deallocate"; } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ScaleSetEvictionPolicy.cs b/src/Aks/Aks.Sdk/Generated/Models/ScaleSetEvictionPolicy.cs index a2b60d02b055..3b6ed9b3fd52 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ScaleSetEvictionPolicy.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ScaleSetEvictionPolicy.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { @@ -14,19 +9,17 @@ namespace Microsoft.Azure.Management.ContainerService.Models /// /// Defines values for ScaleSetEvictionPolicy. /// + + public static class ScaleSetEvictionPolicy { /// - /// Nodes in the underlying Scale Set of the node pool are deleted when - /// they're evicted. + /// Nodes in the underlying Scale Set of the node pool are deleted when they're evicted. /// public const string Delete = "Delete"; /// - /// Nodes in the underlying Scale Set of the node pool are set to the - /// stopped-deallocated state upon eviction. Nodes in the - /// stopped-deallocated state count against your compute quota and can - /// cause issues with cluster scaling or upgrading. + /// Nodes in the underlying Scale Set of the node pool are set to the stopped-deallocated state upon eviction. Nodes in the stopped-deallocated state count against your compute quota and can cause issues with cluster scaling or upgrading. /// public const string Deallocate = "Deallocate"; } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/ScaleSetPriority.cs b/src/Aks/Aks.Sdk/Generated/Models/ScaleSetPriority.cs index 2decb2bbf653..0f299804292c 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/ScaleSetPriority.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/ScaleSetPriority.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { @@ -14,12 +9,12 @@ namespace Microsoft.Azure.Management.ContainerService.Models /// /// Defines values for ScaleSetPriority. /// + + public static class ScaleSetPriority { /// - /// Spot priority VMs will be used. There is no SLA for spot nodes. See - /// [spot on AKS](https://docs.microsoft.com/azure/aks/spot-node-pool) - /// for more information. + /// Spot priority VMs will be used. There is no SLA for spot nodes. See [spot on AKS](https://docs.microsoft.com/azure/aks/spot-node-pool) for more information. /// public const string Spot = "Spot"; /// @@ -27,4 +22,4 @@ public static class ScaleSetPriority /// public const string Regular = "Regular"; } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/Sku.cs b/src/Aks/Aks.Sdk/Generated/Models/Sku.cs deleted file mode 100644 index f18a4c640b3d..000000000000 --- a/src/Aks/Aks.Sdk/Generated/Models/Sku.cs +++ /dev/null @@ -1,110 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.ContainerService.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Linq; - - /// - /// The resource model definition representing SKU - /// - public partial class Sku - { - /// - /// Initializes a new instance of the Sku class. - /// - public Sku() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the Sku class. - /// - /// The name of the SKU. Ex - P3. It is typically a - /// letter+number code - /// Possible values include: 'Free', 'Basic', - /// 'Standard', 'Premium' - /// The SKU size. When the name field is the - /// combination of tier and some other value, this would be the - /// standalone code. - /// If the service has different generations of - /// hardware, for the same SKU, then that can be captured here. - /// If the SKU supports scale out/in then the - /// capacity integer should be included. If scale out/in is not - /// possible for the resource this may be omitted. - public Sku(string name, SkuTier? tier = default(SkuTier?), string size = default(string), string family = default(string), int? capacity = default(int?)) - { - Name = name; - Tier = tier; - Size = size; - Family = family; - Capacity = capacity; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the name of the SKU. Ex - P3. It is typically a - /// letter+number code - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - - /// - /// Gets or sets possible values include: 'Free', 'Basic', 'Standard', - /// 'Premium' - /// - [JsonProperty(PropertyName = "tier")] - public SkuTier? Tier { get; set; } - - /// - /// Gets or sets the SKU size. When the name field is the combination - /// of tier and some other value, this would be the standalone code. - /// - [JsonProperty(PropertyName = "size")] - public string Size { get; set; } - - /// - /// Gets or sets if the service has different generations of hardware, - /// for the same SKU, then that can be captured here. - /// - [JsonProperty(PropertyName = "family")] - public string Family { get; set; } - - /// - /// Gets or sets if the SKU supports scale out/in then the capacity - /// integer should be included. If scale out/in is not possible for the - /// resource this may be omitted. - /// - [JsonProperty(PropertyName = "capacity")] - public int? Capacity { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (Name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Name"); - } - } - } -} diff --git a/src/Aks/Aks.Sdk/Generated/Models/SkuTier.cs b/src/Aks/Aks.Sdk/Generated/Models/SkuTier.cs deleted file mode 100644 index fcc60fd1a8b6..000000000000 --- a/src/Aks/Aks.Sdk/Generated/Models/SkuTier.cs +++ /dev/null @@ -1,72 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.ContainerService.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for SkuTier. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum SkuTier - { - [EnumMember(Value = "Free")] - Free, - [EnumMember(Value = "Basic")] - Basic, - [EnumMember(Value = "Standard")] - Standard, - [EnumMember(Value = "Premium")] - Premium - } - internal static class SkuTierEnumExtension - { - internal static string ToSerializedValue(this SkuTier? value) - { - return value == null ? null : ((SkuTier)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this SkuTier value) - { - switch( value ) - { - case SkuTier.Free: - return "Free"; - case SkuTier.Basic: - return "Basic"; - case SkuTier.Standard: - return "Standard"; - case SkuTier.Premium: - return "Premium"; - } - return null; - } - - internal static SkuTier? ParseSkuTier(this string value) - { - switch( value ) - { - case "Free": - return SkuTier.Free; - case "Basic": - return SkuTier.Basic; - case "Standard": - return SkuTier.Standard; - case "Premium": - return SkuTier.Premium; - } - return null; - } - } -} diff --git a/src/Aks/Aks.Sdk/Generated/Models/Snapshot.cs b/src/Aks/Aks.Sdk/Generated/Models/Snapshot.cs index 7eb531257b24..8bd1e1f160ef 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/Snapshot.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/Snapshot.cs @@ -1,26 +1,16 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// /// A node pool snapshot resource. /// - [Rest.Serialization.JsonTransformation] + [Microsoft.Rest.Serialization.JsonTransformation] public partial class Snapshot : TrackedResource { /// @@ -34,40 +24,67 @@ public Snapshot() /// /// Initializes a new instance of the Snapshot class. /// - /// The geo-location where the resource - /// lives + /// Fully qualified resource ID for the resource. Ex - - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - /// The name of the resource - /// The type of the resource. E.g. - /// "Microsoft.Compute/virtualMachines" or - /// "Microsoft.Storage/storageAccounts" - /// Azure Resource Manager metadata containing - /// createdBy and modifiedBy information. - /// Resource tags. - /// CreationData to be used to specify the - /// source agent pool resource ID to create this snapshot. - /// Possible values include: - /// 'NodePool' - /// The version of Kubernetes. - /// The version of node image. - /// Possible values include: 'Linux', - /// 'Windows' - /// Possible values include: 'Ubuntu', - /// 'AzureLinux', 'CBLMariner', 'Windows2019', 'Windows2022' - /// The size of the VM. - /// Whether to use a FIPS-enabled OS. - public Snapshot(string location, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), IDictionary tags = default(IDictionary), CreationData creationData = default(CreationData), string snapshotType = default(string), string kubernetesVersion = default(string), string nodeImageVersion = default(string), string osType = default(string), string osSku = default(string), string vmSize = default(string), bool? enableFIPS = default(bool?)) - : base(location, id, name, type, systemData, tags) + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// + + /// The name of the resource + /// + + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" + /// + + /// Azure Resource Manager metadata containing createdBy and modifiedBy + /// information. + /// + + /// Resource tags. + /// + + /// The geo-location where the resource lives + /// + + /// CreationData to be used to specify the source agent pool resource ID to + /// create this snapshot. + /// + + /// The type of a snapshot. The default is NodePool. + /// Possible values include: 'NodePool' + + /// The operating system type. The default is Linux. + /// Possible values include: 'Linux', 'Windows' + + /// The version of Kubernetes. + /// + + /// The version of node image. + /// + + /// Specifies the OS SKU used by the agent pool. The default is Ubuntu if + /// OSType is Linux. The default is Windows2019 when Kubernetes <= 1.24 or + /// Windows2022 when Kubernetes >= 1.25 if OSType is Windows. + /// Possible values include: 'Ubuntu', 'AzureLinux', 'CBLMariner', + /// 'Windows2019', 'Windows2022' + + /// The size of the VM. + /// + + /// Whether to use a FIPS-enabled OS. + /// + public Snapshot(string location, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), CreationData creationData = default(CreationData), string snapshotType = default(string), string osType = default(string), string kubernetesVersion = default(string), string nodeImageVersion = default(string), string osSku = default(string), string vmSize = default(string), bool? enableFips = default(bool?)) + + : base(location, id, name, type, systemData, tags) { - CreationData = creationData; - SnapshotType = snapshotType; - KubernetesVersion = kubernetesVersion; - NodeImageVersion = nodeImageVersion; - OsType = osType; - OsSku = osSku; - VmSize = vmSize; - EnableFIPS = enableFIPS; + this.CreationData = creationData; + this.SnapshotType = snapshotType; + this.OSType = osType; + this.KubernetesVersion = kubernetesVersion; + this.NodeImageVersion = nodeImageVersion; + this.OSSku = osSku; + this.VMSize = vmSize; + this.EnableFips = enableFips; CustomInit(); } @@ -76,65 +93,73 @@ public Snapshot() /// partial void CustomInit(); + /// - /// Gets or sets creationData to be used to specify the source agent - /// pool resource ID to create this snapshot. + /// Gets or sets creationData to be used to specify the source agent pool + /// resource ID to create this snapshot. /// - [JsonProperty(PropertyName = "properties.creationData")] - public CreationData CreationData { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.creationData")] + public CreationData CreationData {get; set; } /// - /// Gets or sets possible values include: 'NodePool' + /// Gets or sets the type of a snapshot. The default is NodePool. Possible values include: 'NodePool' /// - [JsonProperty(PropertyName = "properties.snapshotType")] - public string SnapshotType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.snapshotType")] + public string SnapshotType {get; set; } /// - /// Gets the version of Kubernetes. + /// Gets the operating system type. The default is Linux. Possible values include: 'Linux', 'Windows' /// - [JsonProperty(PropertyName = "properties.kubernetesVersion")] - public string KubernetesVersion { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.osType")] + public string OSType {get; private set; } /// - /// Gets the version of node image. + /// Gets the version of Kubernetes. /// - [JsonProperty(PropertyName = "properties.nodeImageVersion")] - public string NodeImageVersion { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.kubernetesVersion")] + public string KubernetesVersion {get; private set; } /// - /// Gets possible values include: 'Linux', 'Windows' + /// Gets the version of node image. /// - [JsonProperty(PropertyName = "properties.osType")] - public string OsType { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.nodeImageVersion")] + public string NodeImageVersion {get; private set; } /// - /// Gets possible values include: 'Ubuntu', 'AzureLinux', 'CBLMariner', - /// 'Windows2019', 'Windows2022' + /// Gets specifies the OS SKU used by the agent pool. The default is Ubuntu if + /// OSType is Linux. The default is Windows2019 when Kubernetes <= 1.24 or + /// Windows2022 when Kubernetes >= 1.25 if OSType is Windows. Possible values include: 'Ubuntu', 'AzureLinux', 'CBLMariner', 'Windows2019', 'Windows2022' /// - [JsonProperty(PropertyName = "properties.osSku")] - public string OsSku { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.osSku")] + public string OSSku {get; private set; } /// /// Gets the size of the VM. /// - [JsonProperty(PropertyName = "properties.vmSize")] - public string VmSize { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.vmSize")] + public string VMSize {get; private set; } /// /// Gets whether to use a FIPS-enabled OS. /// - [JsonProperty(PropertyName = "properties.enableFIPS")] - public bool? EnableFIPS { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.enableFIPS")] + public bool? EnableFips {get; private set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public override void Validate() { base.Validate(); + + + + + + + } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/SnapshotProperties.cs b/src/Aks/Aks.Sdk/Generated/Models/SnapshotProperties.cs new file mode 100644 index 000000000000..23f23bcf3806 --- /dev/null +++ b/src/Aks/Aks.Sdk/Generated/Models/SnapshotProperties.cs @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.ContainerService.Models +{ + using System.Linq; + + /// + /// Properties used to configure a node pool snapshot. + /// + public partial class SnapshotProperties + { + /// + /// Initializes a new instance of the SnapshotProperties class. + /// + public SnapshotProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SnapshotProperties class. + /// + + /// CreationData to be used to specify the source agent pool resource ID to + /// create this snapshot. + /// + + /// The type of a snapshot. The default is NodePool. + /// Possible values include: 'NodePool' + + /// The version of Kubernetes. + /// + + /// The version of node image. + /// + + /// The operating system type. The default is Linux. + /// Possible values include: 'Linux', 'Windows' + + /// Specifies the OS SKU used by the agent pool. The default is Ubuntu if + /// OSType is Linux. The default is Windows2019 when Kubernetes <= 1.24 or + /// Windows2022 when Kubernetes >= 1.25 if OSType is Windows. + /// Possible values include: 'Ubuntu', 'AzureLinux', 'CBLMariner', + /// 'Windows2019', 'Windows2022' + + /// The size of the VM. + /// + + /// Whether to use a FIPS-enabled OS. + /// + public SnapshotProperties(CreationData creationData = default(CreationData), string snapshotType = default(string), string kubernetesVersion = default(string), string nodeImageVersion = default(string), string osType = default(string), string osSku = default(string), string vmSize = default(string), bool? enableFips = default(bool?)) + + { + this.CreationData = creationData; + this.SnapshotType = snapshotType; + this.KubernetesVersion = kubernetesVersion; + this.NodeImageVersion = nodeImageVersion; + this.OSType = osType; + this.OSSku = osSku; + this.VMSize = vmSize; + this.EnableFips = enableFips; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets creationData to be used to specify the source agent pool + /// resource ID to create this snapshot. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "creationData")] + public CreationData CreationData {get; set; } + + /// + /// Gets or sets the type of a snapshot. The default is NodePool. Possible values include: 'NodePool' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "snapshotType")] + public string SnapshotType {get; set; } + + /// + /// Gets the version of Kubernetes. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "kubernetesVersion")] + public string KubernetesVersion {get; private set; } + + /// + /// Gets the version of node image. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "nodeImageVersion")] + public string NodeImageVersion {get; private set; } + + /// + /// Gets the operating system type. The default is Linux. Possible values include: 'Linux', 'Windows' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "osType")] + public string OSType {get; private set; } + + /// + /// Gets specifies the OS SKU used by the agent pool. The default is Ubuntu if + /// OSType is Linux. The default is Windows2019 when Kubernetes <= 1.24 or + /// Windows2022 when Kubernetes >= 1.25 if OSType is Windows. Possible values include: 'Ubuntu', 'AzureLinux', 'CBLMariner', 'Windows2019', 'Windows2022' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "osSku")] + public string OSSku {get; private set; } + + /// + /// Gets the size of the VM. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "vmSize")] + public string VMSize {get; private set; } + + /// + /// Gets whether to use a FIPS-enabled OS. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "enableFIPS")] + public bool? EnableFips {get; private set; } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/SnapshotType.cs b/src/Aks/Aks.Sdk/Generated/Models/SnapshotType.cs index 502c72d2b324..4a8fa490f06c 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/SnapshotType.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/SnapshotType.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.ContainerService.Models /// /// Defines values for SnapshotType. /// + + public static class SnapshotType { /// @@ -21,4 +18,4 @@ public static class SnapshotType /// public const string NodePool = "NodePool"; } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/SubResource.cs b/src/Aks/Aks.Sdk/Generated/Models/SubResource.cs index e98cf26ae01d..a63922b7484c 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/SubResource.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/SubResource.cs @@ -1,24 +1,16 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Newtonsoft.Json; using System.Linq; /// /// Reference to another subresource. /// - public partial class SubResource : IResource + public partial class SubResource : Microsoft.Rest.Azure.IResource { /// /// Initializes a new instance of the SubResource class. @@ -31,16 +23,22 @@ public SubResource() /// /// Initializes a new instance of the SubResource class. /// - /// Resource ID. - /// The name of the resource that is unique within a - /// resource group. This name can be used to access the - /// resource. - /// Resource type + + /// Resource ID. + /// + + /// The name of the resource that is unique within a resource group. This name + /// can be used to access the resource. + /// + + /// Resource type + /// public SubResource(string id = default(string), string name = default(string), string type = default(string)) + { - Id = id; - Name = name; - Type = type; + this.Id = id; + this.Name = name; + this.Type = type; CustomInit(); } @@ -49,24 +47,24 @@ public SubResource() /// partial void CustomInit(); + /// /// Gets resource ID. /// - [JsonProperty(PropertyName = "id")] - public string Id { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "id")] + public string Id {get; private set; } /// - /// Gets the name of the resource that is unique within a resource - /// group. This name can be used to access the resource. + /// Gets the name of the resource that is unique within a resource group. This + /// name can be used to access the resource. /// - [JsonProperty(PropertyName = "name")] - public string Name { get; private set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "name")] + public string Name {get; private set; } /// /// Gets resource type /// - [JsonProperty(PropertyName = "type")] - public string Type { get; private set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public string Type {get; private set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/SysctlConfig.cs b/src/Aks/Aks.Sdk/Generated/Models/SysctlConfig.cs index c97dba97e866..10e3b8df6dc3 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/SysctlConfig.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/SysctlConfig.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,88 +23,121 @@ public SysctlConfig() /// /// Initializes a new instance of the SysctlConfig class. /// - /// Sysctl setting - /// net.core.somaxconn. - /// Sysctl setting - /// net.core.netdev_max_backlog. - /// Sysctl setting - /// net.core.rmem_default. - /// Sysctl setting - /// net.core.rmem_max. - /// Sysctl setting - /// net.core.wmem_default. - /// Sysctl setting - /// net.core.wmem_max. - /// Sysctl setting - /// net.core.optmem_max. - /// Sysctl setting - /// net.ipv4.tcp_max_syn_backlog. - /// Sysctl setting - /// net.ipv4.tcp_max_tw_buckets. - /// Sysctl setting - /// net.ipv4.tcp_fin_timeout. - /// Sysctl setting - /// net.ipv4.tcp_keepalive_time. - /// Sysctl setting - /// net.ipv4.tcp_keepalive_probes. - /// Sysctl setting - /// net.ipv4.tcp_keepalive_intvl. - /// Sysctl setting - /// net.ipv4.tcp_tw_reuse. - /// Sysctl setting - /// net.ipv4.ip_local_port_range. - /// Sysctl setting - /// net.ipv4.neigh.default.gc_thresh1. - /// Sysctl setting - /// net.ipv4.neigh.default.gc_thresh2. - /// Sysctl setting - /// net.ipv4.neigh.default.gc_thresh3. - /// Sysctl setting - /// net.netfilter.nf_conntrack_max. - /// Sysctl setting - /// net.netfilter.nf_conntrack_buckets. - /// Sysctl setting - /// fs.inotify.max_user_watches. - /// Sysctl setting fs.file-max. - /// Sysctl setting fs.aio-max-nr. - /// Sysctl setting fs.nr_open. - /// Sysctl setting - /// kernel.threads-max. - /// Sysctl setting - /// vm.max_map_count. - /// Sysctl setting vm.swappiness. - /// Sysctl setting - /// vm.vfs_cache_pressure. - public SysctlConfig(int? netCoreSomaxconn = default(int?), int? netCoreNetdevMaxBacklog = default(int?), int? netCoreRmemDefault = default(int?), int? netCoreRmemMax = default(int?), int? netCoreWmemDefault = default(int?), int? netCoreWmemMax = default(int?), int? netCoreOptmemMax = default(int?), int? netIpv4TcpMaxSynBacklog = default(int?), int? netIpv4TcpMaxTwBuckets = default(int?), int? netIpv4TcpFinTimeout = default(int?), int? netIpv4TcpKeepaliveTime = default(int?), int? netIpv4TcpKeepaliveProbes = default(int?), int? netIpv4TcpkeepaliveIntvl = default(int?), bool? netIpv4TcpTwReuse = default(bool?), string netIpv4IpLocalPortRange = default(string), int? netIpv4NeighDefaultGcThresh1 = default(int?), int? netIpv4NeighDefaultGcThresh2 = default(int?), int? netIpv4NeighDefaultGcThresh3 = default(int?), int? netNetfilterNfConntrackMax = default(int?), int? netNetfilterNfConntrackBuckets = default(int?), int? fsInotifyMaxUserWatches = default(int?), int? fsFileMax = default(int?), int? fsAioMaxNr = default(int?), int? fsNrOpen = default(int?), int? kernelThreadsMax = default(int?), int? vmMaxMapCount = default(int?), int? vmSwappiness = default(int?), int? vmVfsCachePressure = default(int?)) + + /// Sysctl setting net.core.somaxconn. + /// + + /// Sysctl setting net.core.netdev_max_backlog. + /// + + /// Sysctl setting net.core.rmem_default. + /// + + /// Sysctl setting net.core.rmem_max. + /// + + /// Sysctl setting net.core.wmem_default. + /// + + /// Sysctl setting net.core.wmem_max. + /// + + /// Sysctl setting net.core.optmem_max. + /// + + /// Sysctl setting net.ipv4.tcp_max_syn_backlog. + /// + + /// Sysctl setting net.ipv4.tcp_max_tw_buckets. + /// + + /// Sysctl setting net.ipv4.tcp_fin_timeout. + /// + + /// Sysctl setting net.ipv4.tcp_keepalive_time. + /// + + /// Sysctl setting net.ipv4.tcp_keepalive_probes. + /// + + /// Sysctl setting net.ipv4.tcp_keepalive_intvl. + /// + + /// Sysctl setting net.ipv4.tcp_tw_reuse. + /// + + /// Sysctl setting net.ipv4.ip_local_port_range. + /// + + /// Sysctl setting net.ipv4.neigh.default.gc_thresh1. + /// + + /// Sysctl setting net.ipv4.neigh.default.gc_thresh2. + /// + + /// Sysctl setting net.ipv4.neigh.default.gc_thresh3. + /// + + /// Sysctl setting net.netfilter.nf_conntrack_max. + /// + + /// Sysctl setting net.netfilter.nf_conntrack_buckets. + /// + + /// Sysctl setting fs.inotify.max_user_watches. + /// + + /// Sysctl setting fs.file-max. + /// + + /// Sysctl setting fs.aio-max-nr. + /// + + /// Sysctl setting fs.nr_open. + /// + + /// Sysctl setting kernel.threads-max. + /// + + /// Sysctl setting vm.max_map_count. + /// + + /// Sysctl setting vm.swappiness. + /// + + /// Sysctl setting vm.vfs_cache_pressure. + /// + public SysctlConfig(int? netCoreSomaxconn = default(int?), int? netCoreNetdevMaxBacklog = default(int?), int? netCoreRmemDefault = default(int?), int? netCoreRmemMax = default(int?), int? netCoreWmemDefault = default(int?), int? netCoreWmemMax = default(int?), int? netCoreOptmemMax = default(int?), int? netIpv4TcpMaxSynBacklog = default(int?), int? netIpv4TcpMaxTwBuckets = default(int?), int? netIpv4TcpFinTimeout = default(int?), int? netIpv4TcpKeepaliveTime = default(int?), int? netIpv4TcpKeepaliveProbes = default(int?), int? netIpv4TcpkeepaliveIntvl = default(int?), bool? netIpv4TcpTwReuse = default(bool?), string netIpv4IPLocalPortRange = default(string), int? netIpv4NeighDefaultGcThresh1 = default(int?), int? netIpv4NeighDefaultGcThresh2 = default(int?), int? netIpv4NeighDefaultGcThresh3 = default(int?), int? netNetfilterNfConntrackMax = default(int?), int? netNetfilterNfConntrackBuckets = default(int?), int? fsInotifyMaxUserWatches = default(int?), int? fsFileMax = default(int?), int? fsAioMaxNr = default(int?), int? fsNrOpen = default(int?), int? kernelThreadsMax = default(int?), int? vmMaxMapCount = default(int?), int? vmSwappiness = default(int?), int? vmVfsCachePressure = default(int?)) + { - NetCoreSomaxconn = netCoreSomaxconn; - NetCoreNetdevMaxBacklog = netCoreNetdevMaxBacklog; - NetCoreRmemDefault = netCoreRmemDefault; - NetCoreRmemMax = netCoreRmemMax; - NetCoreWmemDefault = netCoreWmemDefault; - NetCoreWmemMax = netCoreWmemMax; - NetCoreOptmemMax = netCoreOptmemMax; - NetIpv4TcpMaxSynBacklog = netIpv4TcpMaxSynBacklog; - NetIpv4TcpMaxTwBuckets = netIpv4TcpMaxTwBuckets; - NetIpv4TcpFinTimeout = netIpv4TcpFinTimeout; - NetIpv4TcpKeepaliveTime = netIpv4TcpKeepaliveTime; - NetIpv4TcpKeepaliveProbes = netIpv4TcpKeepaliveProbes; - NetIpv4TcpkeepaliveIntvl = netIpv4TcpkeepaliveIntvl; - NetIpv4TcpTwReuse = netIpv4TcpTwReuse; - NetIpv4IpLocalPortRange = netIpv4IpLocalPortRange; - NetIpv4NeighDefaultGcThresh1 = netIpv4NeighDefaultGcThresh1; - NetIpv4NeighDefaultGcThresh2 = netIpv4NeighDefaultGcThresh2; - NetIpv4NeighDefaultGcThresh3 = netIpv4NeighDefaultGcThresh3; - NetNetfilterNfConntrackMax = netNetfilterNfConntrackMax; - NetNetfilterNfConntrackBuckets = netNetfilterNfConntrackBuckets; - FsInotifyMaxUserWatches = fsInotifyMaxUserWatches; - FsFileMax = fsFileMax; - FsAioMaxNr = fsAioMaxNr; - FsNrOpen = fsNrOpen; - KernelThreadsMax = kernelThreadsMax; - VmMaxMapCount = vmMaxMapCount; - VmSwappiness = vmSwappiness; - VmVfsCachePressure = vmVfsCachePressure; + this.NetCoreSomaxconn = netCoreSomaxconn; + this.NetCoreNetdevMaxBacklog = netCoreNetdevMaxBacklog; + this.NetCoreRmemDefault = netCoreRmemDefault; + this.NetCoreRmemMax = netCoreRmemMax; + this.NetCoreWmemDefault = netCoreWmemDefault; + this.NetCoreWmemMax = netCoreWmemMax; + this.NetCoreOptmemMax = netCoreOptmemMax; + this.NetIpv4TcpMaxSynBacklog = netIpv4TcpMaxSynBacklog; + this.NetIpv4TcpMaxTwBuckets = netIpv4TcpMaxTwBuckets; + this.NetIpv4TcpFinTimeout = netIpv4TcpFinTimeout; + this.NetIpv4TcpKeepaliveTime = netIpv4TcpKeepaliveTime; + this.NetIpv4TcpKeepaliveProbes = netIpv4TcpKeepaliveProbes; + this.NetIpv4TcpkeepaliveIntvl = netIpv4TcpkeepaliveIntvl; + this.NetIpv4TcpTwReuse = netIpv4TcpTwReuse; + this.NetIpv4IPLocalPortRange = netIpv4IPLocalPortRange; + this.NetIpv4NeighDefaultGcThresh1 = netIpv4NeighDefaultGcThresh1; + this.NetIpv4NeighDefaultGcThresh2 = netIpv4NeighDefaultGcThresh2; + this.NetIpv4NeighDefaultGcThresh3 = netIpv4NeighDefaultGcThresh3; + this.NetNetfilterNfConntrackMax = netNetfilterNfConntrackMax; + this.NetNetfilterNfConntrackBuckets = netNetfilterNfConntrackBuckets; + this.FsInotifyMaxUserWatches = fsInotifyMaxUserWatches; + this.FsFileMax = fsFileMax; + this.FsAioMaxNr = fsAioMaxNr; + this.FsNrOpen = fsNrOpen; + this.KernelThreadsMax = kernelThreadsMax; + this.VMMaxMapCount = vmMaxMapCount; + this.VMSwappiness = vmSwappiness; + this.VMVfsCachePressure = vmVfsCachePressure; CustomInit(); } @@ -119,173 +146,173 @@ public SysctlConfig() /// partial void CustomInit(); + /// /// Gets or sets sysctl setting net.core.somaxconn. /// - [JsonProperty(PropertyName = "netCoreSomaxconn")] - public int? NetCoreSomaxconn { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "netCoreSomaxconn")] + public int? NetCoreSomaxconn {get; set; } /// /// Gets or sets sysctl setting net.core.netdev_max_backlog. /// - [JsonProperty(PropertyName = "netCoreNetdevMaxBacklog")] - public int? NetCoreNetdevMaxBacklog { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "netCoreNetdevMaxBacklog")] + public int? NetCoreNetdevMaxBacklog {get; set; } /// /// Gets or sets sysctl setting net.core.rmem_default. /// - [JsonProperty(PropertyName = "netCoreRmemDefault")] - public int? NetCoreRmemDefault { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "netCoreRmemDefault")] + public int? NetCoreRmemDefault {get; set; } /// /// Gets or sets sysctl setting net.core.rmem_max. /// - [JsonProperty(PropertyName = "netCoreRmemMax")] - public int? NetCoreRmemMax { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "netCoreRmemMax")] + public int? NetCoreRmemMax {get; set; } /// /// Gets or sets sysctl setting net.core.wmem_default. /// - [JsonProperty(PropertyName = "netCoreWmemDefault")] - public int? NetCoreWmemDefault { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "netCoreWmemDefault")] + public int? NetCoreWmemDefault {get; set; } /// /// Gets or sets sysctl setting net.core.wmem_max. /// - [JsonProperty(PropertyName = "netCoreWmemMax")] - public int? NetCoreWmemMax { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "netCoreWmemMax")] + public int? NetCoreWmemMax {get; set; } /// /// Gets or sets sysctl setting net.core.optmem_max. /// - [JsonProperty(PropertyName = "netCoreOptmemMax")] - public int? NetCoreOptmemMax { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "netCoreOptmemMax")] + public int? NetCoreOptmemMax {get; set; } /// /// Gets or sets sysctl setting net.ipv4.tcp_max_syn_backlog. /// - [JsonProperty(PropertyName = "netIpv4TcpMaxSynBacklog")] - public int? NetIpv4TcpMaxSynBacklog { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "netIpv4TcpMaxSynBacklog")] + public int? NetIpv4TcpMaxSynBacklog {get; set; } /// /// Gets or sets sysctl setting net.ipv4.tcp_max_tw_buckets. /// - [JsonProperty(PropertyName = "netIpv4TcpMaxTwBuckets")] - public int? NetIpv4TcpMaxTwBuckets { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "netIpv4TcpMaxTwBuckets")] + public int? NetIpv4TcpMaxTwBuckets {get; set; } /// /// Gets or sets sysctl setting net.ipv4.tcp_fin_timeout. /// - [JsonProperty(PropertyName = "netIpv4TcpFinTimeout")] - public int? NetIpv4TcpFinTimeout { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "netIpv4TcpFinTimeout")] + public int? NetIpv4TcpFinTimeout {get; set; } /// /// Gets or sets sysctl setting net.ipv4.tcp_keepalive_time. /// - [JsonProperty(PropertyName = "netIpv4TcpKeepaliveTime")] - public int? NetIpv4TcpKeepaliveTime { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "netIpv4TcpKeepaliveTime")] + public int? NetIpv4TcpKeepaliveTime {get; set; } /// /// Gets or sets sysctl setting net.ipv4.tcp_keepalive_probes. /// - [JsonProperty(PropertyName = "netIpv4TcpKeepaliveProbes")] - public int? NetIpv4TcpKeepaliveProbes { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "netIpv4TcpKeepaliveProbes")] + public int? NetIpv4TcpKeepaliveProbes {get; set; } /// /// Gets or sets sysctl setting net.ipv4.tcp_keepalive_intvl. /// - [JsonProperty(PropertyName = "netIpv4TcpkeepaliveIntvl")] - public int? NetIpv4TcpkeepaliveIntvl { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "netIpv4TcpkeepaliveIntvl")] + public int? NetIpv4TcpkeepaliveIntvl {get; set; } /// /// Gets or sets sysctl setting net.ipv4.tcp_tw_reuse. /// - [JsonProperty(PropertyName = "netIpv4TcpTwReuse")] - public bool? NetIpv4TcpTwReuse { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "netIpv4TcpTwReuse")] + public bool? NetIpv4TcpTwReuse {get; set; } /// /// Gets or sets sysctl setting net.ipv4.ip_local_port_range. /// - [JsonProperty(PropertyName = "netIpv4IpLocalPortRange")] - public string NetIpv4IpLocalPortRange { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "netIpv4IpLocalPortRange")] + public string NetIpv4IPLocalPortRange {get; set; } /// /// Gets or sets sysctl setting net.ipv4.neigh.default.gc_thresh1. /// - [JsonProperty(PropertyName = "netIpv4NeighDefaultGcThresh1")] - public int? NetIpv4NeighDefaultGcThresh1 { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "netIpv4NeighDefaultGcThresh1")] + public int? NetIpv4NeighDefaultGcThresh1 {get; set; } /// /// Gets or sets sysctl setting net.ipv4.neigh.default.gc_thresh2. /// - [JsonProperty(PropertyName = "netIpv4NeighDefaultGcThresh2")] - public int? NetIpv4NeighDefaultGcThresh2 { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "netIpv4NeighDefaultGcThresh2")] + public int? NetIpv4NeighDefaultGcThresh2 {get; set; } /// /// Gets or sets sysctl setting net.ipv4.neigh.default.gc_thresh3. /// - [JsonProperty(PropertyName = "netIpv4NeighDefaultGcThresh3")] - public int? NetIpv4NeighDefaultGcThresh3 { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "netIpv4NeighDefaultGcThresh3")] + public int? NetIpv4NeighDefaultGcThresh3 {get; set; } /// /// Gets or sets sysctl setting net.netfilter.nf_conntrack_max. /// - [JsonProperty(PropertyName = "netNetfilterNfConntrackMax")] - public int? NetNetfilterNfConntrackMax { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "netNetfilterNfConntrackMax")] + public int? NetNetfilterNfConntrackMax {get; set; } /// /// Gets or sets sysctl setting net.netfilter.nf_conntrack_buckets. /// - [JsonProperty(PropertyName = "netNetfilterNfConntrackBuckets")] - public int? NetNetfilterNfConntrackBuckets { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "netNetfilterNfConntrackBuckets")] + public int? NetNetfilterNfConntrackBuckets {get; set; } /// /// Gets or sets sysctl setting fs.inotify.max_user_watches. /// - [JsonProperty(PropertyName = "fsInotifyMaxUserWatches")] - public int? FsInotifyMaxUserWatches { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "fsInotifyMaxUserWatches")] + public int? FsInotifyMaxUserWatches {get; set; } /// /// Gets or sets sysctl setting fs.file-max. /// - [JsonProperty(PropertyName = "fsFileMax")] - public int? FsFileMax { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "fsFileMax")] + public int? FsFileMax {get; set; } /// /// Gets or sets sysctl setting fs.aio-max-nr. /// - [JsonProperty(PropertyName = "fsAioMaxNr")] - public int? FsAioMaxNr { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "fsAioMaxNr")] + public int? FsAioMaxNr {get; set; } /// /// Gets or sets sysctl setting fs.nr_open. /// - [JsonProperty(PropertyName = "fsNrOpen")] - public int? FsNrOpen { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "fsNrOpen")] + public int? FsNrOpen {get; set; } /// /// Gets or sets sysctl setting kernel.threads-max. /// - [JsonProperty(PropertyName = "kernelThreadsMax")] - public int? KernelThreadsMax { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "kernelThreadsMax")] + public int? KernelThreadsMax {get; set; } /// /// Gets or sets sysctl setting vm.max_map_count. /// - [JsonProperty(PropertyName = "vmMaxMapCount")] - public int? VmMaxMapCount { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmMaxMapCount")] + public int? VMMaxMapCount {get; set; } /// /// Gets or sets sysctl setting vm.swappiness. /// - [JsonProperty(PropertyName = "vmSwappiness")] - public int? VmSwappiness { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "vmSwappiness")] + public int? VMSwappiness {get; set; } /// /// Gets or sets sysctl setting vm.vfs_cache_pressure. /// - [JsonProperty(PropertyName = "vmVfsCachePressure")] - public int? VmVfsCachePressure { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "vmVfsCachePressure")] + public int? VMVfsCachePressure {get; set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/SystemData.cs b/src/Aks/Aks.Sdk/Generated/Models/SystemData.cs index aad6e33d9909..94ab1b1b1312 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/SystemData.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/SystemData.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,28 +23,33 @@ public SystemData() /// /// Initializes a new instance of the SystemData class. /// - /// The identity that created the - /// resource. - /// The type of identity that created the - /// resource. Possible values include: 'User', 'Application', - /// 'ManagedIdentity', 'Key' - /// The timestamp of resource creation - /// (UTC). - /// The identity that last modified the - /// resource. - /// The type of identity that last - /// modified the resource. Possible values include: 'User', - /// 'Application', 'ManagedIdentity', 'Key' - /// The timestamp of resource last - /// modification (UTC) + + /// The identity that created the resource. + /// + + /// The type of identity that created the resource. + /// Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' + + /// The timestamp of resource creation (UTC). + /// + + /// The identity that last modified the resource. + /// + + /// The type of identity that last modified the resource. + /// Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' + + /// The timestamp of resource last modification (UTC) + /// public SystemData(string createdBy = default(string), string createdByType = default(string), System.DateTime? createdAt = default(System.DateTime?), string lastModifiedBy = default(string), string lastModifiedByType = default(string), System.DateTime? lastModifiedAt = default(System.DateTime?)) + { - CreatedBy = createdBy; - CreatedByType = createdByType; - CreatedAt = createdAt; - LastModifiedBy = lastModifiedBy; - LastModifiedByType = lastModifiedByType; - LastModifiedAt = lastModifiedAt; + this.CreatedBy = createdBy; + this.CreatedByType = createdByType; + this.CreatedAt = createdAt; + this.LastModifiedBy = lastModifiedBy; + this.LastModifiedByType = lastModifiedByType; + this.LastModifiedAt = lastModifiedAt; CustomInit(); } @@ -59,45 +58,41 @@ public SystemData() /// partial void CustomInit(); + /// /// Gets or sets the identity that created the resource. /// - [JsonProperty(PropertyName = "createdBy")] - public string CreatedBy { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "createdBy")] + public string CreatedBy {get; set; } /// - /// Gets or sets the type of identity that created the resource. - /// Possible values include: 'User', 'Application', 'ManagedIdentity', - /// 'Key' + /// Gets or sets the type of identity that created the resource. Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' /// - [JsonProperty(PropertyName = "createdByType")] - public string CreatedByType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "createdByType")] + public string CreatedByType {get; set; } /// /// Gets or sets the timestamp of resource creation (UTC). /// - [JsonProperty(PropertyName = "createdAt")] - public System.DateTime? CreatedAt { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "createdAt")] + public System.DateTime? CreatedAt {get; set; } /// /// Gets or sets the identity that last modified the resource. /// - [JsonProperty(PropertyName = "lastModifiedBy")] - public string LastModifiedBy { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastModifiedBy")] + public string LastModifiedBy {get; set; } /// - /// Gets or sets the type of identity that last modified the resource. - /// Possible values include: 'User', 'Application', 'ManagedIdentity', - /// 'Key' + /// Gets or sets the type of identity that last modified the resource. Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' /// - [JsonProperty(PropertyName = "lastModifiedByType")] - public string LastModifiedByType { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "lastModifiedByType")] + public string LastModifiedByType {get; set; } /// /// Gets or sets the timestamp of resource last modification (UTC) /// - [JsonProperty(PropertyName = "lastModifiedAt")] - public System.DateTime? LastModifiedAt { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "lastModifiedAt")] + public System.DateTime? LastModifiedAt {get; set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/TagsObject.cs b/src/Aks/Aks.Sdk/Generated/Models/TagsObject.cs index d6057a5c1d2b..4720cc039251 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/TagsObject.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/TagsObject.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,10 +23,13 @@ public TagsObject() /// /// Initializes a new instance of the TagsObject class. /// - /// Resource tags. - public TagsObject(IDictionary tags = default(IDictionary)) + + /// Resource tags. + /// + public TagsObject(System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary)) + { - Tags = tags; + this.Tags = tags; CustomInit(); } @@ -43,11 +38,11 @@ public TagsObject() /// partial void CustomInit(); + /// /// Gets or sets resource tags. /// - [JsonProperty(PropertyName = "tags")] - public IDictionary Tags { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "tags")] + public System.Collections.Generic.IDictionary Tags {get; set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/TimeInWeek.cs b/src/Aks/Aks.Sdk/Generated/Models/TimeInWeek.cs index 18570e995d9e..8d6d6bc93a06 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/TimeInWeek.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/TimeInWeek.cs @@ -1,18 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -31,15 +23,21 @@ public TimeInWeek() /// /// Initializes a new instance of the TimeInWeek class. /// - /// The day of the week. Possible values include: - /// 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', - /// 'Saturday' - /// A list of hours in the day used to identify - /// a time range. - public TimeInWeek(string day = default(string), IList hourSlots = default(IList)) + + /// The day of the week. + /// Possible values include: 'Sunday', 'Monday', 'Tuesday', 'Wednesday', + /// 'Thursday', 'Friday', 'Saturday' + + /// Each integer hour represents a time range beginning at 0m after the hour + /// ending at the next hour (non-inclusive). 0 corresponds to 00:00 UTC, 23 + /// corresponds to 23:00 UTC. Specifying [0, 1] means the 00:00 - 02:00 UTC + /// time range. + /// + public TimeInWeek(string day = default(string), System.Collections.Generic.IList hourSlots = default(System.Collections.Generic.IList)) + { - Day = day; - HourSlots = hourSlots; + this.Day = day; + this.HourSlots = hourSlots; CustomInit(); } @@ -48,26 +46,20 @@ public TimeInWeek() /// partial void CustomInit(); + /// - /// Gets or sets the day of the week. Possible values include: - /// 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', - /// 'Saturday' + /// Gets or sets the day of the week. Possible values include: 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' /// - [JsonProperty(PropertyName = "day")] - public string Day { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "day")] + public string Day {get; set; } /// - /// Gets or sets a list of hours in the day used to identify a time - /// range. + /// Gets or sets each integer hour represents a time range beginning at 0m + /// after the hour ending at the next hour (non-inclusive). 0 corresponds to + /// 00:00 UTC, 23 corresponds to 23:00 UTC. Specifying [0, 1] means the 00:00 - + /// 02:00 UTC time range. /// - /// - /// Each integer hour represents a time range beginning at 0m after the - /// hour ending at the next hour (non-inclusive). 0 corresponds to - /// 00:00 UTC, 23 corresponds to 23:00 UTC. Specifying [0, 1] means the - /// 00:00 - 02:00 UTC time range. - /// - [JsonProperty(PropertyName = "hourSlots")] - public IList HourSlots { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "hourSlots")] + public System.Collections.Generic.IList HourSlots {get; set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/TimeSpan.cs b/src/Aks/Aks.Sdk/Generated/Models/TimeSpan.cs index b9f29a871f3b..bece3ed677b2 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/TimeSpan.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/TimeSpan.cs @@ -1,20 +1,14 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; using System.Linq; /// - /// A time range. + /// For example, between 2021-05-25T13:00:00Z and 2021-05-25T14:00:00Z. /// /// /// For example, between 2021-05-25T13:00:00Z and 2021-05-25T14:00:00Z. @@ -32,12 +26,17 @@ public TimeSpan() /// /// Initializes a new instance of the TimeSpan class. /// - /// The start of a time span - /// The end of a time span + + /// The start of a time span + /// + + /// The end of a time span + /// public TimeSpan(System.DateTime? start = default(System.DateTime?), System.DateTime? end = default(System.DateTime?)) + { - Start = start; - End = end; + this.Start = start; + this.End = end; CustomInit(); } @@ -46,17 +45,17 @@ public TimeSpan() /// partial void CustomInit(); + /// /// Gets or sets the start of a time span /// - [JsonProperty(PropertyName = "start")] - public System.DateTime? Start { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "start")] + public System.DateTime? Start {get; set; } /// /// Gets or sets the end of a time span /// - [JsonProperty(PropertyName = "end")] - public System.DateTime? End { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "end")] + public System.DateTime? End {get; set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/TrackedResource.cs b/src/Aks/Aks.Sdk/Generated/Models/TrackedResource.cs index f36da4f4b9c0..0158f90ad51f 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/TrackedResource.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/TrackedResource.cs @@ -1,27 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// - /// Tracked Resource + /// The resource model definition for an Azure Resource Manager tracked top + /// level resource which has 'tags' and a 'location' /// /// /// The resource model definition for an Azure Resource Manager tracked top - /// level resource which has 'tags' and a 'location' + /// level resource which has 'tags' and a 'location' /// public partial class TrackedResource : Resource { @@ -36,22 +28,33 @@ public TrackedResource() /// /// Initializes a new instance of the TrackedResource class. /// - /// The geo-location where the resource - /// lives + /// Fully qualified resource ID for the resource. Ex - - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - /// The name of the resource - /// The type of the resource. E.g. - /// "Microsoft.Compute/virtualMachines" or - /// "Microsoft.Storage/storageAccounts" - /// Azure Resource Manager metadata containing - /// createdBy and modifiedBy information. - /// Resource tags. - public TrackedResource(string location, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), IDictionary tags = default(IDictionary)) - : base(id, name, type, systemData) + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// + + /// The name of the resource + /// + + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" + /// + + /// Azure Resource Manager metadata containing createdBy and modifiedBy + /// information. + /// + + /// Resource tags. + /// + + /// The geo-location where the resource lives + /// + public TrackedResource(string location, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary)) + + : base(id, name, type, systemData) { - Tags = tags; - Location = location; + this.Tags = tags; + this.Location = location; CustomInit(); } @@ -60,30 +63,32 @@ public TrackedResource() /// partial void CustomInit(); + /// /// Gets or sets resource tags. /// - [JsonProperty(PropertyName = "tags")] - public IDictionary Tags { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "tags")] + public System.Collections.Generic.IDictionary Tags {get; set; } /// /// Gets or sets the geo-location where the resource lives /// - [JsonProperty(PropertyName = "location")] - public string Location { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "location")] + public string Location {get; set; } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - if (Location == null) + if (this.Location == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "Location"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Location"); } + + } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/UpgradeChannel.cs b/src/Aks/Aks.Sdk/Generated/Models/UpgradeChannel.cs index 91af780850f9..81bd0852746d 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/UpgradeChannel.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/UpgradeChannel.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { @@ -14,48 +9,29 @@ namespace Microsoft.Azure.Management.ContainerService.Models /// /// Defines values for UpgradeChannel. /// + + public static class UpgradeChannel { /// - /// Automatically upgrade the cluster to the latest supported patch - /// release on the latest supported minor version. In cases where the - /// cluster is at a version of Kubernetes that is at an N-2 minor - /// version where N is the latest supported minor version, the cluster - /// first upgrades to the latest supported patch version on N-1 minor - /// version. For example, if a cluster is running version 1.17.7 and - /// versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your - /// cluster first is upgraded to 1.18.6, then is upgraded to 1.19.1. + /// Automatically upgrade the cluster to the latest supported patch release on the latest supported minor version. In cases where the cluster is at a version of Kubernetes that is at an N-2 minor version where N is the latest supported minor version, the cluster first upgrades to the latest supported patch version on N-1 minor version. For example, if a cluster is running version 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster first is upgraded to 1.18.6, then is upgraded to 1.19.1. /// public const string Rapid = "rapid"; /// - /// Automatically upgrade the cluster to the latest supported patch - /// release on minor version N-1, where N is the latest supported minor - /// version. For example, if a cluster is running version 1.17.7 and - /// versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your - /// cluster is upgraded to 1.18.6. + /// Automatically upgrade the cluster to the latest supported patch release on minor version N-1, where N is the latest supported minor version. For example, if a cluster is running version 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster is upgraded to 1.18.6. /// public const string Stable = "stable"; /// - /// Automatically upgrade the cluster to the latest supported patch - /// version when it becomes available while keeping the minor version - /// the same. For example, if a cluster is running version 1.17.7 and - /// versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your - /// cluster is upgraded to 1.17.9. + /// Automatically upgrade the cluster to the latest supported patch version when it becomes available while keeping the minor version the same. For example, if a cluster is running version 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster is upgraded to 1.17.9. /// public const string Patch = "patch"; /// - /// Automatically upgrade the node image to the latest version - /// available. Microsoft provides patches and new images for image - /// nodes frequently (usually weekly), but your running nodes won't get - /// the new images unless you do a node image upgrade. Turning on the - /// node-image channel will automatically update your node images - /// whenever a new version is available. + /// Automatically upgrade the node image to the latest version available. Microsoft provides patches and new images for image nodes frequently (usually weekly), but your running nodes won't get the new images unless you do a node image upgrade. Turning on the node-image channel will automatically update your node images whenever a new version is available. /// public const string NodeImage = "node-image"; /// - /// Disables auto-upgrades and keeps the cluster at its current version - /// of Kubernetes. + /// Disables auto-upgrades and keeps the cluster at its current version of Kubernetes. /// public const string None = "none"; } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/UserAssignedIdentity.cs b/src/Aks/Aks.Sdk/Generated/Models/UserAssignedIdentity.cs index 1d5dc18d049c..fa24cb74cc3e 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/UserAssignedIdentity.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/UserAssignedIdentity.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,17 +23,21 @@ public UserAssignedIdentity() /// /// Initializes a new instance of the UserAssignedIdentity class. /// - /// The resource ID of the user assigned - /// identity. - /// The client ID of the user assigned - /// identity. - /// The object ID of the user assigned - /// identity. + + /// The resource ID of the user assigned identity. + /// + + /// The client ID of the user assigned identity. + /// + + /// The object ID of the user assigned identity. + /// public UserAssignedIdentity(string resourceId = default(string), string clientId = default(string), string objectId = default(string)) + { - ResourceId = resourceId; - ClientId = clientId; - ObjectId = objectId; + this.ResourceId = resourceId; + this.ClientId = clientId; + this.ObjectId = objectId; CustomInit(); } @@ -48,23 +46,23 @@ public UserAssignedIdentity() /// partial void CustomInit(); + /// /// Gets or sets the resource ID of the user assigned identity. /// - [JsonProperty(PropertyName = "resourceId")] - public string ResourceId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "resourceId")] + public string ResourceId {get; set; } /// /// Gets or sets the client ID of the user assigned identity. /// - [JsonProperty(PropertyName = "clientId")] - public string ClientId { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "clientId")] + public string ClientId {get; set; } /// /// Gets or sets the object ID of the user assigned identity. /// - [JsonProperty(PropertyName = "objectId")] - public string ObjectId { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "objectId")] + public string ObjectId {get; set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/WeekDay.cs b/src/Aks/Aks.Sdk/Generated/Models/WeekDay.cs index e0238baf2122..ec0200c173ba 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/WeekDay.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/WeekDay.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.ContainerService.Models /// /// Defines values for WeekDay. /// + + public static class WeekDay { public const string Sunday = "Sunday"; @@ -24,4 +21,4 @@ public static class WeekDay public const string Friday = "Friday"; public const string Saturday = "Saturday"; } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/WindowsGmsaProfile.cs b/src/Aks/Aks.Sdk/Generated/Models/WindowsGmsaProfile.cs index 23899966abbd..85cd437e2f13 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/WindowsGmsaProfile.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/WindowsGmsaProfile.cs @@ -1,16 +1,10 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { - using Newtonsoft.Json; using System.Linq; /// @@ -29,20 +23,25 @@ public WindowsGmsaProfile() /// /// Initializes a new instance of the WindowsGmsaProfile class. /// - /// Whether to enable Windows gMSA. - /// Specifies the DNS server for Windows gMSA. - /// <br><br> Set it to empty if you have configured the DNS - /// server in the vnet which is used to create the managed - /// cluster. - /// Specifies the root domain name for - /// Windows gMSA. <br><br> Set it to empty if you have - /// configured the DNS server in the vnet which is used to create the - /// managed cluster. + + /// Specifies whether to enable Windows gMSA in the managed cluster. + /// + + /// Specifies the DNS server for Windows gMSA. <br><br> Set it to empty if you + /// have configured the DNS server in the vnet which is used to create the + /// managed cluster. + /// + + /// Specifies the root domain name for Windows gMSA. <br><br> Set it to empty + /// if you have configured the DNS server in the vnet which is used to create + /// the managed cluster. + /// public WindowsGmsaProfile(bool? enabled = default(bool?), string dnsServer = default(string), string rootDomainName = default(string)) + { - Enabled = enabled; - DnsServer = dnsServer; - RootDomainName = rootDomainName; + this.Enabled = enabled; + this.DnsServer = dnsServer; + this.RootDomainName = rootDomainName; CustomInit(); } @@ -51,32 +50,28 @@ public WindowsGmsaProfile() /// partial void CustomInit(); + /// - /// Gets or sets whether to enable Windows gMSA. + /// Gets or sets specifies whether to enable Windows gMSA in the managed + /// cluster. /// - /// - /// Specifies whether to enable Windows gMSA in the managed cluster. - /// - [JsonProperty(PropertyName = "enabled")] - public bool? Enabled { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "enabled")] + public bool? Enabled {get; set; } /// - /// Gets or sets specifies the DNS server for Windows gMSA. - /// &lt;br&gt;&lt;br&gt; Set it to empty if you have - /// configured the DNS server in the vnet which is used to create the - /// managed cluster. + /// Gets or sets specifies the DNS server for Windows gMSA. <br><br> Set it to + /// empty if you have configured the DNS server in the vnet which is used to + /// create the managed cluster. /// - [JsonProperty(PropertyName = "dnsServer")] - public string DnsServer { get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "dnsServer")] + public string DnsServer {get; set; } /// - /// Gets or sets specifies the root domain name for Windows gMSA. - /// &lt;br&gt;&lt;br&gt; Set it to empty if you have - /// configured the DNS server in the vnet which is used to create the - /// managed cluster. + /// Gets or sets specifies the root domain name for Windows gMSA. <br><br> Set + /// it to empty if you have configured the DNS server in the vnet which is used + /// to create the managed cluster. /// - [JsonProperty(PropertyName = "rootDomainName")] - public string RootDomainName { get; set; } - + [Newtonsoft.Json.JsonProperty(PropertyName = "rootDomainName")] + public string RootDomainName {get; set; } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Models/WorkloadRuntime.cs b/src/Aks/Aks.Sdk/Generated/Models/WorkloadRuntime.cs index c8419098fc8a..3fd0aab7ffa1 100644 --- a/src/Aks/Aks.Sdk/Generated/Models/WorkloadRuntime.cs +++ b/src/Aks/Aks.Sdk/Generated/Models/WorkloadRuntime.cs @@ -1,12 +1,7 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService.Models { @@ -14,6 +9,8 @@ namespace Microsoft.Azure.Management.ContainerService.Models /// /// Defines values for WorkloadRuntime. /// + + public static class WorkloadRuntime { /// @@ -21,9 +18,8 @@ public static class WorkloadRuntime /// public const string OCIContainer = "OCIContainer"; /// - /// Nodes will use Krustlet to run WASM workloads using the WASI - /// provider (Preview). + /// Nodes will use Krustlet to run WASM workloads using the WASI provider (Preview). /// public const string WasmWasi = "WasmWasi"; } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/Operations.cs b/src/Aks/Aks.Sdk/Generated/Operations.cs index 98084090f587..0ea637098a96 100644 --- a/src/Aks/Aks.Sdk/Generated/Operations.cs +++ b/src/Aks/Aks.Sdk/Generated/Operations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// Operations operations. /// - internal partial class Operations : IServiceOperations, IOperations + internal partial class Operations : Microsoft.Rest.IServiceOperations, IOperations { /// /// Initializes a new instance of the Operations class. @@ -36,13 +24,13 @@ internal partial class Operations : IServiceOperations, /// /// Thrown when a required parameter is null /// - internal Operations(ContainerServiceClient client) + internal Operations (ContainerServiceClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -59,13 +47,13 @@ internal Operations(ContainerServiceClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -74,61 +62,62 @@ internal Operations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) + + + + + if (this.Client.ApiVersion == null) { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.ContainerService/operations").ToString(); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -140,55 +129,56 @@ internal Operations(ContainerServiceClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -198,9 +188,10 @@ internal Operations(ContainerServiceClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -211,24 +202,28 @@ internal Operations(ContainerServiceClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/OperationsExtensions.cs b/src/Aks/Aks.Sdk/Generated/OperationsExtensions.cs index 96f13e6718f6..56b480b303db 100644 --- a/src/Aks/Aks.Sdk/Generated/OperationsExtensions.cs +++ b/src/Aks/Aks.Sdk/Generated/OperationsExtensions.cs @@ -1,55 +1,43 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for Operations. + /// Extension methods for Operations /// public static partial class OperationsExtensions { - /// - /// Gets a list of operations. - /// - /// - /// The operations group for this extension method. - /// - public static IEnumerable List(this IOperations operations) - { - return operations.ListAsync().GetAwaiter().GetResult(); - } + /// + /// Gets a list of operations. + /// + /// + /// The operations group for this extension method. + /// + public static System.Collections.Generic.IEnumerable List(this IOperations operations) + { + return ((IOperations)operations).ListAsync().GetAwaiter().GetResult(); + } - /// - /// Gets a list of operations. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IOperations operations, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Gets a list of operations. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this IOperations operations, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } - + } } } diff --git a/src/Aks/Aks.Sdk/Generated/PrivateEndpointConnectionsOperations.cs b/src/Aks/Aks.Sdk/Generated/PrivateEndpointConnectionsOperations.cs index 5827ac0a80ff..b404cf555f98 100644 --- a/src/Aks/Aks.Sdk/Generated/PrivateEndpointConnectionsOperations.cs +++ b/src/Aks/Aks.Sdk/Generated/PrivateEndpointConnectionsOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// PrivateEndpointConnectionsOperations operations. /// - internal partial class PrivateEndpointConnectionsOperations : IServiceOperations, IPrivateEndpointConnectionsOperations + internal partial class PrivateEndpointConnectionsOperations : Microsoft.Rest.IServiceOperations, IPrivateEndpointConnectionsOperations { /// /// Initializes a new instance of the PrivateEndpointConnectionsOperations class. @@ -36,13 +24,13 @@ internal partial class PrivateEndpointConnectionsOperations : IServiceOperations /// /// Thrown when a required parameter is null /// - internal PrivateEndpointConnectionsOperations(ContainerServiceClient client) + internal PrivateEndpointConnectionsOperations (ContainerServiceClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -51,13 +39,8 @@ internal PrivateEndpointConnectionsOperations(ContainerServiceClient client) public ContainerServiceClient Client { get; private set; } /// - /// Gets a list of private endpoint connections in the specified managed - /// cluster. + /// To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters /// - /// - /// To learn more about private clusters, see: - /// https://docs.microsoft.com/azure/aks/private-clusters - /// /// /// The name of the resource group. The name is case insensitive. /// @@ -70,13 +53,13 @@ internal PrivateEndpointConnectionsOperations(ContainerServiceClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -85,111 +68,112 @@ internal PrivateEndpointConnectionsOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - public async Task> ListWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> ListWithHttpMessagesAsync(string resourceGroupName, string resourceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } - } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.SubscriptionId != null) + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } if (resourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceName"); } if (resourceName != null) { if (resourceName.Length > 63) { - throw new ValidationException(ValidationRules.MaxLength, "resourceName", 63); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceName", 63); } if (resourceName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceName, "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -201,55 +185,56 @@ internal PrivateEndpointConnectionsOperations(ContainerServiceClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -259,9 +244,10 @@ internal PrivateEndpointConnectionsOperations(ContainerServiceClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -272,32 +258,32 @@ internal PrivateEndpointConnectionsOperations(ContainerServiceClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// - /// Gets the specified private endpoint connection. + /// To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters /// - /// - /// To learn more about private clusters, see: - /// https://docs.microsoft.com/azure/aks/private-clusters - /// /// /// The name of the resource group. The name is case insensitive. /// @@ -313,13 +299,13 @@ internal PrivateEndpointConnectionsOperations(ContainerServiceClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -328,117 +314,119 @@ internal PrivateEndpointConnectionsOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string resourceName, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string resourceName, string privateEndpointConnectionName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) + + + + + if (this.Client.ApiVersion == null) { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.SubscriptionId != null) + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } if (resourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceName"); } if (resourceName != null) { if (resourceName.Length > 63) { - throw new ValidationException(ValidationRules.MaxLength, "resourceName", 63); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceName", 63); } if (resourceName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceName, "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } if (privateEndpointConnectionName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "privateEndpointConnectionName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); tracingParameters.Add("privateEndpointConnectionName", privateEndpointConnectionName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); _url = _url.Replace("{privateEndpointConnectionName}", System.Uri.EscapeDataString(privateEndpointConnectionName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -450,55 +438,56 @@ internal PrivateEndpointConnectionsOperations(ContainerServiceClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -508,9 +497,10 @@ internal PrivateEndpointConnectionsOperations(ContainerServiceClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -521,25 +511,29 @@ internal PrivateEndpointConnectionsOperations(ContainerServiceClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Updates a private endpoint connection. /// @@ -561,13 +555,13 @@ internal PrivateEndpointConnectionsOperations(ContainerServiceClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -576,126 +570,125 @@ internal PrivateEndpointConnectionsOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, string privateEndpointConnectionName, PrivateEndpointConnection parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, string privateEndpointConnectionName, PrivateEndpointConnection parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (parameters == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); } - if (Client.ApiVersion != null) + + if (this.Client.ApiVersion == null) { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.SubscriptionId != null) + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } if (resourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceName"); } if (resourceName != null) { if (resourceName.Length > 63) { - throw new ValidationException(ValidationRules.MaxLength, "resourceName", 63); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceName", 63); } if (resourceName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceName, "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } if (privateEndpointConnectionName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName"); - } - if (parameters == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); - } - if (parameters != null) - { - parameters.Validate(); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "privateEndpointConnectionName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); tracingParameters.Add("privateEndpointConnectionName", privateEndpointConnectionName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); _url = _url.Replace("{privateEndpointConnectionName}", System.Uri.EscapeDataString(privateEndpointConnectionName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PUT"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -707,61 +700,62 @@ internal PrivateEndpointConnectionsOperations(ContainerServiceClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(parameters != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -771,9 +765,10 @@ internal PrivateEndpointConnectionsOperations(ContainerServiceClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -784,25 +779,29 @@ internal PrivateEndpointConnectionsOperations(ContainerServiceClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Deletes a private endpoint connection. /// @@ -816,16 +815,16 @@ internal PrivateEndpointConnectionsOperations(ContainerServiceClient client) /// The name of the private endpoint connection. /// /// - /// The headers that will be added to request. + /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, string privateEndpointConnectionName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send request - AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, resourceName, privateEndpointConnectionName, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, resourceName, privateEndpointConnectionName, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// @@ -846,10 +845,10 @@ internal PrivateEndpointConnectionsOperations(ContainerServiceClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -858,117 +857,119 @@ internal PrivateEndpointConnectionsOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - public async Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, string privateEndpointConnectionName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) + + + + + if (this.Client.ApiVersion == null) { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.SubscriptionId != null) + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } if (resourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceName"); } if (resourceName != null) { if (resourceName.Length > 63) { - throw new ValidationException(ValidationRules.MaxLength, "resourceName", 63); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceName", 63); } if (resourceName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceName, "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } if (privateEndpointConnectionName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "privateEndpointConnectionName"); } + // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); tracingParameters.Add("privateEndpointConnectionName", privateEndpointConnectionName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); _url = _url.Replace("{privateEndpointConnectionName}", System.Uri.EscapeDataString(privateEndpointConnectionName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("DELETE"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -980,55 +981,56 @@ internal PrivateEndpointConnectionsOperations(ContainerServiceClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 204) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1038,19 +1040,24 @@ internal PrivateEndpointConnectionsOperations(ContainerServiceClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/PrivateEndpointConnectionsOperationsExtensions.cs b/src/Aks/Aks.Sdk/Generated/PrivateEndpointConnectionsOperationsExtensions.cs index 3874f4627f83..e004ac9f2e06 100644 --- a/src/Aks/Aks.Sdk/Generated/PrivateEndpointConnectionsOperationsExtensions.cs +++ b/src/Aks/Aks.Sdk/Generated/PrivateEndpointConnectionsOperationsExtensions.cs @@ -1,267 +1,229 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for PrivateEndpointConnectionsOperations. + /// Extension methods for PrivateEndpointConnectionsOperations /// public static partial class PrivateEndpointConnectionsOperationsExtensions { - /// - /// Gets a list of private endpoint connections in the specified managed - /// cluster. - /// - /// - /// To learn more about private clusters, see: - /// https://docs.microsoft.com/azure/aks/private-clusters - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - public static PrivateEndpointConnectionListResult List(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string resourceName) - { - return operations.ListAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); - } - - /// - /// Gets a list of private endpoint connections in the specified managed - /// cluster. - /// - /// - /// To learn more about private clusters, see: - /// https://docs.microsoft.com/azure/aks/private-clusters - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The cancellation token. - /// - public static async Task ListAsync(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the specified private endpoint connection. - /// - /// - /// To learn more about private clusters, see: - /// https://docs.microsoft.com/azure/aks/private-clusters - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The name of the private endpoint connection. - /// - public static PrivateEndpointConnection Get(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string resourceName, string privateEndpointConnectionName) - { - return operations.GetAsync(resourceGroupName, resourceName, privateEndpointConnectionName).GetAwaiter().GetResult(); - } - - /// - /// Gets the specified private endpoint connection. - /// - /// - /// To learn more about private clusters, see: - /// https://docs.microsoft.com/azure/aks/private-clusters - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The name of the private endpoint connection. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string resourceName, string privateEndpointConnectionName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, resourceName, privateEndpointConnectionName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Updates a private endpoint connection. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The name of the private endpoint connection. - /// - /// - /// The updated private endpoint connection. - /// - public static PrivateEndpointConnection Update(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string resourceName, string privateEndpointConnectionName, PrivateEndpointConnection parameters) - { - return operations.UpdateAsync(resourceGroupName, resourceName, privateEndpointConnectionName, parameters).GetAwaiter().GetResult(); - } + /// + /// To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + public static PrivateEndpointConnectionListResult List(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string resourceName) + { + return ((IPrivateEndpointConnectionsOperations)operations).ListAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); + } - /// - /// Updates a private endpoint connection. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The name of the private endpoint connection. - /// - /// - /// The updated private endpoint connection. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateAsync(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string resourceName, string privateEndpointConnectionName, PrivateEndpointConnection parameters, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task ListAsync(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string resourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, resourceName, privateEndpointConnectionName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the private endpoint connection. + /// + public static PrivateEndpointConnection Get(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string resourceName, string privateEndpointConnectionName) + { + return ((IPrivateEndpointConnectionsOperations)operations).GetAsync(resourceGroupName, resourceName, privateEndpointConnectionName).GetAwaiter().GetResult(); + } - /// - /// Deletes a private endpoint connection. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The name of the private endpoint connection. - /// - public static void Delete(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string resourceName, string privateEndpointConnectionName) + /// + /// To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the private endpoint connection. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string resourceName, string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, resourceName, privateEndpointConnectionName, null, cancellationToken).ConfigureAwait(false)) { - operations.DeleteAsync(resourceGroupName, resourceName, privateEndpointConnectionName).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// Updates a private endpoint connection. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the private endpoint connection. + /// + public static PrivateEndpointConnection Update(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string resourceName, string privateEndpointConnectionName, PrivateEndpointConnection parameters) + { + return ((IPrivateEndpointConnectionsOperations)operations).UpdateAsync(resourceGroupName, resourceName, privateEndpointConnectionName, parameters).GetAwaiter().GetResult(); + } - /// - /// Deletes a private endpoint connection. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The name of the private endpoint connection. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteAsync(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string resourceName, string privateEndpointConnectionName, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Updates a private endpoint connection. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the private endpoint connection. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task UpdateAsync(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string resourceName, string privateEndpointConnectionName, PrivateEndpointConnection parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, resourceName, privateEndpointConnectionName, parameters, null, cancellationToken).ConfigureAwait(false)) { - (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, resourceName, privateEndpointConnectionName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + return _result.Body; } + } + /// + /// Deletes a private endpoint connection. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the private endpoint connection. + /// + public static void Delete(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string resourceName, string privateEndpointConnectionName) + { + ((IPrivateEndpointConnectionsOperations)operations).DeleteAsync(resourceGroupName, resourceName, privateEndpointConnectionName).GetAwaiter().GetResult(); + } - /// - /// Deletes a private endpoint connection. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The name of the private endpoint connection. - /// - public static void BeginDelete(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string resourceName, string privateEndpointConnectionName) - { - operations.BeginDeleteAsync(resourceGroupName, resourceName, privateEndpointConnectionName).GetAwaiter().GetResult(); - } - - /// - /// Deletes a private endpoint connection. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The name of the private endpoint connection. - /// - /// - /// The cancellation token. - /// - public static async Task BeginDeleteAsync(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string resourceName, string privateEndpointConnectionName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, resourceName, privateEndpointConnectionName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } + /// + /// Deletes a private endpoint connection. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the private endpoint connection. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task DeleteAsync(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string resourceName, string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, resourceName, privateEndpointConnectionName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Deletes a private endpoint connection. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the private endpoint connection. + /// + public static void BeginDelete(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string resourceName, string privateEndpointConnectionName) + { + ((IPrivateEndpointConnectionsOperations)operations).BeginDeleteAsync(resourceGroupName, resourceName, privateEndpointConnectionName).GetAwaiter().GetResult(); + } + /// + /// Deletes a private endpoint connection. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the private endpoint connection. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginDeleteAsync(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string resourceName, string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, resourceName, privateEndpointConnectionName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } } } diff --git a/src/Aks/Aks.Sdk/Generated/PrivateLinkResourcesOperations.cs b/src/Aks/Aks.Sdk/Generated/PrivateLinkResourcesOperations.cs index 7f586159efc0..813efc93ed48 100644 --- a/src/Aks/Aks.Sdk/Generated/PrivateLinkResourcesOperations.cs +++ b/src/Aks/Aks.Sdk/Generated/PrivateLinkResourcesOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// PrivateLinkResourcesOperations operations. /// - internal partial class PrivateLinkResourcesOperations : IServiceOperations, IPrivateLinkResourcesOperations + internal partial class PrivateLinkResourcesOperations : Microsoft.Rest.IServiceOperations, IPrivateLinkResourcesOperations { /// /// Initializes a new instance of the PrivateLinkResourcesOperations class. @@ -36,13 +24,13 @@ internal partial class PrivateLinkResourcesOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal PrivateLinkResourcesOperations(ContainerServiceClient client) + internal PrivateLinkResourcesOperations (ContainerServiceClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -51,12 +39,8 @@ internal PrivateLinkResourcesOperations(ContainerServiceClient client) public ContainerServiceClient Client { get; private set; } /// - /// Gets a list of private link resources in the specified managed cluster. + /// To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters /// - /// - /// To learn more about private clusters, see: - /// https://docs.microsoft.com/azure/aks/private-clusters - /// /// /// The name of the resource group. The name is case insensitive. /// @@ -69,13 +53,13 @@ internal PrivateLinkResourcesOperations(ContainerServiceClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -84,111 +68,112 @@ internal PrivateLinkResourcesOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - public async Task> ListWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> ListWithHttpMessagesAsync(string resourceGroupName, string resourceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) + + + + + if (this.Client.ApiVersion == null) { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.SubscriptionId != null) + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } if (resourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceName"); } if (resourceName != null) { if (resourceName.Length > 63) { - throw new ValidationException(ValidationRules.MaxLength, "resourceName", 63); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceName", 63); } if (resourceName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceName, "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateLinkResources").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -200,55 +185,56 @@ internal PrivateLinkResourcesOperations(ContainerServiceClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -258,9 +244,10 @@ internal PrivateLinkResourcesOperations(ContainerServiceClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -271,24 +258,28 @@ internal PrivateLinkResourcesOperations(ContainerServiceClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/PrivateLinkResourcesOperationsExtensions.cs b/src/Aks/Aks.Sdk/Generated/PrivateLinkResourcesOperationsExtensions.cs index 5e310e534e7b..1b56219a23e5 100644 --- a/src/Aks/Aks.Sdk/Generated/PrivateLinkResourcesOperationsExtensions.cs +++ b/src/Aks/Aks.Sdk/Generated/PrivateLinkResourcesOperationsExtensions.cs @@ -1,73 +1,55 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for PrivateLinkResourcesOperations. + /// Extension methods for PrivateLinkResourcesOperations /// public static partial class PrivateLinkResourcesOperationsExtensions { - /// - /// Gets a list of private link resources in the specified managed cluster. - /// - /// - /// To learn more about private clusters, see: - /// https://docs.microsoft.com/azure/aks/private-clusters - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - public static PrivateLinkResourcesListResult List(this IPrivateLinkResourcesOperations operations, string resourceGroupName, string resourceName) - { - return operations.ListAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); - } + /// + /// To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + public static PrivateLinkResourcesListResult List(this IPrivateLinkResourcesOperations operations, string resourceGroupName, string resourceName) + { + return ((IPrivateLinkResourcesOperations)operations).ListAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); + } - /// - /// Gets a list of private link resources in the specified managed cluster. - /// - /// - /// To learn more about private clusters, see: - /// https://docs.microsoft.com/azure/aks/private-clusters - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The cancellation token. - /// - public static async Task ListAsync(this IPrivateLinkResourcesOperations operations, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task ListAsync(this IPrivateLinkResourcesOperations operations, string resourceGroupName, string resourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } - + } } } diff --git a/src/Aks/Aks.Sdk/Generated/ResolvePrivateLinkServiceIdOperations.cs b/src/Aks/Aks.Sdk/Generated/ResolvePrivateLinkServiceIdOperations.cs index fbcbc24d329a..bd503d2d80dc 100644 --- a/src/Aks/Aks.Sdk/Generated/ResolvePrivateLinkServiceIdOperations.cs +++ b/src/Aks/Aks.Sdk/Generated/ResolvePrivateLinkServiceIdOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// ResolvePrivateLinkServiceIdOperations operations. /// - internal partial class ResolvePrivateLinkServiceIdOperations : IServiceOperations, IResolvePrivateLinkServiceIdOperations + internal partial class ResolvePrivateLinkServiceIdOperations : Microsoft.Rest.IServiceOperations, IResolvePrivateLinkServiceIdOperations { /// /// Initializes a new instance of the ResolvePrivateLinkServiceIdOperations class. @@ -36,13 +24,13 @@ internal partial class ResolvePrivateLinkServiceIdOperations : IServiceOperation /// /// Thrown when a required parameter is null /// - internal ResolvePrivateLinkServiceIdOperations(ContainerServiceClient client) + internal ResolvePrivateLinkServiceIdOperations (ContainerServiceClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -68,13 +56,13 @@ internal ResolvePrivateLinkServiceIdOperations(ContainerServiceClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -83,116 +71,118 @@ internal ResolvePrivateLinkServiceIdOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - public async Task> POSTWithHttpMessagesAsync(string resourceGroupName, string resourceName, PrivateLinkResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> PostWithHttpMessagesAsync(string resourceGroupName, string resourceName, PrivateLinkResource parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (parameters == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); } - if (Client.ApiVersion != null) + + if (this.Client.ApiVersion == null) { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.SubscriptionId != null) + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } if (resourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceName"); } if (resourceName != null) { if (resourceName.Length > 63) { - throw new ValidationException(ValidationRules.MaxLength, "resourceName", 63); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceName", 63); } if (resourceName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceName, "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } - if (parameters == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); - } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "POST", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Post", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resolvePrivateLinkServiceId").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -204,61 +194,62 @@ internal ResolvePrivateLinkServiceIdOperations(ContainerServiceClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(parameters != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -268,9 +259,10 @@ internal ResolvePrivateLinkServiceIdOperations(ContainerServiceClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -281,24 +273,28 @@ internal ResolvePrivateLinkServiceIdOperations(ContainerServiceClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/ResolvePrivateLinkServiceIdOperationsExtensions.cs b/src/Aks/Aks.Sdk/Generated/ResolvePrivateLinkServiceIdOperationsExtensions.cs index 9943e4a69b79..fc3dff02a2c7 100644 --- a/src/Aks/Aks.Sdk/Generated/ResolvePrivateLinkServiceIdOperationsExtensions.cs +++ b/src/Aks/Aks.Sdk/Generated/ResolvePrivateLinkServiceIdOperationsExtensions.cs @@ -1,71 +1,55 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for ResolvePrivateLinkServiceIdOperations. + /// Extension methods for ResolvePrivateLinkServiceIdOperations /// public static partial class ResolvePrivateLinkServiceIdOperationsExtensions { - /// - /// Gets the private link service ID for the specified managed cluster. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// Parameters required in order to resolve a private link service ID. - /// - public static PrivateLinkResource POST(this IResolvePrivateLinkServiceIdOperations operations, string resourceGroupName, string resourceName, PrivateLinkResource parameters) - { - return operations.POSTAsync(resourceGroupName, resourceName, parameters).GetAwaiter().GetResult(); - } + /// + /// Gets the private link service ID for the specified managed cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + public static PrivateLinkResource Post(this IResolvePrivateLinkServiceIdOperations operations, string resourceGroupName, string resourceName, PrivateLinkResource parameters) + { + return ((IResolvePrivateLinkServiceIdOperations)operations).PostAsync(resourceGroupName, resourceName, parameters).GetAwaiter().GetResult(); + } - /// - /// Gets the private link service ID for the specified managed cluster. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// Parameters required in order to resolve a private link service ID. - /// - /// - /// The cancellation token. - /// - public static async Task POSTAsync(this IResolvePrivateLinkServiceIdOperations operations, string resourceGroupName, string resourceName, PrivateLinkResource parameters, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Gets the private link service ID for the specified managed cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task PostAsync(this IResolvePrivateLinkServiceIdOperations operations, string resourceGroupName, string resourceName, PrivateLinkResource parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.PostWithHttpMessagesAsync(resourceGroupName, resourceName, parameters, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.POSTWithHttpMessagesAsync(resourceGroupName, resourceName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } - + } } } diff --git a/src/Aks/Aks.Sdk/Generated/SnapshotsOperations.cs b/src/Aks/Aks.Sdk/Generated/SnapshotsOperations.cs index 6d53de7c9943..cda2c8be96fb 100644 --- a/src/Aks/Aks.Sdk/Generated/SnapshotsOperations.cs +++ b/src/Aks/Aks.Sdk/Generated/SnapshotsOperations.cs @@ -1,31 +1,19 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService { + using System.Linq; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; /// /// SnapshotsOperations operations. /// - internal partial class SnapshotsOperations : IServiceOperations, ISnapshotsOperations + internal partial class SnapshotsOperations : Microsoft.Rest.IServiceOperations, ISnapshotsOperations { /// /// Initializes a new instance of the SnapshotsOperations class. @@ -36,13 +24,13 @@ internal partial class SnapshotsOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal SnapshotsOperations(ContainerServiceClient client) + internal SnapshotsOperations (ContainerServiceClient client) { - if (client == null) + if (client == null) { throw new System.ArgumentNullException("client"); } - Client = client; + this.Client = client; } /// @@ -59,13 +47,13 @@ internal SnapshotsOperations(ContainerServiceClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -74,73 +62,74 @@ internal SnapshotsOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) + + + + + if (this.Client.ApiVersion == null) { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.SubscriptionId != null) + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/snapshots").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -152,55 +141,56 @@ internal SnapshotsOperations(ContainerServiceClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -210,9 +200,10 @@ internal SnapshotsOperations(ContainerServiceClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -223,25 +214,29 @@ internal SnapshotsOperations(ContainerServiceClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Lists snapshots in the specified subscription and resource group. /// @@ -254,13 +249,13 @@ internal SnapshotsOperations(ContainerServiceClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -269,90 +264,91 @@ internal SnapshotsOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) + + + + + if (this.Client.ApiVersion == null) { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.SubscriptionId != null) + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroup", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroup", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -364,55 +360,56 @@ internal SnapshotsOperations(ContainerServiceClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -422,9 +419,10 @@ internal SnapshotsOperations(ContainerServiceClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -435,25 +433,29 @@ internal SnapshotsOperations(ContainerServiceClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Gets a snapshot. /// @@ -469,13 +471,13 @@ internal SnapshotsOperations(ContainerServiceClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -484,111 +486,112 @@ internal SnapshotsOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string resourceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) + + + + + if (this.Client.ApiVersion == null) { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.SubscriptionId != null) + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } if (resourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceName"); } if (resourceName != null) { if (resourceName.Length > 63) { - throw new ValidationException(ValidationRules.MaxLength, "resourceName", 63); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceName", 63); } if (resourceName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceName, "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -600,55 +603,56 @@ internal SnapshotsOperations(ContainerServiceClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -658,9 +662,10 @@ internal SnapshotsOperations(ContainerServiceClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -671,25 +676,29 @@ internal SnapshotsOperations(ContainerServiceClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Creates or updates a snapshot. /// @@ -708,13 +717,13 @@ internal SnapshotsOperations(ContainerServiceClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -723,120 +732,121 @@ internal SnapshotsOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, Snapshot parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, Snapshot parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (parameters == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); } - if (Client.ApiVersion != null) + if (parameters != null) { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + parameters.Validate(); } - if (Client.SubscriptionId == null) + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId != null) + + if (this.Client.SubscriptionId == null) { - if (Client.SubscriptionId.Length < 1) + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (this.Client.SubscriptionId != null) + { + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } if (resourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceName"); } if (resourceName != null) { if (resourceName.Length > 63) { - throw new ValidationException(ValidationRules.MaxLength, "resourceName", 63); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceName", 63); } if (resourceName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceName, "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } - if (parameters == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); - } - if (parameters != null) - { - parameters.Validate(); - } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PUT"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -848,61 +858,62 @@ internal SnapshotsOperations(ContainerServiceClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(parameters != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 201) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -912,9 +923,10 @@ internal SnapshotsOperations(ContainerServiceClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -925,16 +937,16 @@ internal SnapshotsOperations(ContainerServiceClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } // Deserialize Response @@ -943,25 +955,29 @@ internal SnapshotsOperations(ContainerServiceClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Updates tags on a snapshot. /// @@ -980,13 +996,13 @@ internal SnapshotsOperations(ContainerServiceClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -995,117 +1011,118 @@ internal SnapshotsOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - public async Task> UpdateTagsWithHttpMessagesAsync(string resourceGroupName, string resourceName, IDictionary tags = default(IDictionary), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task> UpdateTagsWithHttpMessagesAsync(string resourceGroupName, string resourceName, System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ApiVersion != null) + + + + + if (this.Client.ApiVersion == null) { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.SubscriptionId != null) + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } if (resourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceName"); } if (resourceName != null) { if (resourceName.Length > 63) { - throw new ValidationException(ValidationRules.MaxLength, "resourceName", 63); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceName", 63); } if (resourceName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceName, "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } TagsObject parameters = new TagsObject(); - if (tags != null) + if(tags != null) { parameters.Tags = tags; } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateTags", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "UpdateTags", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PATCH"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PATCH"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1117,61 +1134,62 @@ internal SnapshotsOperations(ContainerServiceClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; if(parameters != null) { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); } // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1181,9 +1199,10 @@ internal SnapshotsOperations(ContainerServiceClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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(); @@ -1194,25 +1213,29 @@ internal SnapshotsOperations(ContainerServiceClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Deletes a snapshot. /// @@ -1228,10 +1251,10 @@ internal SnapshotsOperations(ContainerServiceClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -1240,111 +1263,112 @@ internal SnapshotsOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (Client.ApiVersion == null) + + + + + if (this.Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (Client.ApiVersion != null) - { - if (Client.ApiVersion.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); - } - } - if (Client.SubscriptionId == null) + + if (this.Client.SubscriptionId == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (Client.SubscriptionId != null) + if (this.Client.SubscriptionId != null) { - if (Client.SubscriptionId.Length < 1) + if (this.Client.SubscriptionId.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } if (resourceGroupName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { if (resourceGroupName.Length > 90) { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); } if (resourceGroupName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } if (resourceName == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceName"); } if (resourceName != null) { if (resourceName.Length > 63) { - throw new ValidationException(ValidationRules.MaxLength, "resourceName", 63); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceName", 63); } if (resourceName.Length < 1) { - throw new ValidationException(ValidationRules.MinLength, "resourceName", 1); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceName", 1); } if (!System.Text.RegularExpressions.Regex.IsMatch(resourceName, "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$")) { - throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); + + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); } // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (this.Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(this.Client.ApiVersion))); } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("DELETE"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1356,55 +1380,56 @@ internal SnapshotsOperations(ContainerServiceClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 204) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1414,20 +1439,25 @@ internal SnapshotsOperations(ContainerServiceClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.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); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Gets a list of snapshots in the specified subscription. /// @@ -1440,13 +1470,13 @@ internal SnapshotsOperations(ContainerServiceClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -1455,51 +1485,53 @@ internal SnapshotsOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1511,55 +1543,56 @@ internal SnapshotsOperations(ContainerServiceClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1569,9 +1602,10 @@ internal SnapshotsOperations(ContainerServiceClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -1582,25 +1616,29 @@ internal SnapshotsOperations(ContainerServiceClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } /// /// Lists snapshots in the specified subscription and resource group. /// @@ -1613,13 +1651,13 @@ internal SnapshotsOperations(ContainerServiceClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// - /// + /// /// Thrown when unable to deserialize the response /// - /// + /// /// Thrown when a required parameter is null /// /// @@ -1628,51 +1666,53 @@ internal SnapshotsOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async System.Threading.Tasks.Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (nextPageLink == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; if (_shouldTrace) { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroupNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroupNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); } // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) { _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); } - if (Client.AcceptLanguage != null) + if (this.Client.AcceptLanguage != null) { if (_httpRequest.Headers.Contains("accept-language")) { _httpRequest.Headers.Remove("accept-language"); } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); } - if (customHeaders != null) { foreach(var _header in customHeaders) @@ -1684,55 +1724,56 @@ internal SnapshotsOperations(ContainerServiceClient client) _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); } } - // Serialize Request string _requestContent = null; // Set Credentials - if (Client.Credentials != null) + if (this.Client.Credentials != null) { cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); } // Send Request if (_shouldTrace) { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); } cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); if (_shouldTrace) { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); } - HttpStatusCode _statusCode = _httpResponse.StatusCode; + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; + if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } - catch (JsonException) + catch (Newtonsoft.Json.JsonException) { // Ignore the exception } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); if (_httpResponse.Headers.Contains("x-ms-request-id")) { ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } if (_shouldTrace) { - ServiceClientTracing.Error(_invocationId, ex); + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); } _httpRequest.Dispose(); if (_httpResponse != null) @@ -1742,9 +1783,10 @@ internal SnapshotsOperations(ContainerServiceClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.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(); @@ -1755,24 +1797,28 @@ internal SnapshotsOperations(ContainerServiceClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } - catch (JsonException ex) + catch (Newtonsoft.Json.JsonException ex) { _httpRequest.Dispose(); if (_httpResponse != null) { _httpResponse.Dispose(); } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } if (_shouldTrace) { - ServiceClientTracing.Exit(_invocationId, _result); + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); } return _result; - } + + + + + } } -} +} \ No newline at end of file diff --git a/src/Aks/Aks.Sdk/Generated/SnapshotsOperationsExtensions.cs b/src/Aks/Aks.Sdk/Generated/SnapshotsOperationsExtensions.cs index 1d39909d96cc..529abf6c63e2 100644 --- a/src/Aks/Aks.Sdk/Generated/SnapshotsOperationsExtensions.cs +++ b/src/Aks/Aks.Sdk/Generated/SnapshotsOperationsExtensions.cs @@ -1,326 +1,295 @@ -// // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// +// Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - +// Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.Management.ContainerService { - using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; /// - /// Extension methods for SnapshotsOperations. + /// Extension methods for SnapshotsOperations /// public static partial class SnapshotsOperationsExtensions { - /// - /// Gets a list of snapshots in the specified subscription. - /// - /// - /// The operations group for this extension method. - /// - public static IPage List(this ISnapshotsOperations operations) - { - return operations.ListAsync().GetAwaiter().GetResult(); - } - - /// - /// Gets a list of snapshots in the specified subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this ISnapshotsOperations operations, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Lists snapshots in the specified subscription and resource group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - public static IPage ListByResourceGroup(this ISnapshotsOperations operations, string resourceGroupName) - { - return operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult(); - } + /// + /// Gets a list of snapshots in the specified subscription. + /// + /// + /// The operations group for this extension method. + /// + public static Microsoft.Rest.Azure.IPage List(this ISnapshotsOperations operations) + { + return ((ISnapshotsOperations)operations).ListAsync().GetAwaiter().GetResult(); + } - /// - /// Lists snapshots in the specified subscription and resource group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The cancellation token. - /// - public static async Task> ListByResourceGroupAsync(this ISnapshotsOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Gets a list of snapshots in the specified subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this ISnapshotsOperations operations, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// Lists snapshots in the specified subscription and resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + public static Microsoft.Rest.Azure.IPage ListByResourceGroup(this ISnapshotsOperations operations, string resourceGroupName) + { + return ((ISnapshotsOperations)operations).ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult(); + } - /// - /// Gets a snapshot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - public static Snapshot Get(this ISnapshotsOperations operations, string resourceGroupName, string resourceName) + /// + /// Lists snapshots in the specified subscription and resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListByResourceGroupAsync(this ISnapshotsOperations operations, string resourceGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false)) { - return operations.GetAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// Gets a snapshot. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + public static Snapshot Get(this ISnapshotsOperations operations, string resourceGroupName, string resourceName) + { + return ((ISnapshotsOperations)operations).GetAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); + } - /// - /// Gets a snapshot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this ISnapshotsOperations operations, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Gets a snapshot. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this ISnapshotsOperations operations, string resourceGroupName, string resourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// Creates or updates a snapshot. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + public static Snapshot CreateOrUpdate(this ISnapshotsOperations operations, string resourceGroupName, string resourceName, Snapshot parameters) + { + return ((ISnapshotsOperations)operations).CreateOrUpdateAsync(resourceGroupName, resourceName, parameters).GetAwaiter().GetResult(); + } - /// - /// Creates or updates a snapshot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The snapshot to create or update. - /// - public static Snapshot CreateOrUpdate(this ISnapshotsOperations operations, string resourceGroupName, string resourceName, Snapshot parameters) + /// + /// Creates or updates a snapshot. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CreateOrUpdateAsync(this ISnapshotsOperations operations, string resourceGroupName, string resourceName, Snapshot parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, resourceName, parameters, null, cancellationToken).ConfigureAwait(false)) { - return operations.CreateOrUpdateAsync(resourceGroupName, resourceName, parameters).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// Updates tags on a snapshot. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + public static Snapshot UpdateTags(this ISnapshotsOperations operations, string resourceGroupName, string resourceName, System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary)) + { + return ((ISnapshotsOperations)operations).UpdateTagsAsync(resourceGroupName, resourceName, tags).GetAwaiter().GetResult(); + } - /// - /// Creates or updates a snapshot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The snapshot to create or update. - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateAsync(this ISnapshotsOperations operations, string resourceGroupName, string resourceName, Snapshot parameters, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Updates tags on a snapshot. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task UpdateTagsAsync(this ISnapshotsOperations operations, string resourceGroupName, string resourceName, System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.UpdateTagsWithHttpMessagesAsync(resourceGroupName, resourceName, tags, null, cancellationToken).ConfigureAwait(false)) { - using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, resourceName, parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + return _result.Body; } + } + /// + /// Deletes a snapshot. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + public static void Delete(this ISnapshotsOperations operations, string resourceGroupName, string resourceName) + { + ((ISnapshotsOperations)operations).DeleteAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); + } - /// - /// Updates tags on a snapshot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// Resource tags. - /// - public static Snapshot UpdateTags(this ISnapshotsOperations operations, string resourceGroupName, string resourceName, IDictionary tags = default(IDictionary)) - { - return operations.UpdateTagsAsync(resourceGroupName, resourceName, tags).GetAwaiter().GetResult(); - } - - /// - /// Updates tags on a snapshot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// Resource tags. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateTagsAsync(this ISnapshotsOperations operations, string resourceGroupName, string resourceName, IDictionary tags = default(IDictionary), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateTagsWithHttpMessagesAsync(resourceGroupName, resourceName, tags, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } + /// + /// Deletes a snapshot. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task DeleteAsync(this ISnapshotsOperations operations, string resourceGroupName, string resourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// + /// Gets a list of snapshots in the specified subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListNext(this ISnapshotsOperations operations, string nextPageLink) + { + return ((ISnapshotsOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } - /// - /// Deletes a snapshot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - public static void Delete(this ISnapshotsOperations operations, string resourceGroupName, string resourceName) + /// + /// Gets a list of snapshots in the specified subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListNextAsync(this ISnapshotsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { - operations.DeleteAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); + return _result.Body; } + } + /// + /// Lists snapshots in the specified subscription and resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListByResourceGroupNext(this ISnapshotsOperations operations, string nextPageLink) + { + return ((ISnapshotsOperations)operations).ListByResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult(); + } - /// - /// Deletes a snapshot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the managed cluster resource. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteAsync(this ISnapshotsOperations operations, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Lists snapshots in the specified subscription and resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListByResourceGroupNextAsync(this ISnapshotsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListByResourceGroupNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { - (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + return _result.Body; } - - /// - /// Gets a list of snapshots in the specified subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this ISnapshotsOperations operations, string nextPageLink) - { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets a list of snapshots in the specified subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListNextAsync(this ISnapshotsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Lists snapshots in the specified subscription and resource group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListByResourceGroupNext(this ISnapshotsOperations operations, string nextPageLink) - { - return operations.ListByResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Lists snapshots in the specified subscription and resource group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListByResourceGroupNextAsync(this ISnapshotsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByResourceGroupNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - + } } } diff --git a/src/Aks/Aks.Sdk/README.md b/src/Aks/Aks.Sdk/README.md index a222a72b96bb..59d97f85bcf2 100644 --- a/src/Aks/Aks.Sdk/README.md +++ b/src/Aks/Aks.Sdk/README.md @@ -11,7 +11,9 @@ autorest.cmd README.md --version=v2 ### AutoRest Configuration > see https://aka.ms/autorest ``` yaml -csharp: true +# csharp: true +isSdkGenerator: true +powershell: true clear-output-folder: true openapi-type: arm azure-arm: true @@ -57,6 +59,16 @@ directive: - from: swagger-document where: $.definitions.ManagedClusterProperties.properties.currentKubernetesVersion transform: $["description"] = $["description"].replace(/>/g, ")"); + - where: + model-name: AgentPool + property-name: PropertiesType + set: + property-name: AgentPoolType + # - where: + # model-name: AgentPool + # property-name: PowerState + # set: + # property-name: xiaogang output-folder: Generated namespace: Microsoft.Azure.Management.ContainerService diff --git a/src/Aks/Aks/Commands/CreateOrUpdateKubeBase.cs b/src/Aks/Aks/Commands/CreateOrUpdateKubeBase.cs index 3da7316c7657..9ab2f9d13768 100644 --- a/src/Aks/Aks/Commands/CreateOrUpdateKubeBase.cs +++ b/src/Aks/Aks/Commands/CreateOrUpdateKubeBase.cs @@ -604,7 +604,7 @@ protected ManagedClusterAutoUpgradeProfile CreateOrUpdateAutoUpgradeProfile(Mana return autoUpgradeProfile; } - protected ManagedClusterHTTPProxyConfig CreateOrUpdateHttpProxyConfig(ManagedClusterHTTPProxyConfig httpProxyConfig) + protected ManagedClusterHttpProxyConfig CreateOrUpdateHttpProxyConfig(ManagedClusterHttpProxyConfig httpProxyConfig) { if ((this.IsParameterBound(c => c.HttpProxy) || this.IsParameterBound(c => c.HttpsProxy) || @@ -612,7 +612,7 @@ protected ManagedClusterHTTPProxyConfig CreateOrUpdateHttpProxyConfig(ManagedClu this.IsParameterBound(c => c.HttpProxyConfigTrustedCa)) && httpProxyConfig == null) { - httpProxyConfig = new ManagedClusterHTTPProxyConfig(); + httpProxyConfig = new ManagedClusterHttpProxyConfig(); } if (this.IsParameterBound(c => c.HttpProxy)) { @@ -654,11 +654,11 @@ protected ManagedClusterAPIServerAccessProfile CreateOrUpdateApiServerAccessProf } if (this.IsParameterBound(c => c.ApiServerAccessPrivateDnsZone)) { - apiServerAccessProfile.PrivateDNSZone = ApiServerAccessPrivateDnsZone; + apiServerAccessProfile.PrivateDnsZone = ApiServerAccessPrivateDnsZone; } if (this.IsParameterBound(c => c.EnableApiServerAccessPrivateClusterPublicFQDN)) { - apiServerAccessProfile.EnablePrivateClusterPublicFQDN = EnableApiServerAccessPrivateClusterPublicFQDN; + apiServerAccessProfile.EnablePrivateClusterPublicFqdn = EnableApiServerAccessPrivateClusterPublicFQDN; } return apiServerAccessProfile; @@ -687,9 +687,9 @@ protected ManagedCluster SetIdentity(ManagedCluster cluster) throw new AzPSArgumentException(Resources.NeedEnableManagedIdentity, nameof(AssignIdentity)); } cluster.Identity.Type = ResourceIdentityType.UserAssigned; - cluster.Identity.UserAssignedIdentities = new Dictionary + cluster.Identity.UserAssignedIdentities = new Dictionary { - { AssignIdentity, new ManagedClusterIdentityUserAssignedIdentitiesValue() } + { AssignIdentity, new ManagedServiceIdentityUserAssignedIdentitiesValue() } }; } diff --git a/src/Aks/Aks/Commands/NewAzureRmAks.cs b/src/Aks/Aks/Commands/NewAzureRmAks.cs index fed763b36017..799a2d3de8ca 100644 --- a/src/Aks/Aks/Commands/NewAzureRmAks.cs +++ b/src/Aks/Aks/Commands/NewAzureRmAks.cs @@ -394,7 +394,7 @@ private ManagedCluster BuildNewCluster() if (EnableRbac.IsPresent) { - managedCluster.EnableRBAC = EnableRbac; + managedCluster.EnableRbac = EnableRbac; } if (this.IsParameterBound(c => c.FqdnSubdomain)) { @@ -402,7 +402,7 @@ private ManagedCluster BuildNewCluster() } if (this.IsParameterBound(c => c.DiskEncryptionSetID)) { - managedCluster.DiskEncryptionSetID = DiskEncryptionSetID; + managedCluster.DiskEncryptionSetId = DiskEncryptionSetID; } if (DisableLocalAccount.IsPresent) { @@ -434,7 +434,7 @@ private ManagedCluster BuildNewCluster() if (EnableOidcIssuer.IsPresent) { - managedCluster.OidcIssuerProfile = new ManagedClusterOIDCIssuerProfile(enabled: true); + managedCluster.OidcIssuerProfile = new ManagedClusterOidcIssuerProfile(enabled: true); } return managedCluster; @@ -495,13 +495,13 @@ private ManagedClusterAgentPoolProfile GetAgentPoolProfile() name: NodeName ?? "default", count: NodeCount, vmSize: NodeVmSize, - osDiskSizeGB: NodeOsDiskSize, + osDiskSizeGb: NodeOsDiskSize, type: NodeVmSetType ?? "VirtualMachineScaleSets", - vnetSubnetID: NodeVnetSubnetID); - defaultAgentPoolProfile.OsType = "Linux"; + vnetSubnetId: NodeVnetSubnetID); + defaultAgentPoolProfile.OSType = "Linux"; if (this.IsParameterBound(c => c.NodeOsSKU)) { - defaultAgentPoolProfile.OsSKU = NodeOsSKU; + defaultAgentPoolProfile.OSSku = NodeOsSKU; if (NodeOsSKU.ToLower().Equals("cblmariner") || NodeOsSKU.ToLower().Equals("mariner")) { WriteWarning("The NodeOsSKU 'AzureLinux' should be used going forward instead of 'CBLMariner' or 'Mariner'. The NodeOsSKU 'CBLMariner' and 'Mariner' will eventually be deprecated."); } @@ -528,7 +528,7 @@ private ManagedClusterAgentPoolProfile GetAgentPoolProfile() } if (this.IsParameterBound(c => c.NodePublicIPPrefixID)) { - defaultAgentPoolProfile.NodePublicIPPrefixID = NodePublicIPPrefixID; + defaultAgentPoolProfile.NodePublicIPPrefixId = NodePublicIPPrefixID; } if (this.IsParameterBound(c => c.NodeScaleSetEvictionPolicy)) { @@ -555,7 +555,7 @@ private ManagedClusterAgentPoolProfile GetAgentPoolProfile() } } if (this.IsParameterBound(c => c.NodePodSubnetID)) { - defaultAgentPoolProfile.PodSubnetID = NodePodSubnetID; + defaultAgentPoolProfile.PodSubnetId = NodePodSubnetID; } if (this.IsParameterBound(c => c.AvailabilityZone)) { @@ -567,7 +567,7 @@ private ManagedClusterAgentPoolProfile GetAgentPoolProfile() } if (EnableUltraSSD.IsPresent) { - defaultAgentPoolProfile.EnableUltraSSD = EnableUltraSSD.ToBool(); + defaultAgentPoolProfile.EnableUltraSsd = EnableUltraSSD.ToBool(); } if (this.IsParameterBound(c => c.NodeLinuxOSConfig)) { @@ -583,18 +583,18 @@ private ManagedClusterAgentPoolProfile GetAgentPoolProfile() } if (this.IsParameterBound(c => c.PPG)) { - defaultAgentPoolProfile.ProximityPlacementGroupID = PPG; + defaultAgentPoolProfile.ProximityPlacementGroupId = PPG; } if (EnableFIPS.IsPresent) { - defaultAgentPoolProfile.EnableFIPS = EnableFIPS.ToBool(); + defaultAgentPoolProfile.EnableFips = EnableFIPS.ToBool(); } if (this.IsParameterBound(c => c.GpuInstanceProfile)) { defaultAgentPoolProfile.GpuInstanceProfile = GpuInstanceProfile; } if (this.IsParameterBound(c => c.NodeHostGroupID)) { - defaultAgentPoolProfile.HostGroupID = NodeHostGroupID; + defaultAgentPoolProfile.HostGroupId = NodeHostGroupID; } defaultAgentPoolProfile.Mode = NodePoolMode; diff --git a/src/Aks/Aks/Commands/NewAzureRmAksNodePool.cs b/src/Aks/Aks/Commands/NewAzureRmAksNodePool.cs index ad859ca0929a..51a7809a634c 100644 --- a/src/Aks/Aks/Commands/NewAzureRmAksNodePool.cs +++ b/src/Aks/Aks/Commands/NewAzureRmAksNodePool.cs @@ -174,9 +174,9 @@ private AgentPool GetAgentPool() name: Name, count: Count, vmSize: VmSize, - osDiskSizeGB: OsDiskSize, + osDiskSizeGb: OsDiskSize, type: VmSetType ?? "AvailabilitySet", - vnetSubnetID: VnetSubnetID); + vnetSubnetId: VnetSubnetID); if (this.IsParameterBound(c => c.KubernetesVersion)) { @@ -185,11 +185,11 @@ private AgentPool GetAgentPool() if (this.IsParameterBound(c => c.OsType)) { - agentPool.OsType = OsType; + agentPool.OSType = OsType; } if (this.IsParameterBound(c => c.OsSKU)) { - agentPool.OsSKU = OsSKU; + agentPool.OSSku = OsSKU; if (OsSKU.ToLower().Equals("cblmariner") || OsSKU.ToLower().Equals("mariner")) { WriteWarning("The OsSKU 'AzureLinux' should be used going forward instead of 'CBLMariner' or 'Mariner'. The OsSKU 'CBLMariner' and 'Mariner' will eventually be deprecated."); @@ -221,7 +221,7 @@ private AgentPool GetAgentPool() } if (this.IsParameterBound(c => c.NodePublicIPPrefixID)) { - agentPool.NodePublicIPPrefixID = NodePublicIPPrefixID; + agentPool.NodePublicIPPrefixId = NodePublicIPPrefixID; } if (this.IsParameterBound(c => c.ScaleSetEvictionPolicy)) { @@ -261,7 +261,7 @@ private AgentPool GetAgentPool() } if (EnableUltraSSD.IsPresent) { - agentPool.EnableUltraSSD = EnableUltraSSD.ToBool(); + agentPool.EnableUltraSsd = EnableUltraSSD.ToBool(); } if (this.IsParameterBound(c => c.LinuxOSConfig)) { @@ -277,7 +277,7 @@ private AgentPool GetAgentPool() } if (this.IsParameterBound(c => c.PPG)) { - agentPool.ProximityPlacementGroupID = PPG; + agentPool.ProximityPlacementGroupId = PPG; } if (this.IsParameterBound(c => c.SpotMaxPrice)) { @@ -285,7 +285,7 @@ private AgentPool GetAgentPool() } if (EnableFIPS.IsPresent) { - agentPool.EnableFIPS = EnableFIPS.ToBool(); + agentPool.EnableFips = EnableFIPS.ToBool(); } if (this.IsParameterBound(c => c.GpuInstanceProfile)) { @@ -293,10 +293,10 @@ private AgentPool GetAgentPool() } if (this.IsParameterBound(c => c.HostGroupID)) { - agentPool.HostGroupID = HostGroupID; + agentPool.HostGroupId = HostGroupID; } if (this.IsParameterBound(c => c.PodSubnetID)) { - agentPool.PodSubnetID = PodSubnetID; + agentPool.PodSubnetId = PodSubnetID; } return agentPool; diff --git a/src/Aks/Aks/Commands/SetAzureRmAks.cs b/src/Aks/Aks/Commands/SetAzureRmAks.cs index 3cc3ce7b2d89..0c86d5806422 100644 --- a/src/Aks/Aks/Commands/SetAzureRmAks.cs +++ b/src/Aks/Aks/Commands/SetAzureRmAks.cs @@ -91,7 +91,7 @@ private ManagedCluster BuildNewCluster() name: NodeName ?? "default", count: NodeCount, vmSize: NodeVmSize, - osDiskSizeGB: NodeOsDiskSize); + osDiskSizeGb: NodeOsDiskSize); if (this.IsParameterBound(c => c.NodeMinCount)) { @@ -254,7 +254,7 @@ public override void ExecuteCmdlet() if (this.IsParameterBound(c => c.NodeVmSize)) { WriteVerbose(Resources.UpdatingNodeVmSize); - defaultAgentPoolProfile.VmSize = NodeVmSize; + defaultAgentPoolProfile.VMSize = NodeVmSize; } if (this.IsParameterBound(c => c.NodeCount)) @@ -266,7 +266,7 @@ public override void ExecuteCmdlet() if (this.IsParameterBound(c => c.NodeOsDiskSize)) { WriteVerbose(Resources.UpdatingNodeOsDiskSize); - defaultAgentPoolProfile.OsDiskSizeGB = NodeOsDiskSize; + defaultAgentPoolProfile.OSDiskSizeGb = NodeOsDiskSize; } if (this.IsParameterBound(c => c.NodePoolMode)) @@ -425,7 +425,7 @@ public override void ExecuteCmdlet() } if (EnableOidcIssuer.IsPresent) { - cluster.OidcIssuerProfile = new ManagedClusterOIDCIssuerProfile(enabled: true); + cluster.OidcIssuerProfile = new ManagedClusterOidcIssuerProfile(enabled: true); } if (cluster.WindowsProfile != null) { @@ -447,7 +447,7 @@ public override void ExecuteCmdlet() } if (this.IsParameterBound(c => c.DiskEncryptionSetID)) { - cluster.DiskEncryptionSetID = DiskEncryptionSetID; + cluster.DiskEncryptionSetId = DiskEncryptionSetID; } if (this.IsParameterBound(c => c.DisableLocalAccount)) { diff --git a/src/Aks/Aks/Models/AdapterHelper.cs b/src/Aks/Aks/Models/AdapterHelper.cs index f4a3f11c2ced..c6a58776095a 100644 --- a/src/Aks/Aks/Models/AdapterHelper.cs +++ b/src/Aks/Aks/Models/AdapterHelper.cs @@ -39,7 +39,7 @@ public static Target Adapt(Source source) foreach (var targetProp in targetProps) { - if (sourceProp.Name == targetProp.Name) + if (sourceProp.Name.ToLower() == targetProp.Name.ToLower()) { object result; result = sourceProp.GetValue(source); diff --git a/src/Aks/Aks/Models/PSKubernetesCluster.cs b/src/Aks/Aks/Models/PSKubernetesCluster.cs index fc8950a3ead3..f0b57c7d8390 100644 --- a/src/Aks/Aks/Models/PSKubernetesCluster.cs +++ b/src/Aks/Aks/Models/PSKubernetesCluster.cs @@ -173,7 +173,7 @@ public class PSKubernetesCluster : PSResource /// /// Gets or sets the OIDC issuer profile of the Managed Cluster. /// - public ManagedClusterOIDCIssuerProfile OidcIssuerProfile { get; set; } + public ManagedClusterOidcIssuerProfile OidcIssuerProfile { get; set; } /// /// Gets or sets the name of the resource group containing agent pool From 38ae07f1c330920db7cdc589c525956db968bdbb Mon Sep 17 00:00:00 2001 From: Xiaogang Ding Date: Tue, 8 Aug 2023 21:01:31 +0800 Subject: [PATCH 2/2] Suppress breaking changes caused by character case change --- src/Aks/Aks.Sdk/README.md | 8 +------ .../Az.Aks/BreakingChangeIssues.csv | 24 +++++++++++++++++++ 2 files changed, 25 insertions(+), 7 deletions(-) create mode 100644 tools/StaticAnalysis/Exceptions/Az.Aks/BreakingChangeIssues.csv diff --git a/src/Aks/Aks.Sdk/README.md b/src/Aks/Aks.Sdk/README.md index 59d97f85bcf2..9c653bb3aa4e 100644 --- a/src/Aks/Aks.Sdk/README.md +++ b/src/Aks/Aks.Sdk/README.md @@ -5,13 +5,12 @@ This directory contains management plane service clients of Az.Aks module. In this directory, run AutoRest: ``` autorest --reset -autorest.cmd README.md --version=v2 +autorest --use:@autorest/powershell@4.x ``` ### AutoRest Configuration > see https://aka.ms/autorest ``` yaml -# csharp: true isSdkGenerator: true powershell: true clear-output-folder: true @@ -64,11 +63,6 @@ directive: property-name: PropertiesType set: property-name: AgentPoolType - # - where: - # model-name: AgentPool - # property-name: PowerState - # set: - # property-name: xiaogang output-folder: Generated namespace: Microsoft.Azure.Management.ContainerService diff --git a/tools/StaticAnalysis/Exceptions/Az.Aks/BreakingChangeIssues.csv b/tools/StaticAnalysis/Exceptions/Az.Aks/BreakingChangeIssues.csv new file mode 100644 index 000000000000..c12e3c7a5ef8 --- /dev/null +++ b/tools/StaticAnalysis/Exceptions/Az.Aks/BreakingChangeIssues.csv @@ -0,0 +1,24 @@ +"Module","ClassName","Target","Severity","ProblemId","Description","Remediation" +"Az.Aks","Microsoft.Azure.Commands.Aks.Commands.DisableAzureRmAddons","Disable-AzAksAddOn","0","3010","The property 'IssuerURL' of type 'Microsoft.Azure.Management.ContainerService.Models.ManagedClusterOIDCIssuerProfile' has been removed.","Add the property 'IssuerURL' back to type 'Microsoft.Azure.Management.ContainerService.Models.ManagedClusterOIDCIssuerProfile'." +"Az.Aks","Microsoft.Azure.Commands.Aks.Commands.DisableAzureRmAddons","Disable-AzAksAddOn","0","3010","The property 'BlobCSIDriver' of type 'Microsoft.Azure.Management.ContainerService.Models.ManagedClusterStorageProfile' has been removed.","Add the property 'BlobCSIDriver' back to type 'Microsoft.Azure.Management.ContainerService.Models.ManagedClusterStorageProfile'." +"Az.Aks","Microsoft.Azure.Commands.Aks.Commands.DisableAzureRmAddons","Disable-AzAksAddOn","0","3010","The property 'DiskCSIDriver' of type 'Microsoft.Azure.Management.ContainerService.Models.ManagedClusterStorageProfile' has been removed.","Add the property 'DiskCSIDriver' back to type 'Microsoft.Azure.Management.ContainerService.Models.ManagedClusterStorageProfile'." +"Az.Aks","Microsoft.Azure.Commands.Aks.Commands.DisableAzureRmAddons","Disable-AzAksAddOn","0","3010","The property 'FileCSIDriver' of type 'Microsoft.Azure.Management.ContainerService.Models.ManagedClusterStorageProfile' has been removed.","Add the property 'FileCSIDriver' back to type 'Microsoft.Azure.Management.ContainerService.Models.ManagedClusterStorageProfile'." +"Az.Aks","Microsoft.Azure.Commands.Aks.Commands.DisableAzureRmAddons","Disable-AzAksAddOn","0","3010","The property 'ContainerLogMaxSizeMB' of type 'Microsoft.Azure.Management.ContainerService.Models.KubeletConfig' has been removed.","Add the property 'ContainerLogMaxSizeMB' back to type 'Microsoft.Azure.Management.ContainerService.Models.KubeletConfig'." +"Az.Aks","Microsoft.Azure.Commands.Aks.Commands.DisableAzureRmAddons","Disable-AzAksAddOn","0","3010","The property 'VmMaxMapCount' of type 'Microsoft.Azure.Management.ContainerService.Models.SysctlConfig' has been removed.","Add the property 'VmMaxMapCount' back to type 'Microsoft.Azure.Management.ContainerService.Models.SysctlConfig'." +"Az.Aks","Microsoft.Azure.Commands.Aks.Commands.DisableAzureRmAddons","Disable-AzAksAddOn","0","3010","The property 'VmSwappiness' of type 'Microsoft.Azure.Management.ContainerService.Models.SysctlConfig' has been removed.","Add the property 'VmSwappiness' back to type 'Microsoft.Azure.Management.ContainerService.Models.SysctlConfig'." +"Az.Aks","Microsoft.Azure.Commands.Aks.Commands.DisableAzureRmAddons","Disable-AzAksAddOn","0","3010","The property 'VmVfsCachePressure' of type 'Microsoft.Azure.Management.ContainerService.Models.SysctlConfig' has been removed.","Add the property 'VmVfsCachePressure' back to type 'Microsoft.Azure.Management.ContainerService.Models.SysctlConfig'." +"Az.Aks","Microsoft.Azure.Commands.Aks.Commands.DisableAzureRmAddons","Disable-AzAksAddOn","0","3010","The property 'NetIpv4IpLocalPortRange' of type 'Microsoft.Azure.Management.ContainerService.Models.SysctlConfig' has been removed.","Add the property 'NetIpv4IpLocalPortRange' back to type 'Microsoft.Azure.Management.ContainerService.Models.SysctlConfig'." +"Az.Aks","Microsoft.Azure.Commands.Aks.Commands.DisableAzureRmAddons","Disable-AzAksAddOn","0","3010","The property 'SwapFileSizeMB' of type 'Microsoft.Azure.Management.ContainerService.Models.LinuxOSConfig' has been removed.","Add the property 'SwapFileSizeMB' back to type 'Microsoft.Azure.Management.ContainerService.Models.LinuxOSConfig'." +"Az.Aks","Microsoft.Azure.Commands.Aks.Commands.DisableAzureRmAddons","Disable-AzAksAddOn","0","3010","The property 'PrivateLinkServiceID' of type 'Microsoft.Azure.Management.ContainerService.Models.PrivateLinkResource' has been removed.","Add the property 'PrivateLinkServiceID' back to type 'Microsoft.Azure.Management.ContainerService.Models.PrivateLinkResource'." +"Az.Aks","Microsoft.Azure.Commands.Aks.NewAzureRmAks","New-AzAksCluster","0","3010","The property 'SwapFileSizeMB' of type 'Microsoft.Azure.Management.ContainerService.Models.LinuxOSConfig' has been removed.","Add the property 'SwapFileSizeMB' back to type 'Microsoft.Azure.Management.ContainerService.Models.LinuxOSConfig'." +"Az.Aks","Microsoft.Azure.Commands.Aks.NewAzureRmAks","New-AzAksCluster","0","3010","The property 'ContainerLogMaxSizeMB' of type 'Microsoft.Azure.Management.ContainerService.Models.KubeletConfig' has been removed.","Add the property 'ContainerLogMaxSizeMB' back to type 'Microsoft.Azure.Management.ContainerService.Models.KubeletConfig'." +"Az.Aks","Microsoft.Azure.Commands.Aks.NewAzureRmAks","New-AzAksCluster","0","3010","The property 'EnableAzureRBAC' of type 'Microsoft.Azure.Management.ContainerService.Models.ManagedClusterAADProfile' has been removed.","Add the property 'EnableAzureRBAC' back to type 'Microsoft.Azure.Management.ContainerService.Models.ManagedClusterAADProfile'." +"Az.Aks","Microsoft.Azure.Commands.Aks.NewAzureRmAks","New-AzAksCluster","0","3010","The property 'ClientAppID' of type 'Microsoft.Azure.Management.ContainerService.Models.ManagedClusterAADProfile' has been removed.","Add the property 'ClientAppID' back to type 'Microsoft.Azure.Management.ContainerService.Models.ManagedClusterAADProfile'." +"Az.Aks","Microsoft.Azure.Commands.Aks.NewAzureRmAks","New-AzAksCluster","0","3010","The property 'ServerAppID' of type 'Microsoft.Azure.Management.ContainerService.Models.ManagedClusterAADProfile' has been removed.","Add the property 'ServerAppID' back to type 'Microsoft.Azure.Management.ContainerService.Models.ManagedClusterAADProfile'." +"Az.Aks","Microsoft.Azure.Commands.Aks.NewAzureRmAks","New-AzAksCluster","0","3010","The property 'TenantID' of type 'Microsoft.Azure.Management.ContainerService.Models.ManagedClusterAADProfile' has been removed.","Add the property 'TenantID' back to type 'Microsoft.Azure.Management.ContainerService.Models.ManagedClusterAADProfile'." +"Az.Aks","Microsoft.Azure.Commands.Aks.NewAzureRmAksNodePool","New-AzAksNodePool","0","3010","The property 'SwapFileSizeMB' of type 'Microsoft.Azure.Management.ContainerService.Models.LinuxOSConfig' has been removed.","Add the property 'SwapFileSizeMB' back to type 'Microsoft.Azure.Management.ContainerService.Models.LinuxOSConfig'." +"Az.Aks","Microsoft.Azure.Commands.Aks.NewAzureRmAksNodePool","New-AzAksNodePool","0","3010","The property 'ContainerLogMaxSizeMB' of type 'Microsoft.Azure.Management.ContainerService.Models.KubeletConfig' has been removed.","Add the property 'ContainerLogMaxSizeMB' back to type 'Microsoft.Azure.Management.ContainerService.Models.KubeletConfig'." +"Az.Aks","Microsoft.Azure.Commands.Aks.SetAzureRmAks","Set-AzAksCluster","0","3010","The property 'EnableAzureRBAC' of type 'Microsoft.Azure.Management.ContainerService.Models.ManagedClusterAADProfile' has been removed.","Add the property 'EnableAzureRBAC' back to type 'Microsoft.Azure.Management.ContainerService.Models.ManagedClusterAADProfile'." +"Az.Aks","Microsoft.Azure.Commands.Aks.SetAzureRmAks","Set-AzAksCluster","0","3010","The property 'ClientAppID' of type 'Microsoft.Azure.Management.ContainerService.Models.ManagedClusterAADProfile' has been removed.","Add the property 'ClientAppID' back to type 'Microsoft.Azure.Management.ContainerService.Models.ManagedClusterAADProfile'." +"Az.Aks","Microsoft.Azure.Commands.Aks.SetAzureRmAks","Set-AzAksCluster","0","3010","The property 'ServerAppID' of type 'Microsoft.Azure.Management.ContainerService.Models.ManagedClusterAADProfile' has been removed.","Add the property 'ServerAppID' back to type 'Microsoft.Azure.Management.ContainerService.Models.ManagedClusterAADProfile'." +"Az.Aks","Microsoft.Azure.Commands.Aks.SetAzureRmAks","Set-AzAksCluster","0","3010","The property 'TenantID' of type 'Microsoft.Azure.Management.ContainerService.Models.ManagedClusterAADProfile' has been removed.","Add the property 'TenantID' back to type 'Microsoft.Azure.Management.ContainerService.Models.ManagedClusterAADProfile'."