From a44a562d34ca40e4fc7a5b6bf59558de6124ddfa Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 1 Jul 2021 00:59:02 +0000 Subject: [PATCH] CodeGen from PR 14638 in Azure/azure-rest-api-specs Merge 4b1e09286c6a22a4681f206171a07a5de128ec3f into 18b54ea5e241eddd47527a166c38ed75958b3227 --- .../Generated/DiskRestorePointOperations.cs | 500 ++++++++++++++++++ .../DiskRestorePointOperationsExtensions.cs | 254 +++++++++ .../Generated/IDiskRestorePointOperations.cs | 150 ++++++ .../Generated/Models/ManagedDiskParameters.cs | 14 +- .../Generated/Models/PublicIPAddressSku.cs | 36 +- .../src/Generated/Models/RestorePoint.cs | 39 +- .../Models/RestorePointSourceMetadata.cs | 12 +- .../src/Generated/Models/SecurityProfile.cs | 4 +- .../src/Generated/Models/SecurityTypes.cs | 37 +- ...tualMachinePublicIPAddressConfiguration.cs | 4 - ...ineScaleSetPublicIPAddressConfiguration.cs | 4 - 11 files changed, 959 insertions(+), 95 deletions(-) diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/DiskRestorePointOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/DiskRestorePointOperations.cs index b3816a506daf1..1829bd2a0b85b 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/DiskRestorePointOperations.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/DiskRestorePointOperations.cs @@ -474,6 +474,506 @@ internal DiskRestorePointOperations(ComputeManagementClient client) return _result; } + /// + /// Grants access to a diskRestorePoint. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the restore point collection that the disk restore point + /// belongs. Supported characters for the name are a-z, A-Z, 0-9 and _. The + /// maximum name length is 80 characters. + /// + /// + /// The name of the vm restore point that the disk disk restore point belongs. + /// Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name + /// length is 80 characters. + /// + /// + /// The name of the disk restore point created. Supported characters for the + /// name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. + /// + /// + /// Access data object supplied in the body of the get disk access operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> GrantAccessWithHttpMessagesAsync(string resourceGroupName, string restorePointCollectionName, string vmRestorePointName, string diskRestorePointName, GrantAccessData grantAccessData, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginGrantAccessWithHttpMessagesAsync(resourceGroupName, restorePointCollectionName, vmRestorePointName, diskRestorePointName, grantAccessData, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Revokes access to a diskRestorePoint. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the restore point collection that the disk restore point + /// belongs. Supported characters for the name are a-z, A-Z, 0-9 and _. The + /// maximum name length is 80 characters. + /// + /// + /// The name of the vm restore point that the disk disk restore point belongs. + /// Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name + /// length is 80 characters. + /// + /// + /// The name of the disk restore point created. Supported characters for the + /// name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task RevokeAccessWithHttpMessagesAsync(string resourceGroupName, string restorePointCollectionName, string vmRestorePointName, string diskRestorePointName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginRevokeAccessWithHttpMessagesAsync(resourceGroupName, restorePointCollectionName, vmRestorePointName, diskRestorePointName, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Grants access to a diskRestorePoint. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the restore point collection that the disk restore point + /// belongs. Supported characters for the name are a-z, A-Z, 0-9 and _. The + /// maximum name length is 80 characters. + /// + /// + /// The name of the vm restore point that the disk disk restore point belongs. + /// Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name + /// length is 80 characters. + /// + /// + /// The name of the disk restore point created. Supported characters for the + /// name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. + /// + /// + /// Access data object supplied in the body of the get disk access operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// 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 + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> BeginGrantAccessWithHttpMessagesAsync(string resourceGroupName, string restorePointCollectionName, string vmRestorePointName, string diskRestorePointName, GrantAccessData grantAccessData, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (restorePointCollectionName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "restorePointCollectionName"); + } + if (vmRestorePointName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "vmRestorePointName"); + } + if (diskRestorePointName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "diskRestorePointName"); + } + if (grantAccessData == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "grantAccessData"); + } + if (grantAccessData != null) + { + grantAccessData.Validate(); + } + string apiVersion = "2020-12-01"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("restorePointCollectionName", restorePointCollectionName); + tracingParameters.Add("vmRestorePointName", vmRestorePointName); + tracingParameters.Add("diskRestorePointName", diskRestorePointName); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("grantAccessData", grantAccessData); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginGrantAccess", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{vmRestorePointName}/diskRestorePoints/{diskRestorePointName}/beginGetAccess").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{restorePointCollectionName}", System.Uri.EscapeDataString(restorePointCollectionName)); + _url = _url.Replace("{vmRestorePointName}", System.Uri.EscapeDataString(vmRestorePointName)); + _url = _url.Replace("{diskRestorePointName}", System.Uri.EscapeDataString(diskRestorePointName)); + List _queryParameters = new List(); + if (apiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(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"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(grantAccessData != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(grantAccessData, Client.SerializationSettings); + _httpRequest.Content = new 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) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + 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)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new 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); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Revokes access to a diskRestorePoint. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the restore point collection that the disk restore point + /// belongs. Supported characters for the name are a-z, A-Z, 0-9 and _. The + /// maximum name length is 80 characters. + /// + /// + /// The name of the vm restore point that the disk disk restore point belongs. + /// Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name + /// length is 80 characters. + /// + /// + /// The name of the disk restore point created. Supported characters for the + /// name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task BeginRevokeAccessWithHttpMessagesAsync(string resourceGroupName, string restorePointCollectionName, string vmRestorePointName, string diskRestorePointName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (restorePointCollectionName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "restorePointCollectionName"); + } + if (vmRestorePointName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "vmRestorePointName"); + } + if (diskRestorePointName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "diskRestorePointName"); + } + string apiVersion = "2020-12-01"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("restorePointCollectionName", restorePointCollectionName); + tracingParameters.Add("vmRestorePointName", vmRestorePointName); + tracingParameters.Add("diskRestorePointName", diskRestorePointName); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginRevokeAccess", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{vmRestorePointName}/diskRestorePoints/{diskRestorePointName}/endGetAccess").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{restorePointCollectionName}", System.Uri.EscapeDataString(restorePointCollectionName)); + _url = _url.Replace("{vmRestorePointName}", System.Uri.EscapeDataString(vmRestorePointName)); + _url = _url.Replace("{diskRestorePointName}", System.Uri.EscapeDataString(diskRestorePointName)); + List _queryParameters = new List(); + if (apiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(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"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + 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)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new 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); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + /// /// Lists diskRestorePoints under a vmRestorePoint. /// diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/DiskRestorePointOperationsExtensions.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/DiskRestorePointOperationsExtensions.cs index 1ce2e70ac2c2e..6ea1d754cdab8 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/DiskRestorePointOperationsExtensions.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/DiskRestorePointOperationsExtensions.cs @@ -137,6 +137,260 @@ public static IPage ListByRestorePoint(this IDiskRestorePointO } } + /// + /// Grants access to a diskRestorePoint. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the restore point collection that the disk restore point + /// belongs. Supported characters for the name are a-z, A-Z, 0-9 and _. The + /// maximum name length is 80 characters. + /// + /// + /// The name of the vm restore point that the disk disk restore point belongs. + /// Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name + /// length is 80 characters. + /// + /// + /// The name of the disk restore point created. Supported characters for the + /// name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. + /// + /// + /// Access data object supplied in the body of the get disk access operation. + /// + public static AccessUri GrantAccess(this IDiskRestorePointOperations operations, string resourceGroupName, string restorePointCollectionName, string vmRestorePointName, string diskRestorePointName, GrantAccessData grantAccessData) + { + return operations.GrantAccessAsync(resourceGroupName, restorePointCollectionName, vmRestorePointName, diskRestorePointName, grantAccessData).GetAwaiter().GetResult(); + } + + /// + /// Grants access to a diskRestorePoint. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the restore point collection that the disk restore point + /// belongs. Supported characters for the name are a-z, A-Z, 0-9 and _. The + /// maximum name length is 80 characters. + /// + /// + /// The name of the vm restore point that the disk disk restore point belongs. + /// Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name + /// length is 80 characters. + /// + /// + /// The name of the disk restore point created. Supported characters for the + /// name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. + /// + /// + /// Access data object supplied in the body of the get disk access operation. + /// + /// + /// The cancellation token. + /// + public static async Task GrantAccessAsync(this IDiskRestorePointOperations operations, string resourceGroupName, string restorePointCollectionName, string vmRestorePointName, string diskRestorePointName, GrantAccessData grantAccessData, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GrantAccessWithHttpMessagesAsync(resourceGroupName, restorePointCollectionName, vmRestorePointName, diskRestorePointName, grantAccessData, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Revokes access to a diskRestorePoint. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the restore point collection that the disk restore point + /// belongs. Supported characters for the name are a-z, A-Z, 0-9 and _. The + /// maximum name length is 80 characters. + /// + /// + /// The name of the vm restore point that the disk disk restore point belongs. + /// Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name + /// length is 80 characters. + /// + /// + /// The name of the disk restore point created. Supported characters for the + /// name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. + /// + public static void RevokeAccess(this IDiskRestorePointOperations operations, string resourceGroupName, string restorePointCollectionName, string vmRestorePointName, string diskRestorePointName) + { + operations.RevokeAccessAsync(resourceGroupName, restorePointCollectionName, vmRestorePointName, diskRestorePointName).GetAwaiter().GetResult(); + } + + /// + /// Revokes access to a diskRestorePoint. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the restore point collection that the disk restore point + /// belongs. Supported characters for the name are a-z, A-Z, 0-9 and _. The + /// maximum name length is 80 characters. + /// + /// + /// The name of the vm restore point that the disk disk restore point belongs. + /// Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name + /// length is 80 characters. + /// + /// + /// The name of the disk restore point created. Supported characters for the + /// name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. + /// + /// + /// The cancellation token. + /// + public static async Task RevokeAccessAsync(this IDiskRestorePointOperations operations, string resourceGroupName, string restorePointCollectionName, string vmRestorePointName, string diskRestorePointName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.RevokeAccessWithHttpMessagesAsync(resourceGroupName, restorePointCollectionName, vmRestorePointName, diskRestorePointName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Grants access to a diskRestorePoint. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the restore point collection that the disk restore point + /// belongs. Supported characters for the name are a-z, A-Z, 0-9 and _. The + /// maximum name length is 80 characters. + /// + /// + /// The name of the vm restore point that the disk disk restore point belongs. + /// Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name + /// length is 80 characters. + /// + /// + /// The name of the disk restore point created. Supported characters for the + /// name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. + /// + /// + /// Access data object supplied in the body of the get disk access operation. + /// + public static AccessUri BeginGrantAccess(this IDiskRestorePointOperations operations, string resourceGroupName, string restorePointCollectionName, string vmRestorePointName, string diskRestorePointName, GrantAccessData grantAccessData) + { + return operations.BeginGrantAccessAsync(resourceGroupName, restorePointCollectionName, vmRestorePointName, diskRestorePointName, grantAccessData).GetAwaiter().GetResult(); + } + + /// + /// Grants access to a diskRestorePoint. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the restore point collection that the disk restore point + /// belongs. Supported characters for the name are a-z, A-Z, 0-9 and _. The + /// maximum name length is 80 characters. + /// + /// + /// The name of the vm restore point that the disk disk restore point belongs. + /// Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name + /// length is 80 characters. + /// + /// + /// The name of the disk restore point created. Supported characters for the + /// name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. + /// + /// + /// Access data object supplied in the body of the get disk access operation. + /// + /// + /// The cancellation token. + /// + public static async Task BeginGrantAccessAsync(this IDiskRestorePointOperations operations, string resourceGroupName, string restorePointCollectionName, string vmRestorePointName, string diskRestorePointName, GrantAccessData grantAccessData, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginGrantAccessWithHttpMessagesAsync(resourceGroupName, restorePointCollectionName, vmRestorePointName, diskRestorePointName, grantAccessData, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Revokes access to a diskRestorePoint. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the restore point collection that the disk restore point + /// belongs. Supported characters for the name are a-z, A-Z, 0-9 and _. The + /// maximum name length is 80 characters. + /// + /// + /// The name of the vm restore point that the disk disk restore point belongs. + /// Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name + /// length is 80 characters. + /// + /// + /// The name of the disk restore point created. Supported characters for the + /// name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. + /// + public static void BeginRevokeAccess(this IDiskRestorePointOperations operations, string resourceGroupName, string restorePointCollectionName, string vmRestorePointName, string diskRestorePointName) + { + operations.BeginRevokeAccessAsync(resourceGroupName, restorePointCollectionName, vmRestorePointName, diskRestorePointName).GetAwaiter().GetResult(); + } + + /// + /// Revokes access to a diskRestorePoint. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the restore point collection that the disk restore point + /// belongs. Supported characters for the name are a-z, A-Z, 0-9 and _. The + /// maximum name length is 80 characters. + /// + /// + /// The name of the vm restore point that the disk disk restore point belongs. + /// Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name + /// length is 80 characters. + /// + /// + /// The name of the disk restore point created. Supported characters for the + /// name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. + /// + /// + /// The cancellation token. + /// + public static async Task BeginRevokeAccessAsync(this IDiskRestorePointOperations operations, string resourceGroupName, string restorePointCollectionName, string vmRestorePointName, string diskRestorePointName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.BeginRevokeAccessWithHttpMessagesAsync(resourceGroupName, restorePointCollectionName, vmRestorePointName, diskRestorePointName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// /// Lists diskRestorePoints under a vmRestorePoint. /// diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IDiskRestorePointOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IDiskRestorePointOperations.cs index c385b750b2378..ca3b34a2a6f7d 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IDiskRestorePointOperations.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IDiskRestorePointOperations.cs @@ -93,6 +93,156 @@ public partial interface IDiskRestorePointOperations /// Task>> ListByRestorePointWithHttpMessagesAsync(string resourceGroupName, string restorePointCollectionName, string vmRestorePointName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// + /// Grants access to a diskRestorePoint. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the restore point collection that the disk restore + /// point belongs. Supported characters for the name are a-z, A-Z, 0-9 + /// and _. The maximum name length is 80 characters. + /// + /// + /// The name of the vm restore point that the disk disk restore point + /// belongs. Supported characters for the name are a-z, A-Z, 0-9 and _. + /// The maximum name length is 80 characters. + /// + /// + /// The name of the disk restore point created. Supported characters + /// for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 + /// characters. + /// + /// + /// Access data object supplied in the body of the get disk access + /// operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// 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 + /// + Task> GrantAccessWithHttpMessagesAsync(string resourceGroupName, string restorePointCollectionName, string vmRestorePointName, string diskRestorePointName, GrantAccessData grantAccessData, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Revokes access to a diskRestorePoint. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the restore point collection that the disk restore + /// point belongs. Supported characters for the name are a-z, A-Z, 0-9 + /// and _. The maximum name length is 80 characters. + /// + /// + /// The name of the vm restore point that the disk disk restore point + /// belongs. Supported characters for the name are a-z, A-Z, 0-9 and _. + /// The maximum name length is 80 characters. + /// + /// + /// The name of the disk restore point created. Supported characters + /// for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 + /// characters. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + Task RevokeAccessWithHttpMessagesAsync(string resourceGroupName, string restorePointCollectionName, string vmRestorePointName, string diskRestorePointName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Grants access to a diskRestorePoint. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the restore point collection that the disk restore + /// point belongs. Supported characters for the name are a-z, A-Z, 0-9 + /// and _. The maximum name length is 80 characters. + /// + /// + /// The name of the vm restore point that the disk disk restore point + /// belongs. Supported characters for the name are a-z, A-Z, 0-9 and _. + /// The maximum name length is 80 characters. + /// + /// + /// The name of the disk restore point created. Supported characters + /// for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 + /// characters. + /// + /// + /// Access data object supplied in the body of the get disk access + /// operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// 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 + /// + Task> BeginGrantAccessWithHttpMessagesAsync(string resourceGroupName, string restorePointCollectionName, string vmRestorePointName, string diskRestorePointName, GrantAccessData grantAccessData, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Revokes access to a diskRestorePoint. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the restore point collection that the disk restore + /// point belongs. Supported characters for the name are a-z, A-Z, 0-9 + /// and _. The maximum name length is 80 characters. + /// + /// + /// The name of the vm restore point that the disk disk restore point + /// belongs. Supported characters for the name are a-z, A-Z, 0-9 and _. + /// The maximum name length is 80 characters. + /// + /// + /// The name of the disk restore point created. Supported characters + /// for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 + /// characters. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + Task BeginRevokeAccessWithHttpMessagesAsync(string resourceGroupName, string restorePointCollectionName, string vmRestorePointName, string diskRestorePointName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// Lists diskRestorePoints under a vmRestorePoint. /// /// diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/ManagedDiskParameters.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/ManagedDiskParameters.cs index 7042c7d194764..ded41ccc30503 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/ManagedDiskParameters.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/ManagedDiskParameters.cs @@ -31,10 +31,11 @@ public ManagedDiskParameters() /// /// Resource Id /// Specifies the storage account type - /// for the managed disk. NOTE: UltraSSD_LRS can only be used with data - /// disks, it cannot be used with OS Disk. Possible values include: - /// 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS', - /// 'Premium_ZRS', 'StandardSSD_ZRS' + /// for the managed disk. Managed OS disk storage account type can only + /// be set when you create the scale set. NOTE: UltraSSD_LRS can only + /// be used with data disks, it cannot be used with OS Disk. Possible + /// values include: 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', + /// 'UltraSSD_LRS', 'Premium_ZRS', 'StandardSSD_ZRS' /// Specifies the customer managed disk /// encryption set resource id for the managed disk. public ManagedDiskParameters(string id = default(string), string storageAccountType = default(string), DiskEncryptionSetParameters diskEncryptionSet = default(DiskEncryptionSetParameters)) @@ -52,8 +53,9 @@ public ManagedDiskParameters() /// /// Gets or sets specifies the storage account type for the managed - /// disk. NOTE: UltraSSD_LRS can only be used with data disks, it - /// cannot be used with OS Disk. Possible values include: + /// disk. Managed OS disk storage account type can only be set when you + /// create the scale set. NOTE: UltraSSD_LRS can only be used with data + /// disks, it cannot be used with OS Disk. Possible values include: /// 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS', 'UltraSSD_LRS', /// 'Premium_ZRS', 'StandardSSD_ZRS' /// diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/PublicIPAddressSku.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/PublicIPAddressSku.cs index 9af937b631f92..8a3daf217a1aa 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/PublicIPAddressSku.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/PublicIPAddressSku.cs @@ -10,7 +10,6 @@ namespace Microsoft.Azure.Management.Compute.Models { - using Microsoft.Rest; using Newtonsoft.Json; using System.Linq; @@ -30,14 +29,14 @@ public PublicIPAddressSku() /// /// Initializes a new instance of the PublicIPAddressSku class. /// - /// Specify public IP sku name. - /// Possible values include: 'Basic', 'Standard' - /// Specify public IP sku tier. - /// Possible values include: 'Regional', 'Global' - public PublicIPAddressSku(string publicIPAddressSkuName, string publicIPAddressSkuTier = default(string)) + /// Specify public IP sku name. Possible values + /// include: 'Basic', 'Standard' + /// Specify public IP sku tier. Possible values + /// include: 'Regional', 'Global' + public PublicIPAddressSku(string name = default(string), string tier = default(string)) { - PublicIPAddressSkuName = publicIPAddressSkuName; - PublicIPAddressSkuTier = publicIPAddressSkuTier; + Name = name; + Tier = tier; CustomInit(); } @@ -50,28 +49,15 @@ public PublicIPAddressSku() /// Gets or sets specify public IP sku name. Possible values include: /// 'Basic', 'Standard' /// - [JsonProperty(PropertyName = "publicIPAddressSkuName")] - public string PublicIPAddressSkuName { get; set; } + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } /// /// Gets or sets specify public IP sku tier. Possible values include: /// 'Regional', 'Global' /// - [JsonProperty(PropertyName = "publicIPAddressSkuTier")] - public string PublicIPAddressSkuTier { get; set; } + [JsonProperty(PropertyName = "tier")] + public string Tier { get; set; } - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (PublicIPAddressSkuName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "PublicIPAddressSkuName"); - } - } } } diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/RestorePoint.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/RestorePoint.cs index ff835f5bbbf29..5dcb9c544bfef 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/RestorePoint.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/RestorePoint.cs @@ -10,6 +10,8 @@ namespace Microsoft.Azure.Management.Compute.Models { + using Microsoft.Rest; + using Microsoft.Rest.Serialization; using Newtonsoft.Json; using System.Collections; using System.Collections.Generic; @@ -18,6 +20,7 @@ namespace Microsoft.Azure.Management.Compute.Models /// /// Restore Point details. /// + [Rest.Serialization.JsonTransformation] public partial class RestorePoint : ProxyResource { /// @@ -34,6 +37,9 @@ public RestorePoint() /// Resource Id /// Resource name /// Resource type + /// List of disk resource ids that the + /// customer wishes to exclude from the restore point. If no disks are + /// specified, all disks will be included. /// Gets the details of the VM captured at /// the time of the restore point creation. /// Gets the provisioning state of the @@ -44,17 +50,14 @@ public RestorePoint() /// 'FileSystemConsistent', 'ApplicationConsistent' /// Gets the provisioning details set /// by the server during Create restore point operation. - /// List of disk resource ids that the - /// customer wishes to exclude from the restore point. If no disks are - /// specified, all disks will be included. - public RestorePoint(string id = default(string), string name = default(string), string type = default(string), RestorePointSourceMetadata sourceMetadata = default(RestorePointSourceMetadata), string provisioningState = default(string), string consistencyMode = default(string), RestorePointProvisioningDetails provisioningDetails = default(RestorePointProvisioningDetails), IList excludeDisks = default(IList)) + public RestorePoint(string id = default(string), string name = default(string), string type = default(string), IList excludeDisks = default(IList), RestorePointSourceMetadata sourceMetadata = default(RestorePointSourceMetadata), string provisioningState = default(string), string consistencyMode = default(string), RestorePointProvisioningDetails provisioningDetails = default(RestorePointProvisioningDetails)) : base(id, name, type) { + ExcludeDisks = excludeDisks; SourceMetadata = sourceMetadata; ProvisioningState = provisioningState; ConsistencyMode = consistencyMode; ProvisioningDetails = provisioningDetails; - ExcludeDisks = excludeDisks; CustomInit(); } @@ -63,17 +66,25 @@ public RestorePoint() /// partial void CustomInit(); + /// + /// Gets or sets list of disk resource ids that the customer wishes to + /// exclude from the restore point. If no disks are specified, all + /// disks will be included. + /// + [JsonProperty(PropertyName = "properties.excludeDisks")] + public IList ExcludeDisks { get; set; } + /// /// Gets the details of the VM captured at the time of the restore /// point creation. /// - [JsonProperty(PropertyName = "sourceMetadata")] + [JsonProperty(PropertyName = "properties.sourceMetadata")] public RestorePointSourceMetadata SourceMetadata { get; private set; } /// /// Gets the provisioning state of the restore point. /// - [JsonProperty(PropertyName = "provisioningState")] + [JsonProperty(PropertyName = "properties.provisioningState")] public string ProvisioningState { get; private set; } /// @@ -82,28 +93,20 @@ public RestorePoint() /// include: 'CrashConsistent', 'FileSystemConsistent', /// 'ApplicationConsistent' /// - [JsonProperty(PropertyName = "consistencyMode")] + [JsonProperty(PropertyName = "properties.consistencyMode")] public string ConsistencyMode { get; private set; } /// /// Gets the provisioning details set by the server during Create /// restore point operation. /// - [JsonProperty(PropertyName = "provisioningDetails")] + [JsonProperty(PropertyName = "properties.provisioningDetails")] public RestorePointProvisioningDetails ProvisioningDetails { get; private set; } - /// - /// Gets or sets list of disk resource ids that the customer wishes to - /// exclude from the restore point. If no disks are specified, all - /// disks will be included. - /// - [JsonProperty(PropertyName = "excludeDisks")] - public IList ExcludeDisks { get; set; } - /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/RestorePointSourceMetadata.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/RestorePointSourceMetadata.cs index 13f1c7cc42e2d..4cce6d1bab5ff 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/RestorePointSourceMetadata.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/RestorePointSourceMetadata.cs @@ -41,7 +41,9 @@ public RestorePointSourceMetadata() /// your own license scenario. /// Gets the virtual machine unique id. /// Gets the security profile. - public RestorePointSourceMetadata(HardwareProfile hardwareProfile = default(HardwareProfile), RestorePointSourceVMStorageProfile storageProfile = default(RestorePointSourceVMStorageProfile), OSProfile osProfile = default(OSProfile), DiagnosticsProfile diagnosticsProfile = default(DiagnosticsProfile), string licenseType = default(string), string vmId = default(string), SecurityProfile securityProfile = default(SecurityProfile)) + /// Location of the VM from which the restore + /// point was created. + public RestorePointSourceMetadata(HardwareProfile hardwareProfile = default(HardwareProfile), RestorePointSourceVMStorageProfile storageProfile = default(RestorePointSourceVMStorageProfile), OSProfile osProfile = default(OSProfile), DiagnosticsProfile diagnosticsProfile = default(DiagnosticsProfile), string licenseType = default(string), string vmId = default(string), SecurityProfile securityProfile = default(SecurityProfile), string location = default(string)) { HardwareProfile = hardwareProfile; StorageProfile = storageProfile; @@ -50,6 +52,7 @@ public RestorePointSourceMetadata() LicenseType = licenseType; VmId = vmId; SecurityProfile = securityProfile; + Location = location; CustomInit(); } @@ -101,6 +104,13 @@ public RestorePointSourceMetadata() [JsonProperty(PropertyName = "securityProfile")] public SecurityProfile SecurityProfile { get; set; } + /// + /// Gets or sets location of the VM from which the restore point was + /// created. + /// + [JsonProperty(PropertyName = "location")] + public string Location { get; set; } + /// /// Validate the object. /// diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SecurityProfile.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SecurityProfile.cs index 0be80d5c515a1..195674740d183 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SecurityProfile.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SecurityProfile.cs @@ -45,7 +45,7 @@ public SecurityProfile() /// <br><br> Default: UefiSettings will not be enabled /// unless this property is set as TrustedLaunch. Possible values /// include: 'TrustedLaunch' - public SecurityProfile(UefiSettings uefiSettings = default(UefiSettings), bool? encryptionAtHost = default(bool?), SecurityTypes? securityType = default(SecurityTypes?)) + public SecurityProfile(UefiSettings uefiSettings = default(UefiSettings), bool? encryptionAtHost = default(bool?), string securityType = default(string)) { UefiSettings = uefiSettings; EncryptionAtHost = encryptionAtHost; @@ -86,7 +86,7 @@ public SecurityProfile() /// values include: 'TrustedLaunch' /// [JsonProperty(PropertyName = "securityType")] - public SecurityTypes? SecurityType { get; set; } + public string SecurityType { get; set; } } } diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SecurityTypes.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SecurityTypes.cs index aad5bca9275b7..d85c553e8c4dc 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SecurityTypes.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SecurityTypes.cs @@ -10,45 +10,12 @@ namespace Microsoft.Azure.Management.Compute.Models { - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; /// /// Defines values for SecurityTypes. /// - [JsonConverter(typeof(StringEnumConverter))] - public enum SecurityTypes + public static class SecurityTypes { - [EnumMember(Value = "TrustedLaunch")] - TrustedLaunch - } - internal static class SecurityTypesEnumExtension - { - internal static string ToSerializedValue(this SecurityTypes? value) - { - return value == null ? null : ((SecurityTypes)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this SecurityTypes value) - { - switch( value ) - { - case SecurityTypes.TrustedLaunch: - return "TrustedLaunch"; - } - return null; - } - - internal static SecurityTypes? ParseSecurityTypes(this string value) - { - switch( value ) - { - case "TrustedLaunch": - return SecurityTypes.TrustedLaunch; - } - return null; - } + public const string TrustedLaunch = "TrustedLaunch"; } } diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachinePublicIPAddressConfiguration.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachinePublicIPAddressConfiguration.cs index d0bed83d6e3dc..573abfe35c084 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachinePublicIPAddressConfiguration.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachinePublicIPAddressConfiguration.cs @@ -153,10 +153,6 @@ public virtual void Validate() { DnsSettings.Validate(); } - if (Sku != null) - { - Sku.Validate(); - } } } } diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineScaleSetPublicIPAddressConfiguration.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineScaleSetPublicIPAddressConfiguration.cs index d3cadab7187d0..7be218d6cda94 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineScaleSetPublicIPAddressConfiguration.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineScaleSetPublicIPAddressConfiguration.cs @@ -142,10 +142,6 @@ public virtual void Validate() { DnsSettings.Validate(); } - if (Sku != null) - { - Sku.Validate(); - } } } }