diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BMSPrepareDataMoveOperationResultOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BMSPrepareDataMoveOperationResultOperations.cs index 83d40815898ca..0f8f2d634d910 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BMSPrepareDataMoveOperationResultOperations.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BMSPrepareDataMoveOperationResultOperations.cs @@ -101,7 +101,7 @@ internal BMSPrepareDataMoveOperationResultOperations(RecoveryServicesBackupClien { throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); } - string apiVersion = "2021-06-01"; + string apiVersion = "2021-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupEnginesOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupEnginesOperations.cs index b77b576e620aa..ffde2dc6d0fb2 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupEnginesOperations.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupEnginesOperations.cs @@ -103,7 +103,7 @@ internal BackupEnginesOperations(RecoveryServicesBackupClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2021-06-01"; + string apiVersion = "2021-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -325,7 +325,7 @@ internal BackupEnginesOperations(RecoveryServicesBackupClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "backupEngineName"); } - string apiVersion = "2021-06-01"; + string apiVersion = "2021-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupJobsOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupJobsOperations.cs index 6e6c36c29d840..83abb447a86ee 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupJobsOperations.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupJobsOperations.cs @@ -102,7 +102,7 @@ internal BackupJobsOperations(RecoveryServicesBackupClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2021-06-01"; + string apiVersion = "2021-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupOperationResultsOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupOperationResultsOperations.cs index ee5917e782f5e..fcb260c3940fd 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupOperationResultsOperations.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupOperationResultsOperations.cs @@ -105,7 +105,7 @@ internal BackupOperationResultsOperations(RecoveryServicesBackupClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); } - string apiVersion = "2021-06-01"; + string apiVersion = "2021-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupOperationStatusesOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupOperationStatusesOperations.cs index 3f1750c971f1e..8da1864208259 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupOperationStatusesOperations.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupOperationStatusesOperations.cs @@ -107,7 +107,7 @@ internal BackupOperationStatusesOperations(RecoveryServicesBackupClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); } - string apiVersion = "2021-06-01"; + string apiVersion = "2021-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupPoliciesOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupPoliciesOperations.cs index 73a24d0b9098f..27d92bc7be05d 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupPoliciesOperations.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupPoliciesOperations.cs @@ -101,7 +101,7 @@ internal BackupPoliciesOperations(RecoveryServicesBackupClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2021-06-01"; + string apiVersion = "2021-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupProtectableItemsOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupProtectableItemsOperations.cs index c0c8354c01730..8550afcdd5c61 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupProtectableItemsOperations.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupProtectableItemsOperations.cs @@ -104,7 +104,7 @@ internal BackupProtectableItemsOperations(RecoveryServicesBackupClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2021-06-01"; + string apiVersion = "2021-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupProtectedItemsOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupProtectedItemsOperations.cs index 5ff13b92811f3..9c39d79b3c92b 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupProtectedItemsOperations.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupProtectedItemsOperations.cs @@ -102,7 +102,7 @@ internal BackupProtectedItemsOperations(RecoveryServicesBackupClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2021-06-01"; + string apiVersion = "2021-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupProtectionContainersOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupProtectionContainersOperations.cs index 9d09599b98874..662890cd183b0 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupProtectionContainersOperations.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupProtectionContainersOperations.cs @@ -99,7 +99,7 @@ internal BackupProtectionContainersOperations(RecoveryServicesBackupClient clien { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2021-06-01"; + string apiVersion = "2021-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupProtectionIntentOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupProtectionIntentOperations.cs index 9c3f7d89d98ff..2ef189eeb2eb6 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupProtectionIntentOperations.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupProtectionIntentOperations.cs @@ -102,7 +102,7 @@ internal BackupProtectionIntentOperations(RecoveryServicesBackupClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2021-06-01"; + string apiVersion = "2021-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupResourceEncryptionConfigsOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupResourceEncryptionConfigsOperations.cs index 1af0f16a969cf..dc9a81ba5fc31 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupResourceEncryptionConfigsOperations.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupResourceEncryptionConfigsOperations.cs @@ -95,7 +95,7 @@ internal BackupResourceEncryptionConfigsOperations(RecoveryServicesBackupClient { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2021-06-01"; + string apiVersion = "2021-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -289,7 +289,7 @@ internal BackupResourceEncryptionConfigsOperations(RecoveryServicesBackupClient { throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); } - string apiVersion = "2021-06-01"; + string apiVersion = "2021-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupResourceStorageConfigsNonCRROperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupResourceStorageConfigsNonCRROperations.cs new file mode 100644 index 0000000000000..b0cad85648c4e --- /dev/null +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupResourceStorageConfigsNonCRROperations.cs @@ -0,0 +1,631 @@ +// +// 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.RecoveryServices.Backup +{ + 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; + + /// + /// BackupResourceStorageConfigsNonCRROperations operations. + /// + internal partial class BackupResourceStorageConfigsNonCRROperations : IServiceOperations, IBackupResourceStorageConfigsNonCRROperations + { + /// + /// Initializes a new instance of the BackupResourceStorageConfigsNonCRROperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal BackupResourceStorageConfigsNonCRROperations(RecoveryServicesBackupClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the RecoveryServicesBackupClient + /// + public RecoveryServicesBackupClient Client { get; private set; } + + /// + /// Fetches resource storage config. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is + /// present. + /// + /// + /// 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> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (vaultName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string apiVersion = "2021-07-01"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("vaultName", vaultName); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Get", 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.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig").ToString(); + _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + 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("GET"); + _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); + } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new NewErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + NewErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + 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; + } + + /// + /// Updates vault storage model type. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is + /// present. + /// + /// + /// Vault storage config request + /// + /// + /// 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> UpdateWithHttpMessagesAsync(string vaultName, string resourceGroupName, BackupResourceConfigResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (vaultName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + string apiVersion = "2021-07-01"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("vaultName", vaultName); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Update", 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.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig").ToString(); + _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + 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("PUT"); + _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(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, 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); + } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new NewErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + NewErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + 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; + } + + /// + /// Updates vault storage model type. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is + /// present. + /// + /// + /// Vault storage config request + /// + /// + /// 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 PatchWithHttpMessagesAsync(string vaultName, string resourceGroupName, BackupResourceConfigResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (vaultName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + string apiVersion = "2021-07-01"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("vaultName", vaultName); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Patch", 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.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig").ToString(); + _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + 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("PATCH"); + _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(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, 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); + } + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 204) + { + var ex = new NewErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + NewErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + 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; + } + + } +} diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupResourceStorageConfigsNonCRROperationsExtensions.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupResourceStorageConfigsNonCRROperationsExtensions.cs new file mode 100644 index 0000000000000..f8327055149de --- /dev/null +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupResourceStorageConfigsNonCRROperationsExtensions.cs @@ -0,0 +1,160 @@ +// +// 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.RecoveryServices.Backup +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for BackupResourceStorageConfigsNonCRROperations. + /// + public static partial class BackupResourceStorageConfigsNonCRROperationsExtensions + { + /// + /// Fetches resource storage config. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is + /// present. + /// + public static BackupResourceConfigResource Get(this IBackupResourceStorageConfigsNonCRROperations operations, string vaultName, string resourceGroupName) + { + return operations.GetAsync(vaultName, resourceGroupName).GetAwaiter().GetResult(); + } + + /// + /// Fetches resource storage config. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is + /// present. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IBackupResourceStorageConfigsNonCRROperations operations, string vaultName, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(vaultName, resourceGroupName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Updates vault storage model type. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is + /// present. + /// + /// + /// Vault storage config request + /// + public static BackupResourceConfigResource Update(this IBackupResourceStorageConfigsNonCRROperations operations, string vaultName, string resourceGroupName, BackupResourceConfigResource parameters) + { + return operations.UpdateAsync(vaultName, resourceGroupName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Updates vault storage model type. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is + /// present. + /// + /// + /// Vault storage config request + /// + /// + /// The cancellation token. + /// + public static async Task UpdateAsync(this IBackupResourceStorageConfigsNonCRROperations operations, string vaultName, string resourceGroupName, BackupResourceConfigResource parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.UpdateWithHttpMessagesAsync(vaultName, resourceGroupName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Updates vault storage model type. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is + /// present. + /// + /// + /// Vault storage config request + /// + public static void Patch(this IBackupResourceStorageConfigsNonCRROperations operations, string vaultName, string resourceGroupName, BackupResourceConfigResource parameters) + { + operations.PatchAsync(vaultName, resourceGroupName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Updates vault storage model type. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is + /// present. + /// + /// + /// Vault storage config request + /// + /// + /// The cancellation token. + /// + public static async Task PatchAsync(this IBackupResourceStorageConfigsNonCRROperations operations, string vaultName, string resourceGroupName, BackupResourceConfigResource parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.PatchWithHttpMessagesAsync(vaultName, resourceGroupName, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + } +} diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupResourceVaultConfigsOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupResourceVaultConfigsOperations.cs index 49ec7c310cb7d..4e63b29831afd 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupResourceVaultConfigsOperations.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupResourceVaultConfigsOperations.cs @@ -95,7 +95,7 @@ internal BackupResourceVaultConfigsOperations(RecoveryServicesBackupClient clien { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2021-06-01"; + string apiVersion = "2021-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -292,7 +292,7 @@ internal BackupResourceVaultConfigsOperations(RecoveryServicesBackupClient clien { throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); } - string apiVersion = "2021-06-01"; + string apiVersion = "2021-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -496,7 +496,7 @@ internal BackupResourceVaultConfigsOperations(RecoveryServicesBackupClient clien { throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); } - string apiVersion = "2021-06-01"; + string apiVersion = "2021-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupStatusOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupStatusOperations.cs index 892b9cb3aca91..2a21f293d27a7 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupStatusOperations.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupStatusOperations.cs @@ -94,7 +94,7 @@ internal BackupStatusOperations(RecoveryServicesBackupClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); } - string apiVersion = "2021-06-01"; + string apiVersion = "2021-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupUsageSummariesOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupUsageSummariesOperations.cs index 0d4a288e33285..3922e49b09fa1 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupUsageSummariesOperations.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupUsageSummariesOperations.cs @@ -102,7 +102,7 @@ internal BackupUsageSummariesOperations(RecoveryServicesBackupClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2021-06-01"; + string apiVersion = "2021-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupWorkloadItemsOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupWorkloadItemsOperations.cs index c0c278a0a8ff5..1894299580a87 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupWorkloadItemsOperations.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupWorkloadItemsOperations.cs @@ -118,7 +118,7 @@ internal BackupWorkloadItemsOperations(RecoveryServicesBackupClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "containerName"); } - string apiVersion = "2021-06-01"; + string apiVersion = "2021-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupsOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupsOperations.cs index ddb1bf79bef51..cfac9e6177960 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupsOperations.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupsOperations.cs @@ -122,7 +122,7 @@ internal BackupsOperations(RecoveryServicesBackupClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); } - string apiVersion = "2021-06-01"; + string apiVersion = "2021-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ExportJobsOperationResultsOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ExportJobsOperationResultsOperations.cs index 0c27f13219225..1b53222ecf67e 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ExportJobsOperationResultsOperations.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ExportJobsOperationResultsOperations.cs @@ -105,7 +105,7 @@ internal ExportJobsOperationResultsOperations(RecoveryServicesBackupClient clien { throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); } - string apiVersion = "2021-06-01"; + string apiVersion = "2021-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/FeatureSupportOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/FeatureSupportOperations.cs index 7781b1e8d4d61..163bc43ab37fb 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/FeatureSupportOperations.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/FeatureSupportOperations.cs @@ -95,7 +95,7 @@ internal FeatureSupportOperations(RecoveryServicesBackupClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); } - string apiVersion = "2021-06-01"; + string apiVersion = "2021-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IBackupResourceStorageConfigsNonCRROperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IBackupResourceStorageConfigsNonCRROperations.cs new file mode 100644 index 0000000000000..13112dcfed1c3 --- /dev/null +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IBackupResourceStorageConfigsNonCRROperations.cs @@ -0,0 +1,108 @@ +// +// 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.RecoveryServices.Backup +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// BackupResourceStorageConfigsNonCRROperations operations. + /// + public partial interface IBackupResourceStorageConfigsNonCRROperations + { + /// + /// Fetches resource storage config. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is + /// present. + /// + /// + /// 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> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Updates vault storage model type. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is + /// present. + /// + /// + /// Vault storage config request + /// + /// + /// 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> UpdateWithHttpMessagesAsync(string vaultName, string resourceGroupName, BackupResourceConfigResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Updates vault storage model type. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is + /// present. + /// + /// + /// Vault storage config request + /// + /// + /// 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 PatchWithHttpMessagesAsync(string vaultName, string resourceGroupName, BackupResourceConfigResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IRecoveryServicesBackupClient.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IRecoveryServicesBackupClient.cs index c5b048b83425e..1f2b4a87732b9 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IRecoveryServicesBackupClient.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IRecoveryServicesBackupClient.cs @@ -68,6 +68,11 @@ public partial interface IRecoveryServicesBackupClient : System.IDisposable bool? GenerateClientRequestId { get; set; } + /// + /// Gets the IBackupResourceStorageConfigsNonCRROperations. + /// + IBackupResourceStorageConfigsNonCRROperations BackupResourceStorageConfigsNonCRR { get; } + /// /// Gets the IProtectionIntentOperations. /// @@ -278,6 +283,16 @@ public partial interface IRecoveryServicesBackupClient : System.IDisposable /// IRecoveryPointsRecommendedForMoveOperations RecoveryPointsRecommendedForMove { get; } + /// + /// Gets the IResourceGuardProxiesOperations. + /// + IResourceGuardProxiesOperations ResourceGuardProxies { get; } + + /// + /// Gets the IResourceGuardProxyOperations. + /// + IResourceGuardProxyOperations ResourceGuardProxy { get; } + /// /// Gets the IBackupUsageSummariesCRROperations. /// diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IResourceGuardProxiesOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IResourceGuardProxiesOperations.cs new file mode 100644 index 0000000000000..c9136c39db8ed --- /dev/null +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IResourceGuardProxiesOperations.cs @@ -0,0 +1,75 @@ +// +// 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.RecoveryServices.Backup +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ResourceGuardProxiesOperations operations. + /// + public partial interface IResourceGuardProxiesOperations + { + /// + /// List the ResourceGuardProxies under vault + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is + /// present. + /// + /// + /// 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>> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// List the ResourceGuardProxies under vault + /// + /// + /// The NextLink from the previous successful call to List 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>> GetNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IResourceGuardProxyOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IResourceGuardProxyOperations.cs new file mode 100644 index 0000000000000..e7580fbde6be2 --- /dev/null +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IResourceGuardProxyOperations.cs @@ -0,0 +1,141 @@ +// +// 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.RecoveryServices.Backup +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ResourceGuardProxyOperations operations. + /// + public partial interface IResourceGuardProxyOperations + { + /// + /// Returns ResourceGuardProxy under vault and with the name referenced + /// in request + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is + /// present. + /// + /// + /// + /// + /// 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> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string resourceGuardProxyName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Add or Update ResourceGuardProxy under vault + /// Secures vault critical operations + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is + /// present. + /// + /// + /// + /// + /// 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> PutWithHttpMessagesAsync(string vaultName, string resourceGroupName, string resourceGuardProxyName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Delete ResourceGuardProxy under vault + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is + /// present. + /// + /// + /// + /// + /// 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 DeleteWithHttpMessagesAsync(string vaultName, string resourceGroupName, string resourceGuardProxyName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Secures delete ResourceGuardProxy operations. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is + /// present. + /// + /// + /// + /// + /// Request body for 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> UnlockDeleteWithHttpMessagesAsync(string vaultName, string resourceGroupName, string resourceGuardProxyName, UnlockDeleteRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ISecurityPINsOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ISecurityPINsOperations.cs index 69daf6684fcbe..66a54ba927b4a 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ISecurityPINsOperations.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ISecurityPINsOperations.cs @@ -33,6 +33,9 @@ public partial interface ISecurityPINsOperations /// The name of the resource group where the recovery services vault is /// present. /// + /// + /// ResourceGuard Operation Requests + /// /// /// The headers that will be added to request. /// @@ -48,6 +51,6 @@ public partial interface ISecurityPINsOperations /// /// Thrown when a required parameter is null /// - Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, IList resourceGuardOperationRequests = default(IList), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ItemLevelRecoveryConnectionsOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ItemLevelRecoveryConnectionsOperations.cs index ed06fcc61b379..5c8e60380e15f 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ItemLevelRecoveryConnectionsOperations.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ItemLevelRecoveryConnectionsOperations.cs @@ -133,7 +133,7 @@ internal ItemLevelRecoveryConnectionsOperations(RecoveryServicesBackupClient cli { throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); } - string apiVersion = "2021-06-01"; + string apiVersion = "2021-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -355,7 +355,7 @@ internal ItemLevelRecoveryConnectionsOperations(RecoveryServicesBackupClient cli { throw new ValidationException(ValidationRules.CannotBeNull, "recoveryPointId"); } - string apiVersion = "2021-06-01"; + string apiVersion = "2021-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/JobCancellationsOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/JobCancellationsOperations.cs index 835405fe55117..11e054bbb6962 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/JobCancellationsOperations.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/JobCancellationsOperations.cs @@ -101,7 +101,7 @@ internal JobCancellationsOperations(RecoveryServicesBackupClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "jobName"); } - string apiVersion = "2021-06-01"; + string apiVersion = "2021-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/JobDetailsOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/JobDetailsOperations.cs index 53f2868a82a32..2e1f155cb8ed1 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/JobDetailsOperations.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/JobDetailsOperations.cs @@ -102,7 +102,7 @@ internal JobDetailsOperations(RecoveryServicesBackupClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "jobName"); } - string apiVersion = "2021-06-01"; + string apiVersion = "2021-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/JobOperationResultsOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/JobOperationResultsOperations.cs index 5fd7e10d22da6..d339ea97a160b 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/JobOperationResultsOperations.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/JobOperationResultsOperations.cs @@ -106,7 +106,7 @@ internal JobOperationResultsOperations(RecoveryServicesBackupClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); } - string apiVersion = "2021-06-01"; + string apiVersion = "2021-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/JobsOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/JobsOperations.cs index 459b24bae2c05..f74324319f231 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/JobsOperations.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/JobsOperations.cs @@ -97,7 +97,7 @@ internal JobsOperations(RecoveryServicesBackupClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2021-06-01"; + string apiVersion = "2021-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureFileShareProtectionPolicy.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureFileShareProtectionPolicy.cs index 8a2a5769cc07f..30e44d17d9395 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureFileShareProtectionPolicy.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureFileShareProtectionPolicy.cs @@ -11,6 +11,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; using System.Linq; /// @@ -34,6 +36,8 @@ public AzureFileShareProtectionPolicy() /// /// Number of items associated with /// this policy. + /// ResourceGuard + /// Operation Requests /// Type of workload for the backup /// management. Possible values include: 'Invalid', 'VM', 'FileFolder', /// 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', @@ -45,8 +49,8 @@ public AzureFileShareProtectionPolicy() /// backup copy retention ranges. /// TimeZone optional input as string. For /// example: TimeZone = "Pacific Standard Time". - public AzureFileShareProtectionPolicy(int? protectedItemsCount = default(int?), string workLoadType = default(string), SchedulePolicy schedulePolicy = default(SchedulePolicy), RetentionPolicy retentionPolicy = default(RetentionPolicy), string timeZone = default(string)) - : base(protectedItemsCount) + public AzureFileShareProtectionPolicy(int? protectedItemsCount = default(int?), IList resourceGuardOperationRequests = default(IList), string workLoadType = default(string), SchedulePolicy schedulePolicy = default(SchedulePolicy), RetentionPolicy retentionPolicy = default(RetentionPolicy), string timeZone = default(string)) + : base(protectedItemsCount, resourceGuardOperationRequests) { WorkLoadType = workLoadType; SchedulePolicy = schedulePolicy; diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureFileshareProtectedItem.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureFileshareProtectedItem.cs index 8dd65c17f8321..b3e1b4ac06643 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureFileshareProtectedItem.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureFileshareProtectedItem.cs @@ -65,6 +65,9 @@ public AzureFileshareProtectedItem() /// whether the deferred deleted DS is to be purged soon /// Flag to identify that deferred deleted DS /// is to be moved into Pause state + /// ResourceGuardOperationRequests + /// on which LAC check will be performed /// Friendly name of the fileshare /// represented by this backup item. /// Backup status of this backup @@ -82,8 +85,8 @@ public AzureFileshareProtectedItem() /// backups running status for this backup /// item. Possible values include: 'Passed', 'ActionRequired', /// 'ActionSuggested', 'Invalid' - public AzureFileshareProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUTC = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), string friendlyName = default(string), string protectionStatus = default(string), string protectionState = default(string), string lastBackupStatus = default(string), System.DateTime? lastBackupTime = default(System.DateTime?), IDictionary kpisHealths = default(IDictionary), AzureFileshareProtectedItemExtendedInfo extendedInfo = default(AzureFileshareProtectedItemExtendedInfo), string healthStatus = default(string)) - : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUTC, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate) + public AzureFileshareProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUTC = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), IList resourceGuardOperationRequests = default(IList), string friendlyName = default(string), string protectionStatus = default(string), string protectionState = default(string), string lastBackupStatus = default(string), System.DateTime? lastBackupTime = default(System.DateTime?), IDictionary kpisHealths = default(IDictionary), AzureFileshareProtectedItemExtendedInfo extendedInfo = default(AzureFileshareProtectedItemExtendedInfo), string healthStatus = default(string)) + : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUTC, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests) { FriendlyName = friendlyName; ProtectionStatus = protectionStatus; diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureIaaSClassicComputeVMProtectedItem.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureIaaSClassicComputeVMProtectedItem.cs index 8e33842aabc95..b464e93290d90 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureIaaSClassicComputeVMProtectedItem.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureIaaSClassicComputeVMProtectedItem.cs @@ -66,6 +66,9 @@ public AzureIaaSClassicComputeVMProtectedItem() /// whether the deferred deleted DS is to be purged soon /// Flag to identify that deferred deleted DS /// is to be moved into Pause state + /// ResourceGuardOperationRequests + /// on which LAC check will be performed /// Friendly name of the VM represented by /// this backup item. /// Fully qualified ARM ID of the @@ -89,8 +92,8 @@ public AzureIaaSClassicComputeVMProtectedItem() /// item. /// Additional information for this backup /// item. - public AzureIaaSClassicComputeVMProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUTC = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), string friendlyName = default(string), string virtualMachineId = default(string), string protectionStatus = default(string), string protectionState = default(string), string healthStatus = default(string), IList healthDetails = default(IList), IDictionary kpisHealths = default(IDictionary), string lastBackupStatus = default(string), System.DateTime? lastBackupTime = default(System.DateTime?), string protectedItemDataId = default(string), AzureIaaSVMProtectedItemExtendedInfo extendedInfo = default(AzureIaaSVMProtectedItemExtendedInfo), ExtendedProperties extendedProperties = default(ExtendedProperties)) - : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUTC, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, friendlyName, virtualMachineId, protectionStatus, protectionState, healthStatus, healthDetails, kpisHealths, lastBackupStatus, lastBackupTime, protectedItemDataId, extendedInfo, extendedProperties) + public AzureIaaSClassicComputeVMProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUTC = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), IList resourceGuardOperationRequests = default(IList), string friendlyName = default(string), string virtualMachineId = default(string), string protectionStatus = default(string), string protectionState = default(string), string healthStatus = default(string), IList healthDetails = default(IList), IDictionary kpisHealths = default(IDictionary), string lastBackupStatus = default(string), System.DateTime? lastBackupTime = default(System.DateTime?), string protectedItemDataId = default(string), AzureIaaSVMProtectedItemExtendedInfo extendedInfo = default(AzureIaaSVMProtectedItemExtendedInfo), ExtendedProperties extendedProperties = default(ExtendedProperties)) + : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUTC, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, friendlyName, virtualMachineId, protectionStatus, protectionState, healthStatus, healthDetails, kpisHealths, lastBackupStatus, lastBackupTime, protectedItemDataId, extendedInfo, extendedProperties) { CustomInit(); } diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureIaaSComputeVMProtectedItem.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureIaaSComputeVMProtectedItem.cs index b34ad5cf2647f..81f2df02546f3 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureIaaSComputeVMProtectedItem.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureIaaSComputeVMProtectedItem.cs @@ -66,6 +66,9 @@ public AzureIaaSComputeVMProtectedItem() /// whether the deferred deleted DS is to be purged soon /// Flag to identify that deferred deleted DS /// is to be moved into Pause state + /// ResourceGuardOperationRequests + /// on which LAC check will be performed /// Friendly name of the VM represented by /// this backup item. /// Fully qualified ARM ID of the @@ -89,8 +92,8 @@ public AzureIaaSComputeVMProtectedItem() /// item. /// Additional information for this backup /// item. - public AzureIaaSComputeVMProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUTC = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), string friendlyName = default(string), string virtualMachineId = default(string), string protectionStatus = default(string), string protectionState = default(string), string healthStatus = default(string), IList healthDetails = default(IList), IDictionary kpisHealths = default(IDictionary), string lastBackupStatus = default(string), System.DateTime? lastBackupTime = default(System.DateTime?), string protectedItemDataId = default(string), AzureIaaSVMProtectedItemExtendedInfo extendedInfo = default(AzureIaaSVMProtectedItemExtendedInfo), ExtendedProperties extendedProperties = default(ExtendedProperties)) - : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUTC, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, friendlyName, virtualMachineId, protectionStatus, protectionState, healthStatus, healthDetails, kpisHealths, lastBackupStatus, lastBackupTime, protectedItemDataId, extendedInfo, extendedProperties) + public AzureIaaSComputeVMProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUTC = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), IList resourceGuardOperationRequests = default(IList), string friendlyName = default(string), string virtualMachineId = default(string), string protectionStatus = default(string), string protectionState = default(string), string healthStatus = default(string), IList healthDetails = default(IList), IDictionary kpisHealths = default(IDictionary), string lastBackupStatus = default(string), System.DateTime? lastBackupTime = default(System.DateTime?), string protectedItemDataId = default(string), AzureIaaSVMProtectedItemExtendedInfo extendedInfo = default(AzureIaaSVMProtectedItemExtendedInfo), ExtendedProperties extendedProperties = default(ExtendedProperties)) + : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUTC, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, friendlyName, virtualMachineId, protectionStatus, protectionState, healthStatus, healthDetails, kpisHealths, lastBackupStatus, lastBackupTime, protectedItemDataId, extendedInfo, extendedProperties) { CustomInit(); } diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureIaaSVMProtectedItem.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureIaaSVMProtectedItem.cs index 2b226279a2aae..7eafb78db2fb5 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureIaaSVMProtectedItem.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureIaaSVMProtectedItem.cs @@ -62,6 +62,9 @@ public AzureIaaSVMProtectedItem() /// whether the deferred deleted DS is to be purged soon /// Flag to identify that deferred deleted DS /// is to be moved into Pause state + /// ResourceGuardOperationRequests + /// on which LAC check will be performed /// Friendly name of the VM represented by /// this backup item. /// Fully qualified ARM ID of the @@ -85,8 +88,8 @@ public AzureIaaSVMProtectedItem() /// item. /// Additional information for this backup /// item. - public AzureIaaSVMProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUTC = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), string friendlyName = default(string), string virtualMachineId = default(string), string protectionStatus = default(string), string protectionState = default(string), string healthStatus = default(string), IList healthDetails = default(IList), IDictionary kpisHealths = default(IDictionary), string lastBackupStatus = default(string), System.DateTime? lastBackupTime = default(System.DateTime?), string protectedItemDataId = default(string), AzureIaaSVMProtectedItemExtendedInfo extendedInfo = default(AzureIaaSVMProtectedItemExtendedInfo), ExtendedProperties extendedProperties = default(ExtendedProperties)) - : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUTC, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate) + public AzureIaaSVMProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUTC = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), IList resourceGuardOperationRequests = default(IList), string friendlyName = default(string), string virtualMachineId = default(string), string protectionStatus = default(string), string protectionState = default(string), string healthStatus = default(string), IList healthDetails = default(IList), IDictionary kpisHealths = default(IDictionary), string lastBackupStatus = default(string), System.DateTime? lastBackupTime = default(System.DateTime?), string protectedItemDataId = default(string), AzureIaaSVMProtectedItemExtendedInfo extendedInfo = default(AzureIaaSVMProtectedItemExtendedInfo), ExtendedProperties extendedProperties = default(ExtendedProperties)) + : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUTC, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests) { FriendlyName = friendlyName; VirtualMachineId = virtualMachineId; diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureIaaSVMProtectionPolicy.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureIaaSVMProtectionPolicy.cs index 3de7aed742d46..4d37620c5410c 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureIaaSVMProtectionPolicy.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureIaaSVMProtectionPolicy.cs @@ -11,6 +11,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; using System.Linq; /// @@ -34,6 +36,8 @@ public AzureIaaSVMProtectionPolicy() /// /// Number of items associated with /// this policy. + /// ResourceGuard + /// Operation Requests /// Backup schedule specified as part of /// backup policy. /// Retention policy with the details on @@ -42,8 +46,8 @@ public AzureIaaSVMProtectionPolicy() /// policy range in days /// TimeZone optional input as string. For /// example: TimeZone = "Pacific Standard Time". - public AzureIaaSVMProtectionPolicy(int? protectedItemsCount = default(int?), InstantRPAdditionalDetails instantRPDetails = default(InstantRPAdditionalDetails), SchedulePolicy schedulePolicy = default(SchedulePolicy), RetentionPolicy retentionPolicy = default(RetentionPolicy), int? instantRpRetentionRangeInDays = default(int?), string timeZone = default(string)) - : base(protectedItemsCount) + public AzureIaaSVMProtectionPolicy(int? protectedItemsCount = default(int?), IList resourceGuardOperationRequests = default(IList), InstantRPAdditionalDetails instantRPDetails = default(InstantRPAdditionalDetails), SchedulePolicy schedulePolicy = default(SchedulePolicy), RetentionPolicy retentionPolicy = default(RetentionPolicy), int? instantRpRetentionRangeInDays = default(int?), string timeZone = default(string)) + : base(protectedItemsCount, resourceGuardOperationRequests) { InstantRPDetails = instantRPDetails; SchedulePolicy = schedulePolicy; diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureSqlProtectedItem.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureSqlProtectedItem.cs index 85ec7328e3bdc..62b19b97b86de 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureSqlProtectedItem.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureSqlProtectedItem.cs @@ -11,6 +11,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; using System.Linq; /// @@ -61,6 +63,9 @@ public AzureSqlProtectedItem() /// whether the deferred deleted DS is to be purged soon /// Flag to identify that deferred deleted DS /// is to be moved into Pause state + /// ResourceGuardOperationRequests + /// on which LAC check will be performed /// Internal ID of a backup item. /// Used by Azure SQL Backup engine to contact Recovery /// Services. @@ -69,8 +74,8 @@ public AzureSqlProtectedItem() /// 'ProtectionError', 'ProtectionStopped', 'ProtectionPaused' /// Additional information for this backup /// item. - public AzureSqlProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUTC = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), string protectedItemDataId = default(string), string protectionState = default(string), AzureSqlProtectedItemExtendedInfo extendedInfo = default(AzureSqlProtectedItemExtendedInfo)) - : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUTC, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate) + public AzureSqlProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUTC = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), IList resourceGuardOperationRequests = default(IList), string protectedItemDataId = default(string), string protectionState = default(string), AzureSqlProtectedItemExtendedInfo extendedInfo = default(AzureSqlProtectedItemExtendedInfo)) + : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUTC, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests) { ProtectedItemDataId = protectedItemDataId; ProtectionState = protectionState; diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureSqlProtectionPolicy.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureSqlProtectionPolicy.cs index 949c050414655..b9dfee77255b8 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureSqlProtectionPolicy.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureSqlProtectionPolicy.cs @@ -11,6 +11,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; using System.Linq; /// @@ -32,9 +34,11 @@ public AzureSqlProtectionPolicy() /// /// Number of items associated with /// this policy. + /// ResourceGuard + /// Operation Requests /// Retention policy details. - public AzureSqlProtectionPolicy(int? protectedItemsCount = default(int?), RetentionPolicy retentionPolicy = default(RetentionPolicy)) - : base(protectedItemsCount) + public AzureSqlProtectionPolicy(int? protectedItemsCount = default(int?), IList resourceGuardOperationRequests = default(IList), RetentionPolicy retentionPolicy = default(RetentionPolicy)) + : base(protectedItemsCount, resourceGuardOperationRequests) { RetentionPolicy = retentionPolicy; CustomInit(); diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureVmWorkloadProtectedItem.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureVmWorkloadProtectedItem.cs index 3d49e320551fa..7c0a928c27fe2 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureVmWorkloadProtectedItem.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureVmWorkloadProtectedItem.cs @@ -64,6 +64,9 @@ public AzureVmWorkloadProtectedItem() /// whether the deferred deleted DS is to be purged soon /// Flag to identify that deferred deleted DS /// is to be moved into Pause state + /// ResourceGuardOperationRequests + /// on which LAC check will be performed /// Friendly name of the DB represented by /// this backup item. /// Host/Cluster Name for instance or @@ -93,8 +96,8 @@ public AzureVmWorkloadProtectedItem() /// Additional information for this backup /// item. /// Health details of different KPIs - public AzureVmWorkloadProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUTC = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), string friendlyName = default(string), string serverName = default(string), string parentName = default(string), string parentType = default(string), string protectionStatus = default(string), string protectionState = default(string), string lastBackupStatus = default(string), System.DateTime? lastBackupTime = default(System.DateTime?), ErrorDetail lastBackupErrorDetail = default(ErrorDetail), string protectedItemDataSourceId = default(string), string protectedItemHealthStatus = default(string), AzureVmWorkloadProtectedItemExtendedInfo extendedInfo = default(AzureVmWorkloadProtectedItemExtendedInfo), IDictionary kpisHealths = default(IDictionary)) - : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUTC, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate) + public AzureVmWorkloadProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUTC = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), IList resourceGuardOperationRequests = default(IList), string friendlyName = default(string), string serverName = default(string), string parentName = default(string), string parentType = default(string), string protectionStatus = default(string), string protectionState = default(string), string lastBackupStatus = default(string), System.DateTime? lastBackupTime = default(System.DateTime?), ErrorDetail lastBackupErrorDetail = default(ErrorDetail), string protectedItemDataSourceId = default(string), string protectedItemHealthStatus = default(string), AzureVmWorkloadProtectedItemExtendedInfo extendedInfo = default(AzureVmWorkloadProtectedItemExtendedInfo), IDictionary kpisHealths = default(IDictionary)) + : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUTC, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests) { FriendlyName = friendlyName; ServerName = serverName; diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureVmWorkloadProtectionPolicy.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureVmWorkloadProtectionPolicy.cs index a9afe575e5ebd..dd52d76f28739 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureVmWorkloadProtectionPolicy.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureVmWorkloadProtectionPolicy.cs @@ -36,6 +36,8 @@ public AzureVmWorkloadProtectionPolicy() /// /// Number of items associated with /// this policy. + /// ResourceGuard + /// Operation Requests /// Type of workload for the backup /// management. Possible values include: 'Invalid', 'VM', 'FileFolder', /// 'AzureSqlDb', 'SQLDB', 'Exchange', 'Sharepoint', 'VMwareVM', @@ -47,8 +49,8 @@ public AzureVmWorkloadProtectionPolicy() /// which includes schedule and retention /// Fix the policy /// inconsistency - public AzureVmWorkloadProtectionPolicy(int? protectedItemsCount = default(int?), string workLoadType = default(string), Settings settings = default(Settings), IList subProtectionPolicy = default(IList), bool? makePolicyConsistent = default(bool?)) - : base(protectedItemsCount) + public AzureVmWorkloadProtectionPolicy(int? protectedItemsCount = default(int?), IList resourceGuardOperationRequests = default(IList), string workLoadType = default(string), Settings settings = default(Settings), IList subProtectionPolicy = default(IList), bool? makePolicyConsistent = default(bool?)) + : base(protectedItemsCount, resourceGuardOperationRequests) { WorkLoadType = workLoadType; Settings = settings; diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureVmWorkloadSAPAseDatabaseProtectedItem.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureVmWorkloadSAPAseDatabaseProtectedItem.cs index 1b6cacfdf6f49..e2bdbf1d969d1 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureVmWorkloadSAPAseDatabaseProtectedItem.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureVmWorkloadSAPAseDatabaseProtectedItem.cs @@ -66,6 +66,9 @@ public AzureVmWorkloadSAPAseDatabaseProtectedItem() /// whether the deferred deleted DS is to be purged soon /// Flag to identify that deferred deleted DS /// is to be moved into Pause state + /// ResourceGuardOperationRequests + /// on which LAC check will be performed /// Friendly name of the DB represented by /// this backup item. /// Host/Cluster Name for instance or @@ -95,8 +98,8 @@ public AzureVmWorkloadSAPAseDatabaseProtectedItem() /// Additional information for this backup /// item. /// Health details of different KPIs - public AzureVmWorkloadSAPAseDatabaseProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUTC = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), string friendlyName = default(string), string serverName = default(string), string parentName = default(string), string parentType = default(string), string protectionStatus = default(string), string protectionState = default(string), string lastBackupStatus = default(string), System.DateTime? lastBackupTime = default(System.DateTime?), ErrorDetail lastBackupErrorDetail = default(ErrorDetail), string protectedItemDataSourceId = default(string), string protectedItemHealthStatus = default(string), AzureVmWorkloadProtectedItemExtendedInfo extendedInfo = default(AzureVmWorkloadProtectedItemExtendedInfo), IDictionary kpisHealths = default(IDictionary)) - : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUTC, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, friendlyName, serverName, parentName, parentType, protectionStatus, protectionState, lastBackupStatus, lastBackupTime, lastBackupErrorDetail, protectedItemDataSourceId, protectedItemHealthStatus, extendedInfo, kpisHealths) + public AzureVmWorkloadSAPAseDatabaseProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUTC = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), IList resourceGuardOperationRequests = default(IList), string friendlyName = default(string), string serverName = default(string), string parentName = default(string), string parentType = default(string), string protectionStatus = default(string), string protectionState = default(string), string lastBackupStatus = default(string), System.DateTime? lastBackupTime = default(System.DateTime?), ErrorDetail lastBackupErrorDetail = default(ErrorDetail), string protectedItemDataSourceId = default(string), string protectedItemHealthStatus = default(string), AzureVmWorkloadProtectedItemExtendedInfo extendedInfo = default(AzureVmWorkloadProtectedItemExtendedInfo), IDictionary kpisHealths = default(IDictionary)) + : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUTC, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, friendlyName, serverName, parentName, parentType, protectionStatus, protectionState, lastBackupStatus, lastBackupTime, lastBackupErrorDetail, protectedItemDataSourceId, protectedItemHealthStatus, extendedInfo, kpisHealths) { CustomInit(); } diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureVmWorkloadSAPHanaDatabaseProtectedItem.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureVmWorkloadSAPHanaDatabaseProtectedItem.cs index 45bf08239fe2b..46c05dd0982b1 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureVmWorkloadSAPHanaDatabaseProtectedItem.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureVmWorkloadSAPHanaDatabaseProtectedItem.cs @@ -66,6 +66,9 @@ public AzureVmWorkloadSAPHanaDatabaseProtectedItem() /// whether the deferred deleted DS is to be purged soon /// Flag to identify that deferred deleted DS /// is to be moved into Pause state + /// ResourceGuardOperationRequests + /// on which LAC check will be performed /// Friendly name of the DB represented by /// this backup item. /// Host/Cluster Name for instance or @@ -95,8 +98,8 @@ public AzureVmWorkloadSAPHanaDatabaseProtectedItem() /// Additional information for this backup /// item. /// Health details of different KPIs - public AzureVmWorkloadSAPHanaDatabaseProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUTC = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), string friendlyName = default(string), string serverName = default(string), string parentName = default(string), string parentType = default(string), string protectionStatus = default(string), string protectionState = default(string), string lastBackupStatus = default(string), System.DateTime? lastBackupTime = default(System.DateTime?), ErrorDetail lastBackupErrorDetail = default(ErrorDetail), string protectedItemDataSourceId = default(string), string protectedItemHealthStatus = default(string), AzureVmWorkloadProtectedItemExtendedInfo extendedInfo = default(AzureVmWorkloadProtectedItemExtendedInfo), IDictionary kpisHealths = default(IDictionary)) - : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUTC, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, friendlyName, serverName, parentName, parentType, protectionStatus, protectionState, lastBackupStatus, lastBackupTime, lastBackupErrorDetail, protectedItemDataSourceId, protectedItemHealthStatus, extendedInfo, kpisHealths) + public AzureVmWorkloadSAPHanaDatabaseProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUTC = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), IList resourceGuardOperationRequests = default(IList), string friendlyName = default(string), string serverName = default(string), string parentName = default(string), string parentType = default(string), string protectionStatus = default(string), string protectionState = default(string), string lastBackupStatus = default(string), System.DateTime? lastBackupTime = default(System.DateTime?), ErrorDetail lastBackupErrorDetail = default(ErrorDetail), string protectedItemDataSourceId = default(string), string protectedItemHealthStatus = default(string), AzureVmWorkloadProtectedItemExtendedInfo extendedInfo = default(AzureVmWorkloadProtectedItemExtendedInfo), IDictionary kpisHealths = default(IDictionary)) + : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUTC, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, friendlyName, serverName, parentName, parentType, protectionStatus, protectionState, lastBackupStatus, lastBackupTime, lastBackupErrorDetail, protectedItemDataSourceId, protectedItemHealthStatus, extendedInfo, kpisHealths) { CustomInit(); } diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureVmWorkloadSQLDatabaseProtectedItem.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureVmWorkloadSQLDatabaseProtectedItem.cs index 3670feb932bc1..3de664fc24331 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureVmWorkloadSQLDatabaseProtectedItem.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AzureVmWorkloadSQLDatabaseProtectedItem.cs @@ -65,6 +65,9 @@ public AzureVmWorkloadSQLDatabaseProtectedItem() /// whether the deferred deleted DS is to be purged soon /// Flag to identify that deferred deleted DS /// is to be moved into Pause state + /// ResourceGuardOperationRequests + /// on which LAC check will be performed /// Friendly name of the DB represented by /// this backup item. /// Host/Cluster Name for instance or @@ -94,8 +97,8 @@ public AzureVmWorkloadSQLDatabaseProtectedItem() /// Additional information for this backup /// item. /// Health details of different KPIs - public AzureVmWorkloadSQLDatabaseProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUTC = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), string friendlyName = default(string), string serverName = default(string), string parentName = default(string), string parentType = default(string), string protectionStatus = default(string), string protectionState = default(string), string lastBackupStatus = default(string), System.DateTime? lastBackupTime = default(System.DateTime?), ErrorDetail lastBackupErrorDetail = default(ErrorDetail), string protectedItemDataSourceId = default(string), string protectedItemHealthStatus = default(string), AzureVmWorkloadProtectedItemExtendedInfo extendedInfo = default(AzureVmWorkloadProtectedItemExtendedInfo), IDictionary kpisHealths = default(IDictionary)) - : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUTC, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, friendlyName, serverName, parentName, parentType, protectionStatus, protectionState, lastBackupStatus, lastBackupTime, lastBackupErrorDetail, protectedItemDataSourceId, protectedItemHealthStatus, extendedInfo, kpisHealths) + public AzureVmWorkloadSQLDatabaseProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUTC = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), IList resourceGuardOperationRequests = default(IList), string friendlyName = default(string), string serverName = default(string), string parentName = default(string), string parentType = default(string), string protectionStatus = default(string), string protectionState = default(string), string lastBackupStatus = default(string), System.DateTime? lastBackupTime = default(System.DateTime?), ErrorDetail lastBackupErrorDetail = default(ErrorDetail), string protectedItemDataSourceId = default(string), string protectedItemHealthStatus = default(string), AzureVmWorkloadProtectedItemExtendedInfo extendedInfo = default(AzureVmWorkloadProtectedItemExtendedInfo), IDictionary kpisHealths = default(IDictionary)) + : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUTC, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests, friendlyName, serverName, parentName, parentType, protectionStatus, protectionState, lastBackupStatus, lastBackupTime, lastBackupErrorDetail, protectedItemDataSourceId, protectedItemHealthStatus, extendedInfo, kpisHealths) { CustomInit(); } diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/BackupResourceVaultConfig.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/BackupResourceVaultConfig.cs index f4716f6dfc0d4..a1ff3afb6d111 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/BackupResourceVaultConfig.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/BackupResourceVaultConfig.cs @@ -11,6 +11,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; using System.Linq; /// @@ -43,13 +45,16 @@ public BackupResourceVaultConfig() /// values include: 'Invalid', 'Enabled', 'Disabled' /// Soft Delete feature state. /// Possible values include: 'Invalid', 'Enabled', 'Disabled' - public BackupResourceVaultConfig(string storageModelType = default(string), string storageType = default(string), string storageTypeState = default(string), string enhancedSecurityState = default(string), string softDeleteFeatureState = default(string)) + /// ResourceGuard + /// Operation Requests + public BackupResourceVaultConfig(string storageModelType = default(string), string storageType = default(string), string storageTypeState = default(string), string enhancedSecurityState = default(string), string softDeleteFeatureState = default(string), IList resourceGuardOperationRequests = default(IList)) { StorageModelType = storageModelType; StorageType = storageType; StorageTypeState = storageTypeState; EnhancedSecurityState = enhancedSecurityState; SoftDeleteFeatureState = softDeleteFeatureState; + ResourceGuardOperationRequests = resourceGuardOperationRequests; CustomInit(); } @@ -96,5 +101,11 @@ public BackupResourceVaultConfig() [JsonProperty(PropertyName = "softDeleteFeatureState")] public string SoftDeleteFeatureState { get; set; } + /// + /// Gets or sets resourceGuard Operation Requests + /// + [JsonProperty(PropertyName = "resourceGuardOperationRequests")] + public IList ResourceGuardOperationRequests { get; set; } + } } diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/DPMProtectedItem.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/DPMProtectedItem.cs index f518bb5c876f5..22c8e190ba1b1 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/DPMProtectedItem.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/DPMProtectedItem.cs @@ -11,6 +11,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; using System.Linq; /// @@ -60,6 +62,9 @@ public DPMProtectedItem() /// whether the deferred deleted DS is to be purged soon /// Flag to identify that deferred deleted DS /// is to be moved into Pause state + /// ResourceGuardOperationRequests + /// on which LAC check will be performed /// Friendly name of the managed /// item /// Backup Management server protecting @@ -70,8 +75,8 @@ public DPMProtectedItem() /// 'ProtectionPaused' /// Extended info of the backup /// item. - public DPMProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUTC = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), string friendlyName = default(string), string backupEngineName = default(string), string protectionState = default(string), DPMProtectedItemExtendedInfo extendedInfo = default(DPMProtectedItemExtendedInfo)) - : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUTC, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate) + public DPMProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUTC = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), IList resourceGuardOperationRequests = default(IList), string friendlyName = default(string), string backupEngineName = default(string), string protectionState = default(string), DPMProtectedItemExtendedInfo extendedInfo = default(DPMProtectedItemExtendedInfo)) + : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUTC, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests) { FriendlyName = friendlyName; BackupEngineName = backupEngineName; diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/GenericProtectedItem.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/GenericProtectedItem.cs index 9cdb3cd0e8aca..54bfaf7f34d1b 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/GenericProtectedItem.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/GenericProtectedItem.cs @@ -62,6 +62,9 @@ public GenericProtectedItem() /// whether the deferred deleted DS is to be purged soon /// Flag to identify that deferred deleted DS /// is to be moved into Pause state + /// ResourceGuardOperationRequests + /// on which LAC check will be performed /// Friendly name of the container. /// Indicates consistency of policy object /// and policy applied to this backup item. @@ -73,8 +76,8 @@ public GenericProtectedItem() /// Loosely coupled (type, value) /// associations (example - parent of a protected item) /// Name of this backup item's fabric. - public GenericProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUTC = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), string friendlyName = default(string), string policyState = default(string), string protectionState = default(string), long? protectedItemId = default(long?), IDictionary sourceAssociations = default(IDictionary), string fabricName = default(string)) - : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUTC, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate) + public GenericProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUTC = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), IList resourceGuardOperationRequests = default(IList), string friendlyName = default(string), string policyState = default(string), string protectionState = default(string), long? protectedItemId = default(long?), IDictionary sourceAssociations = default(IDictionary), string fabricName = default(string)) + : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUTC, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests) { FriendlyName = friendlyName; PolicyState = policyState; diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/GenericProtectionPolicy.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/GenericProtectionPolicy.cs index 9acba16585315..05c25c272373c 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/GenericProtectionPolicy.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/GenericProtectionPolicy.cs @@ -33,13 +33,15 @@ public GenericProtectionPolicy() /// /// Number of items associated with /// this policy. + /// ResourceGuard + /// Operation Requests /// List of sub-protection policies /// which includes schedule and retention /// TimeZone optional input as string. For /// example: TimeZone = "Pacific Standard Time". /// Name of this policy's fabric. - public GenericProtectionPolicy(int? protectedItemsCount = default(int?), IList subProtectionPolicy = default(IList), string timeZone = default(string), string fabricName = default(string)) - : base(protectedItemsCount) + public GenericProtectionPolicy(int? protectedItemsCount = default(int?), IList resourceGuardOperationRequests = default(IList), IList subProtectionPolicy = default(IList), string timeZone = default(string), string fabricName = default(string)) + : base(protectedItemsCount, resourceGuardOperationRequests) { SubProtectionPolicy = subProtectionPolicy; TimeZone = timeZone; diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/MabFileFolderProtectedItem.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/MabFileFolderProtectedItem.cs index 067b4bff698c2..9669743c67d12 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/MabFileFolderProtectedItem.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/MabFileFolderProtectedItem.cs @@ -11,6 +11,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; using System.Linq; /// @@ -60,6 +62,9 @@ public MabFileFolderProtectedItem() /// whether the deferred deleted DS is to be purged soon /// Flag to identify that deferred deleted DS /// is to be moved into Pause state + /// ResourceGuardOperationRequests + /// on which LAC check will be performed /// Friendly name of this backup /// item. /// Name of the computer associated with @@ -74,8 +79,8 @@ public MabFileFolderProtectedItem() /// deletion in UTC /// Additional information with this backup /// item. - public MabFileFolderProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUTC = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), string friendlyName = default(string), string computerName = default(string), string lastBackupStatus = default(string), System.DateTime? lastBackupTime = default(System.DateTime?), string protectionState = default(string), long? deferredDeleteSyncTimeInUTC = default(long?), MabFileFolderProtectedItemExtendedInfo extendedInfo = default(MabFileFolderProtectedItemExtendedInfo)) - : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUTC, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate) + public MabFileFolderProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUTC = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), IList resourceGuardOperationRequests = default(IList), string friendlyName = default(string), string computerName = default(string), string lastBackupStatus = default(string), System.DateTime? lastBackupTime = default(System.DateTime?), string protectionState = default(string), long? deferredDeleteSyncTimeInUTC = default(long?), MabFileFolderProtectedItemExtendedInfo extendedInfo = default(MabFileFolderProtectedItemExtendedInfo)) + : base(backupManagementType, workloadType, containerName, sourceResourceId, policyId, lastRecoveryPoint, backupSetName, createMode, deferredDeleteTimeInUTC, isScheduledForDeferredDelete, deferredDeleteTimeRemaining, isDeferredDeleteScheduleUpcoming, isRehydrate, resourceGuardOperationRequests) { FriendlyName = friendlyName; ComputerName = computerName; diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/MabProtectionPolicy.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/MabProtectionPolicy.cs index bb3a53040905b..b27b8a6cbdce4 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/MabProtectionPolicy.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/MabProtectionPolicy.cs @@ -11,6 +11,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; using System.Linq; /// @@ -32,11 +34,13 @@ public MabProtectionPolicy() /// /// Number of items associated with /// this policy. + /// ResourceGuard + /// Operation Requests /// Backup schedule of backup /// policy. /// Retention policy details. - public MabProtectionPolicy(int? protectedItemsCount = default(int?), SchedulePolicy schedulePolicy = default(SchedulePolicy), RetentionPolicy retentionPolicy = default(RetentionPolicy)) - : base(protectedItemsCount) + public MabProtectionPolicy(int? protectedItemsCount = default(int?), IList resourceGuardOperationRequests = default(IList), SchedulePolicy schedulePolicy = default(SchedulePolicy), RetentionPolicy retentionPolicy = default(RetentionPolicy)) + : base(protectedItemsCount, resourceGuardOperationRequests) { SchedulePolicy = schedulePolicy; RetentionPolicy = retentionPolicy; diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/ProtectedItem.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/ProtectedItem.cs index 6a6a16901e726..d4728cfe4ce6c 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/ProtectedItem.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/ProtectedItem.cs @@ -11,6 +11,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; using System.Linq; /// @@ -60,7 +62,10 @@ public ProtectedItem() /// whether the deferred deleted DS is to be purged soon /// Flag to identify that deferred deleted DS /// is to be moved into Pause state - public ProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUTC = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?)) + /// ResourceGuardOperationRequests + /// on which LAC check will be performed + public ProtectedItem(string backupManagementType = default(string), string workloadType = default(string), string containerName = default(string), string sourceResourceId = default(string), string policyId = default(string), System.DateTime? lastRecoveryPoint = default(System.DateTime?), string backupSetName = default(string), string createMode = default(string), System.DateTime? deferredDeleteTimeInUTC = default(System.DateTime?), bool? isScheduledForDeferredDelete = default(bool?), string deferredDeleteTimeRemaining = default(string), bool? isDeferredDeleteScheduleUpcoming = default(bool?), bool? isRehydrate = default(bool?), IList resourceGuardOperationRequests = default(IList)) { BackupManagementType = backupManagementType; WorkloadType = workloadType; @@ -75,6 +80,7 @@ public ProtectedItem() DeferredDeleteTimeRemaining = deferredDeleteTimeRemaining; IsDeferredDeleteScheduleUpcoming = isDeferredDeleteScheduleUpcoming; IsRehydrate = isRehydrate; + ResourceGuardOperationRequests = resourceGuardOperationRequests; CustomInit(); } @@ -176,5 +182,12 @@ public ProtectedItem() [JsonProperty(PropertyName = "isRehydrate")] public bool? IsRehydrate { get; set; } + /// + /// Gets or sets resourceGuardOperationRequests on which LAC check will + /// be performed + /// + [JsonProperty(PropertyName = "resourceGuardOperationRequests")] + public IList ResourceGuardOperationRequests { get; set; } + } } diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/ProtectionPolicy.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/ProtectionPolicy.cs index 891a543d56261..31cc2b941fa42 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/ProtectionPolicy.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/ProtectionPolicy.cs @@ -11,6 +11,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; using System.Linq; /// @@ -32,9 +34,12 @@ public ProtectionPolicy() /// /// Number of items associated with /// this policy. - public ProtectionPolicy(int? protectedItemsCount = default(int?)) + /// ResourceGuard + /// Operation Requests + public ProtectionPolicy(int? protectedItemsCount = default(int?), IList resourceGuardOperationRequests = default(IList)) { ProtectedItemsCount = protectedItemsCount; + ResourceGuardOperationRequests = resourceGuardOperationRequests; CustomInit(); } @@ -49,5 +54,11 @@ public ProtectionPolicy() [JsonProperty(PropertyName = "protectedItemsCount")] public int? ProtectedItemsCount { get; set; } + /// + /// Gets or sets resourceGuard Operation Requests + /// + [JsonProperty(PropertyName = "resourceGuardOperationRequests")] + public IList ResourceGuardOperationRequests { get; set; } + } } diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/ResourceGuardOperationDetail.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/ResourceGuardOperationDetail.cs new file mode 100644 index 0000000000000..a22abdf8ec3ec --- /dev/null +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/ResourceGuardOperationDetail.cs @@ -0,0 +1,54 @@ +// +// 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.RecoveryServices.Backup.Models +{ + using Newtonsoft.Json; + using System.Linq; + + public partial class ResourceGuardOperationDetail + { + /// + /// Initializes a new instance of the ResourceGuardOperationDetail + /// class. + /// + public ResourceGuardOperationDetail() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ResourceGuardOperationDetail + /// class. + /// + public ResourceGuardOperationDetail(string vaultCriticalOperation = default(string), string defaultResourceRequest = default(string)) + { + VaultCriticalOperation = vaultCriticalOperation; + DefaultResourceRequest = defaultResourceRequest; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// + [JsonProperty(PropertyName = "vaultCriticalOperation")] + public string VaultCriticalOperation { get; set; } + + /// + /// + [JsonProperty(PropertyName = "defaultResourceRequest")] + public string DefaultResourceRequest { get; set; } + + } +} diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/ResourceGuardProxyBase.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/ResourceGuardProxyBase.cs new file mode 100644 index 0000000000000..9f2b1a84170c5 --- /dev/null +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/ResourceGuardProxyBase.cs @@ -0,0 +1,66 @@ +// +// 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.RecoveryServices.Backup.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + public partial class ResourceGuardProxyBase + { + /// + /// Initializes a new instance of the ResourceGuardProxyBase class. + /// + public ResourceGuardProxyBase() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ResourceGuardProxyBase class. + /// + public ResourceGuardProxyBase(string resourceGuardResourceId = default(string), IList resourceGuardOperationDetails = default(IList), string lastUpdatedTime = default(string), string description = default(string)) + { + ResourceGuardResourceId = resourceGuardResourceId; + ResourceGuardOperationDetails = resourceGuardOperationDetails; + LastUpdatedTime = lastUpdatedTime; + Description = description; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// + [JsonProperty(PropertyName = "resourceGuardResourceId")] + public string ResourceGuardResourceId { get; set; } + + /// + /// + [JsonProperty(PropertyName = "resourceGuardOperationDetails")] + public IList ResourceGuardOperationDetails { get; set; } + + /// + /// + [JsonProperty(PropertyName = "lastUpdatedTime")] + public string LastUpdatedTime { get; set; } + + /// + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + } +} diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/ResourceGuardProxyBaseResource.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/ResourceGuardProxyBaseResource.cs new file mode 100644 index 0000000000000..3363535a5ca6a --- /dev/null +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/ResourceGuardProxyBaseResource.cs @@ -0,0 +1,63 @@ +// +// 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.RecoveryServices.Backup.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + public partial class ResourceGuardProxyBaseResource : Resource + { + /// + /// Initializes a new instance of the ResourceGuardProxyBaseResource + /// class. + /// + public ResourceGuardProxyBaseResource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ResourceGuardProxyBaseResource + /// class. + /// + /// Resource Id represents the complete path to the + /// resource. + /// Resource name associated with the + /// resource. + /// Resource type represents the complete path of + /// the form Namespace/ResourceType/ResourceType/... + /// Resource location. + /// Resource tags. + /// Optional ETag. + /// ResourceGuardProxyBaseResource + /// properties + public ResourceGuardProxyBaseResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), string eTag = default(string), ResourceGuardProxyBase properties = default(ResourceGuardProxyBase)) + : base(id, name, type, location, tags, eTag) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets resourceGuardProxyBaseResource properties + /// + [JsonProperty(PropertyName = "properties")] + public ResourceGuardProxyBase Properties { get; set; } + + } +} diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/SecurityPinBase.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/SecurityPinBase.cs new file mode 100644 index 0000000000000..9c878f898694d --- /dev/null +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/SecurityPinBase.cs @@ -0,0 +1,54 @@ +// +// 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.RecoveryServices.Backup.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Base class for get security pin request body + /// + public partial class SecurityPinBase + { + /// + /// Initializes a new instance of the SecurityPinBase class. + /// + public SecurityPinBase() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SecurityPinBase class. + /// + /// ResourceGuard + /// Operation Requests + public SecurityPinBase(IList resourceGuardOperationRequests = default(IList)) + { + ResourceGuardOperationRequests = resourceGuardOperationRequests; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets resourceGuard Operation Requests + /// + [JsonProperty(PropertyName = "resourceGuardOperationRequests")] + public IList ResourceGuardOperationRequests { get; set; } + + } +} diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/UnlockDeleteRequest.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/UnlockDeleteRequest.cs new file mode 100644 index 0000000000000..6d2ba6ffe6667 --- /dev/null +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/UnlockDeleteRequest.cs @@ -0,0 +1,57 @@ +// +// 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.RecoveryServices.Backup.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Request body of unlock delete API. + /// + public partial class UnlockDeleteRequest + { + /// + /// Initializes a new instance of the UnlockDeleteRequest class. + /// + public UnlockDeleteRequest() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the UnlockDeleteRequest class. + /// + public UnlockDeleteRequest(IList resourceGuardOperationRequests = default(IList), string resourceToBeDeleted = default(string)) + { + ResourceGuardOperationRequests = resourceGuardOperationRequests; + ResourceToBeDeleted = resourceToBeDeleted; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// + [JsonProperty(PropertyName = "resourceGuardOperationRequests")] + public IList ResourceGuardOperationRequests { get; set; } + + /// + /// + [JsonProperty(PropertyName = "resourceToBeDeleted")] + public string ResourceToBeDeleted { get; set; } + + } +} diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/UnlockDeleteResponse.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/UnlockDeleteResponse.cs new file mode 100644 index 0000000000000..f24dd04649443 --- /dev/null +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/UnlockDeleteResponse.cs @@ -0,0 +1,53 @@ +// +// 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.RecoveryServices.Backup.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Response of Unlock Delete API. + /// + public partial class UnlockDeleteResponse + { + /// + /// Initializes a new instance of the UnlockDeleteResponse class. + /// + public UnlockDeleteResponse() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the UnlockDeleteResponse class. + /// + /// This is the time when unlock + /// delete privileges will get expired. + public UnlockDeleteResponse(string unlockDeleteExpiryTime = default(string)) + { + UnlockDeleteExpiryTime = unlockDeleteExpiryTime; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets this is the time when unlock delete privileges will + /// get expired. + /// + [JsonProperty(PropertyName = "unlockDeleteExpiryTime")] + public string UnlockDeleteExpiryTime { get; set; } + + } +} diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/OperationOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/OperationOperations.cs index 1f61b2062471f..662158b1e4e77 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/OperationOperations.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/OperationOperations.cs @@ -103,7 +103,7 @@ internal OperationOperations(RecoveryServicesBackupClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); } - string apiVersion = "2021-06-01"; + string apiVersion = "2021-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Operations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Operations.cs index d618325314c4e..de930c3bef833 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Operations.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Operations.cs @@ -70,7 +70,7 @@ internal Operations(RecoveryServicesBackupClient client) /// public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - string apiVersion = "2021-06-01"; + string apiVersion = "2021-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/PrivateEndpointConnectionOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/PrivateEndpointConnectionOperations.cs index 8d81f7dd2178b..7114f9d26df8b 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/PrivateEndpointConnectionOperations.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/PrivateEndpointConnectionOperations.cs @@ -102,7 +102,7 @@ internal PrivateEndpointConnectionOperations(RecoveryServicesBackupClient client { throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName"); } - string apiVersion = "2021-06-01"; + string apiVersion = "2021-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -365,7 +365,7 @@ internal PrivateEndpointConnectionOperations(RecoveryServicesBackupClient client { throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); } - string apiVersion = "2021-06-01"; + string apiVersion = "2021-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -591,7 +591,7 @@ internal PrivateEndpointConnectionOperations(RecoveryServicesBackupClient client { throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName"); } - string apiVersion = "2021-06-01"; + string apiVersion = "2021-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/PrivateEndpointOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/PrivateEndpointOperations.cs index 4a27325e6133d..854e828036189 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/PrivateEndpointOperations.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/PrivateEndpointOperations.cs @@ -109,7 +109,7 @@ internal PrivateEndpointOperations(RecoveryServicesBackupClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); } - string apiVersion = "2021-06-01"; + string apiVersion = "2021-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectableContainersOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectableContainersOperations.cs index e0b41125623ca..1bb1b0d65bfa0 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectableContainersOperations.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectableContainersOperations.cs @@ -105,7 +105,7 @@ internal ProtectableContainersOperations(RecoveryServicesBackupClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); } - string apiVersion = "2021-06-01"; + string apiVersion = "2021-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectedItemOperationResultsOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectedItemOperationResultsOperations.cs index 6f1343165af37..33f14a1b2792a 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectedItemOperationResultsOperations.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectedItemOperationResultsOperations.cs @@ -124,7 +124,7 @@ internal ProtectedItemOperationResultsOperations(RecoveryServicesBackupClient cl { throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); } - string apiVersion = "2021-06-01"; + string apiVersion = "2021-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectedItemOperationStatusesOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectedItemOperationStatusesOperations.cs index 170018cce84e8..13d2208bc3462 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectedItemOperationStatusesOperations.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectedItemOperationStatusesOperations.cs @@ -128,7 +128,7 @@ internal ProtectedItemOperationStatusesOperations(RecoveryServicesBackupClient c { throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); } - string apiVersion = "2021-06-01"; + string apiVersion = "2021-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectedItemsOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectedItemsOperations.cs index 381dca1b5cc38..e298c119150c4 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectedItemsOperations.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectedItemsOperations.cs @@ -122,7 +122,7 @@ internal ProtectedItemsOperations(RecoveryServicesBackupClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "protectedItemName"); } - string apiVersion = "2021-06-01"; + string apiVersion = "2021-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -363,7 +363,7 @@ internal ProtectedItemsOperations(RecoveryServicesBackupClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); } - string apiVersion = "2021-06-01"; + string apiVersion = "2021-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -591,7 +591,7 @@ internal ProtectedItemsOperations(RecoveryServicesBackupClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "protectedItemName"); } - string apiVersion = "2021-06-01"; + string apiVersion = "2021-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectionContainerOperationResultsOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectionContainerOperationResultsOperations.cs index d4bf04c04aacc..0a2d76acdd265 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectionContainerOperationResultsOperations.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectionContainerOperationResultsOperations.cs @@ -117,7 +117,7 @@ internal ProtectionContainerOperationResultsOperations(RecoveryServicesBackupCli { throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); } - string apiVersion = "2021-06-01"; + string apiVersion = "2021-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectionContainerRefreshOperationResultsOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectionContainerRefreshOperationResultsOperations.cs index 2ced16aa37bbc..a0480a18ba2a3 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectionContainerRefreshOperationResultsOperations.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectionContainerRefreshOperationResultsOperations.cs @@ -108,7 +108,7 @@ internal ProtectionContainerRefreshOperationResultsOperations(RecoveryServicesBa { throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); } - string apiVersion = "2021-06-01"; + string apiVersion = "2021-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectionContainersOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectionContainersOperations.cs index 56cf8ae99aaea..e515f34f80d71 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectionContainersOperations.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectionContainersOperations.cs @@ -111,7 +111,7 @@ internal ProtectionContainersOperations(RecoveryServicesBackupClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "containerName"); } - string apiVersion = "2021-06-01"; + string apiVersion = "2021-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -334,7 +334,7 @@ internal ProtectionContainersOperations(RecoveryServicesBackupClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); } - string apiVersion = "2021-06-01"; + string apiVersion = "2021-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -555,7 +555,7 @@ internal ProtectionContainersOperations(RecoveryServicesBackupClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "containerName"); } - string apiVersion = "2021-06-01"; + string apiVersion = "2021-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -754,7 +754,7 @@ internal ProtectionContainersOperations(RecoveryServicesBackupClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "containerName"); } - string apiVersion = "2021-06-01"; + string apiVersion = "2021-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -954,7 +954,7 @@ internal ProtectionContainersOperations(RecoveryServicesBackupClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); } - string apiVersion = "2021-06-01"; + string apiVersion = "2021-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectionIntentOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectionIntentOperations.cs index 033638808a733..0bd855445c488 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectionIntentOperations.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectionIntentOperations.cs @@ -97,7 +97,7 @@ internal ProtectionIntentOperations(RecoveryServicesBackupClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); } - string apiVersion = "2021-06-01"; + string apiVersion = "2021-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -313,7 +313,7 @@ internal ProtectionIntentOperations(RecoveryServicesBackupClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "intentObjectName"); } - string apiVersion = "2021-06-01"; + string apiVersion = "2021-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -534,7 +534,7 @@ internal ProtectionIntentOperations(RecoveryServicesBackupClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); } - string apiVersion = "2021-06-01"; + string apiVersion = "2021-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -751,7 +751,7 @@ internal ProtectionIntentOperations(RecoveryServicesBackupClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "intentObjectName"); } - string apiVersion = "2021-06-01"; + string apiVersion = "2021-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectionPoliciesOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectionPoliciesOperations.cs index 513e486fdab3e..5b0884e9ad384 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectionPoliciesOperations.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectionPoliciesOperations.cs @@ -105,7 +105,7 @@ internal ProtectionPoliciesOperations(RecoveryServicesBackupClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "policyName"); } - string apiVersion = "2021-06-01"; + string apiVersion = "2021-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -318,7 +318,7 @@ internal ProtectionPoliciesOperations(RecoveryServicesBackupClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); } - string apiVersion = "2021-06-01"; + string apiVersion = "2021-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -556,7 +556,7 @@ internal ProtectionPoliciesOperations(RecoveryServicesBackupClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "policyName"); } - string apiVersion = "2021-06-01"; + string apiVersion = "2021-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectionPolicyOperationResultsOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectionPolicyOperationResultsOperations.cs index 9f12b3645a5c9..8924794f91958 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectionPolicyOperationResultsOperations.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectionPolicyOperationResultsOperations.cs @@ -110,7 +110,7 @@ internal ProtectionPolicyOperationResultsOperations(RecoveryServicesBackupClient { throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); } - string apiVersion = "2021-06-01"; + string apiVersion = "2021-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectionPolicyOperationStatusesOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectionPolicyOperationStatusesOperations.cs index 41bdcaabe3ead..e4a9b967fab8c 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectionPolicyOperationStatusesOperations.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ProtectionPolicyOperationStatusesOperations.cs @@ -115,7 +115,7 @@ internal ProtectionPolicyOperationStatusesOperations(RecoveryServicesBackupClien { throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); } - string apiVersion = "2021-06-01"; + string apiVersion = "2021-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/RecoveryPointsOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/RecoveryPointsOperations.cs index bb91fe099895c..10c16176bcb80 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/RecoveryPointsOperations.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/RecoveryPointsOperations.cs @@ -120,7 +120,7 @@ internal RecoveryPointsOperations(RecoveryServicesBackupClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "protectedItemName"); } - string apiVersion = "2021-06-01"; + string apiVersion = "2021-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -361,7 +361,7 @@ internal RecoveryPointsOperations(RecoveryServicesBackupClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "recoveryPointId"); } - string apiVersion = "2021-06-01"; + string apiVersion = "2021-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/RecoveryPointsRecommendedForMoveOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/RecoveryPointsRecommendedForMoveOperations.cs index 6e3afea0bfbb4..9a840fc3129b2 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/RecoveryPointsRecommendedForMoveOperations.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/RecoveryPointsRecommendedForMoveOperations.cs @@ -120,7 +120,7 @@ internal RecoveryPointsRecommendedForMoveOperations(RecoveryServicesBackupClient { throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); } - string apiVersion = "2021-06-01"; + string apiVersion = "2021-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/RecoveryServicesBackupClient.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/RecoveryServicesBackupClient.cs index bd631c348442b..9023410706324 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/RecoveryServicesBackupClient.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/RecoveryServicesBackupClient.cs @@ -71,6 +71,11 @@ public partial class RecoveryServicesBackupClient : ServiceClient public bool? GenerateClientRequestId { get; set; } + /// + /// Gets the IBackupResourceStorageConfigsNonCRROperations. + /// + public virtual IBackupResourceStorageConfigsNonCRROperations BackupResourceStorageConfigsNonCRR { get; private set; } + /// /// Gets the IProtectionIntentOperations. /// @@ -281,6 +286,16 @@ public partial class RecoveryServicesBackupClient : ServiceClient public virtual IRecoveryPointsRecommendedForMoveOperations RecoveryPointsRecommendedForMove { get; private set; } + /// + /// Gets the IResourceGuardProxiesOperations. + /// + public virtual IResourceGuardProxiesOperations ResourceGuardProxies { get; private set; } + + /// + /// Gets the IResourceGuardProxyOperations. + /// + public virtual IResourceGuardProxyOperations ResourceGuardProxy { get; private set; } + /// /// Gets the IBackupUsageSummariesCRROperations. /// @@ -572,6 +587,7 @@ public RecoveryServicesBackupClient(System.Uri baseUri, ServiceClientCredentials /// private void Initialize() { + BackupResourceStorageConfigsNonCRR = new BackupResourceStorageConfigsNonCRROperations(this); ProtectionIntent = new ProtectionIntentOperations(this); BackupStatus = new BackupStatusOperations(this); FeatureSupport = new FeatureSupportOperations(this); @@ -614,6 +630,8 @@ private void Initialize() BackupProtectionContainers = new BackupProtectionContainersOperations(this); SecurityPINs = new SecurityPINsOperations(this); RecoveryPointsRecommendedForMove = new RecoveryPointsRecommendedForMoveOperations(this); + ResourceGuardProxies = new ResourceGuardProxiesOperations(this); + ResourceGuardProxy = new ResourceGuardProxyOperations(this); BackupUsageSummariesCRR = new BackupUsageSummariesCRROperations(this); AadProperties = new AadPropertiesOperations(this); CrossRegionRestore = new CrossRegionRestoreOperations(this); @@ -749,7 +767,7 @@ private void Initialize() { throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); } - string apiVersion = "2021-06-01"; + string apiVersion = "2021-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1035,7 +1053,7 @@ private void Initialize() { parameters.Validate(); } - string apiVersion = "2021-06-01"; + string apiVersion = "2021-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1222,7 +1240,7 @@ private void Initialize() { parameters.Validate(); } - string apiVersion = "2021-06-01"; + string apiVersion = "2021-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1429,7 +1447,7 @@ private void Initialize() { throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); } - string apiVersion = "2021-06-01"; + string apiVersion = "2021-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ResourceGuardProxiesOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ResourceGuardProxiesOperations.cs new file mode 100644 index 0000000000000..2f60926a9399d --- /dev/null +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ResourceGuardProxiesOperations.cs @@ -0,0 +1,422 @@ +// +// 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.RecoveryServices.Backup +{ + 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; + + /// + /// ResourceGuardProxiesOperations operations. + /// + internal partial class ResourceGuardProxiesOperations : IServiceOperations, IResourceGuardProxiesOperations + { + /// + /// Initializes a new instance of the ResourceGuardProxiesOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal ResourceGuardProxiesOperations(RecoveryServicesBackupClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the RecoveryServicesBackupClient + /// + public RecoveryServicesBackupClient Client { get; private set; } + + /// + /// List the ResourceGuardProxies under vault + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is + /// present. + /// + /// + /// 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>> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (vaultName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string apiVersion = "2021-07-01"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("vaultName", vaultName); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Get", 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.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies").ToString(); + _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + 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("GET"); + _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); + } + 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)); + 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; + } + + /// + /// List the ResourceGuardProxies under vault + /// + /// + /// The NextLink from the previous successful call to List 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>> GetNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new 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"); + _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); + } + 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)); + 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; + } + + } +} diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ResourceGuardProxiesOperationsExtensions.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ResourceGuardProxiesOperationsExtensions.cs new file mode 100644 index 0000000000000..e33c2d6caa5c8 --- /dev/null +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ResourceGuardProxiesOperationsExtensions.cs @@ -0,0 +1,101 @@ +// +// 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.RecoveryServices.Backup +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for ResourceGuardProxiesOperations. + /// + public static partial class ResourceGuardProxiesOperationsExtensions + { + /// + /// List the ResourceGuardProxies under vault + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is + /// present. + /// + public static IPage Get(this IResourceGuardProxiesOperations operations, string vaultName, string resourceGroupName) + { + return operations.GetAsync(vaultName, resourceGroupName).GetAwaiter().GetResult(); + } + + /// + /// List the ResourceGuardProxies under vault + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is + /// present. + /// + /// + /// The cancellation token. + /// + public static async Task> GetAsync(this IResourceGuardProxiesOperations operations, string vaultName, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(vaultName, resourceGroupName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// List the ResourceGuardProxies under vault + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage GetNext(this IResourceGuardProxiesOperations operations, string nextPageLink) + { + return operations.GetNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// List the ResourceGuardProxies under vault + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> GetNextAsync(this IResourceGuardProxiesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ResourceGuardProxyOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ResourceGuardProxyOperations.cs new file mode 100644 index 0000000000000..de31e4bfaacbd --- /dev/null +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ResourceGuardProxyOperations.cs @@ -0,0 +1,861 @@ +// +// 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.RecoveryServices.Backup +{ + 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; + + /// + /// ResourceGuardProxyOperations operations. + /// + internal partial class ResourceGuardProxyOperations : IServiceOperations, IResourceGuardProxyOperations + { + /// + /// Initializes a new instance of the ResourceGuardProxyOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal ResourceGuardProxyOperations(RecoveryServicesBackupClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the RecoveryServicesBackupClient + /// + public RecoveryServicesBackupClient Client { get; private set; } + + /// + /// Returns ResourceGuardProxy under vault and with the name referenced in + /// request + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is + /// present. + /// + /// + /// + /// + /// 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> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string resourceGuardProxyName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (vaultName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGuardProxyName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGuardProxyName"); + } + string apiVersion = "2021-07-01"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("vaultName", vaultName); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("resourceGuardProxyName", resourceGuardProxyName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Get", 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.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}").ToString(); + _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGuardProxyName}", System.Uri.EscapeDataString(resourceGuardProxyName)); + 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("GET"); + _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); + } + 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)); + 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; + } + + /// + /// Add or Update ResourceGuardProxy under vault + /// Secures vault critical operations + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is + /// present. + /// + /// + /// + /// + /// 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> PutWithHttpMessagesAsync(string vaultName, string resourceGroupName, string resourceGuardProxyName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (vaultName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGuardProxyName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGuardProxyName"); + } + string apiVersion = "2021-07-01"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("vaultName", vaultName); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("resourceGuardProxyName", resourceGuardProxyName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Put", 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.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}").ToString(); + _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGuardProxyName}", System.Uri.EscapeDataString(resourceGuardProxyName)); + 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("PUT"); + _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); + } + 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)); + 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; + } + + /// + /// Delete ResourceGuardProxy under vault + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is + /// present. + /// + /// + /// + /// + /// 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 DeleteWithHttpMessagesAsync(string vaultName, string resourceGroupName, string resourceGuardProxyName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (vaultName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGuardProxyName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGuardProxyName"); + } + string apiVersion = "2021-07-01"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("vaultName", vaultName); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("resourceGuardProxyName", resourceGuardProxyName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Delete", 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.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}").ToString(); + _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGuardProxyName}", System.Uri.EscapeDataString(resourceGuardProxyName)); + 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("DELETE"); + _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); + } + 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)); + 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; + } + + /// + /// Secures delete ResourceGuardProxy operations. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is + /// present. + /// + /// + /// + /// + /// Request body for 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> UnlockDeleteWithHttpMessagesAsync(string vaultName, string resourceGroupName, string resourceGuardProxyName, UnlockDeleteRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (vaultName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGuardProxyName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGuardProxyName"); + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + string apiVersion = "2021-07-01"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("vaultName", vaultName); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("resourceGuardProxyName", resourceGuardProxyName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "UnlockDelete", 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.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}/unlockDelete").ToString(); + _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGuardProxyName}", System.Uri.EscapeDataString(resourceGuardProxyName)); + 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(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, 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); + } + 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)); + 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; + } + + } +} diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ResourceGuardProxyOperationsExtensions.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ResourceGuardProxyOperationsExtensions.cs new file mode 100644 index 0000000000000..7bb8adf98f049 --- /dev/null +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ResourceGuardProxyOperationsExtensions.cs @@ -0,0 +1,216 @@ +// +// 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.RecoveryServices.Backup +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for ResourceGuardProxyOperations. + /// + public static partial class ResourceGuardProxyOperationsExtensions + { + /// + /// Returns ResourceGuardProxy under vault and with the name referenced in + /// request + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is + /// present. + /// + /// + /// + public static ResourceGuardProxyBaseResource Get(this IResourceGuardProxyOperations operations, string vaultName, string resourceGroupName, string resourceGuardProxyName) + { + return operations.GetAsync(vaultName, resourceGroupName, resourceGuardProxyName).GetAwaiter().GetResult(); + } + + /// + /// Returns ResourceGuardProxy under vault and with the name referenced in + /// request + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is + /// present. + /// + /// + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IResourceGuardProxyOperations operations, string vaultName, string resourceGroupName, string resourceGuardProxyName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(vaultName, resourceGroupName, resourceGuardProxyName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Add or Update ResourceGuardProxy under vault + /// Secures vault critical operations + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is + /// present. + /// + /// + /// + public static ResourceGuardProxyBaseResource Put(this IResourceGuardProxyOperations operations, string vaultName, string resourceGroupName, string resourceGuardProxyName) + { + return operations.PutAsync(vaultName, resourceGroupName, resourceGuardProxyName).GetAwaiter().GetResult(); + } + + /// + /// Add or Update ResourceGuardProxy under vault + /// Secures vault critical operations + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is + /// present. + /// + /// + /// + /// + /// The cancellation token. + /// + public static async Task PutAsync(this IResourceGuardProxyOperations operations, string vaultName, string resourceGroupName, string resourceGuardProxyName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PutWithHttpMessagesAsync(vaultName, resourceGroupName, resourceGuardProxyName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Delete ResourceGuardProxy under vault + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is + /// present. + /// + /// + /// + public static void Delete(this IResourceGuardProxyOperations operations, string vaultName, string resourceGroupName, string resourceGuardProxyName) + { + operations.DeleteAsync(vaultName, resourceGroupName, resourceGuardProxyName).GetAwaiter().GetResult(); + } + + /// + /// Delete ResourceGuardProxy under vault + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is + /// present. + /// + /// + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IResourceGuardProxyOperations operations, string vaultName, string resourceGroupName, string resourceGuardProxyName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(vaultName, resourceGroupName, resourceGuardProxyName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Secures delete ResourceGuardProxy operations. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is + /// present. + /// + /// + /// + /// + /// Request body for operation + /// + public static UnlockDeleteResponse UnlockDelete(this IResourceGuardProxyOperations operations, string vaultName, string resourceGroupName, string resourceGuardProxyName, UnlockDeleteRequest parameters) + { + return operations.UnlockDeleteAsync(vaultName, resourceGroupName, resourceGuardProxyName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Secures delete ResourceGuardProxy operations. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the recovery services vault. + /// + /// + /// The name of the resource group where the recovery services vault is + /// present. + /// + /// + /// + /// + /// Request body for operation + /// + /// + /// The cancellation token. + /// + public static async Task UnlockDeleteAsync(this IResourceGuardProxyOperations operations, string vaultName, string resourceGroupName, string resourceGuardProxyName, UnlockDeleteRequest parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.UnlockDeleteWithHttpMessagesAsync(vaultName, resourceGroupName, resourceGuardProxyName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/RestoresOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/RestoresOperations.cs index 7cfcda6e1e90f..43ca0bf1dc3a5 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/RestoresOperations.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/RestoresOperations.cs @@ -169,7 +169,7 @@ internal RestoresOperations(RecoveryServicesBackupClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); } - string apiVersion = "2021-06-01"; + string apiVersion = "2021-07-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/SdkInfo_RecoveryServicesBackupClient.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/SdkInfo_RecoveryServicesBackupClient.cs index f35a50ca81ca3..2c24cd499fec0 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/SdkInfo_RecoveryServicesBackupClient.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/SdkInfo_RecoveryServicesBackupClient.cs @@ -20,75 +20,67 @@ public static IEnumerable> ApiInfo_RecoveryService return new Tuple[] { new Tuple("RecoveryServices", "AadProperties", "2018-12-20"), - new Tuple("RecoveryServices", "BMSPrepareDataMove", "2021-06-01"), - new Tuple("RecoveryServices", "BMSPrepareDataMoveOperationResult", "2021-06-01"), - new Tuple("RecoveryServices", "BMSTriggerDataMove", "2021-06-01"), + new Tuple("RecoveryServices", "BMSPrepareDataMove", "2021-07-01"), + new Tuple("RecoveryServices", "BMSPrepareDataMoveOperationResult", "2021-07-01"), + new Tuple("RecoveryServices", "BMSTriggerDataMove", "2021-07-01"), new Tuple("RecoveryServices", "BackupCrrJobDetails", "2018-12-20"), new Tuple("RecoveryServices", "BackupCrrJobs", "2018-12-20"), - new Tuple("RecoveryServices", "BackupEngines", "2021-06-01"), - new Tuple("RecoveryServices", "BackupJobs", "2021-06-01"), - new Tuple("RecoveryServices", "BackupOperationResults", "2021-06-01"), - new Tuple("RecoveryServices", "BackupOperationStatuses", "2021-06-01"), - new Tuple("RecoveryServices", "BackupPolicies", "2021-06-01"), - new Tuple("RecoveryServices", "BackupProtectableItems", "2021-06-01"), - new Tuple("RecoveryServices", "BackupProtectedItems", "2021-06-01"), + new Tuple("RecoveryServices", "BackupEngines", "2021-07-01"), + new Tuple("RecoveryServices", "BackupJobs", "2021-07-01"), + new Tuple("RecoveryServices", "BackupOperationResults", "2021-07-01"), + new Tuple("RecoveryServices", "BackupOperationStatuses", "2021-07-01"), + new Tuple("RecoveryServices", "BackupPolicies", "2021-07-01"), + new Tuple("RecoveryServices", "BackupProtectableItems", "2021-07-01"), + new Tuple("RecoveryServices", "BackupProtectedItems", "2021-07-01"), new Tuple("RecoveryServices", "BackupProtectedItemsCrr", "2018-12-20"), - new Tuple("RecoveryServices", "BackupProtectionContainers", "2021-06-01"), - new Tuple("RecoveryServices", "BackupProtectionIntent", "2021-06-01"), - new Tuple("RecoveryServices", "BackupResourceEncryptionConfigs", "2021-06-01"), + new Tuple("RecoveryServices", "BackupProtectionContainers", "2021-07-01"), + new Tuple("RecoveryServices", "BackupProtectionIntent", "2021-07-01"), + new Tuple("RecoveryServices", "BackupResourceEncryptionConfigs", "2021-07-01"), new Tuple("RecoveryServices", "BackupResourceStorageConfigs", "2018-12-20"), - new Tuple("RecoveryServices", "BackupResourceVaultConfigs", "2021-06-01"), - new Tuple("RecoveryServices", "BackupStatus", "2021-06-01"), - new Tuple("RecoveryServices", "BackupUsageSummaries", "2021-06-01"), + new Tuple("RecoveryServices", "BackupResourceStorageConfigsNonCRR", "2021-07-01"), + new Tuple("RecoveryServices", "BackupResourceVaultConfigs", "2021-07-01"), + new Tuple("RecoveryServices", "BackupStatus", "2021-07-01"), + new Tuple("RecoveryServices", "BackupUsageSummaries", "2021-07-01"), new Tuple("RecoveryServices", "BackupUsageSummariesCRR", "2018-12-20"), - new Tuple("RecoveryServices", "BackupWorkloadItems", "2021-06-01"), - new Tuple("RecoveryServices", "Backups", "2021-06-01"), + new Tuple("RecoveryServices", "BackupWorkloadItems", "2021-07-01"), + new Tuple("RecoveryServices", "Backups", "2021-07-01"), new Tuple("RecoveryServices", "CrossRegionRestore", "2018-12-20"), new Tuple("RecoveryServices", "CrrOperationResults", "2018-12-20"), new Tuple("RecoveryServices", "CrrOperationStatus", "2018-12-20"), - new Tuple("RecoveryServices", "ExportJobsOperationResults", "2021-06-01"), - new Tuple("RecoveryServices", "FeatureSupport", "2021-06-01"), - new Tuple("RecoveryServices", "GetOperationStatus", "2021-06-01"), - new Tuple("RecoveryServices", "ItemLevelRecoveryConnections", "2021-06-01"), - new Tuple("RecoveryServices", "JobCancellations", "2021-06-01"), - new Tuple("RecoveryServices", "JobDetails", "2021-06-01"), - new Tuple("RecoveryServices", "JobOperationResults", "2021-06-01"), - new Tuple("RecoveryServices", "Jobs", "2021-06-01"), - new Tuple("RecoveryServices", "MoveRecoveryPoint", "2021-06-01"), - new Tuple("RecoveryServices", "Operation", "2021-06-01"), - new Tuple("RecoveryServices", "Operations", "2021-06-01"), - new Tuple("RecoveryServices", "PrivateEndpoint", "2021-06-01"), - new Tuple("RecoveryServices", "PrivateEndpointConnection", "2021-06-01"), - new Tuple("RecoveryServices", "ProtectableContainers", "2021-06-01"), - new Tuple("RecoveryServices", "ProtectedItemOperationResults", "2021-06-01"), - new Tuple("RecoveryServices", "ProtectedItemOperationStatuses", "2021-06-01"), - new Tuple("RecoveryServices", "ProtectedItems", "2021-06-01"), - new Tuple("RecoveryServices", "ProtectionContainerOperationResults", "2021-06-01"), - new Tuple("RecoveryServices", "ProtectionContainerRefreshOperationResults", "2021-06-01"), - new Tuple("RecoveryServices", "ProtectionContainers", "2021-06-01"), - new Tuple("RecoveryServices", "ProtectionIntent", "2021-06-01"), - new Tuple("RecoveryServices", "ProtectionPolicies", "2021-06-01"), - new Tuple("RecoveryServices", "ProtectionPolicyOperationResults", "2021-06-01"), - new Tuple("RecoveryServices", "ProtectionPolicyOperationStatuses", "2021-06-01"), + new Tuple("RecoveryServices", "ExportJobsOperationResults", "2021-07-01"), + new Tuple("RecoveryServices", "FeatureSupport", "2021-07-01"), + new Tuple("RecoveryServices", "GetOperationStatus", "2021-07-01"), + new Tuple("RecoveryServices", "ItemLevelRecoveryConnections", "2021-07-01"), + new Tuple("RecoveryServices", "JobCancellations", "2021-07-01"), + new Tuple("RecoveryServices", "JobDetails", "2021-07-01"), + new Tuple("RecoveryServices", "JobOperationResults", "2021-07-01"), + new Tuple("RecoveryServices", "Jobs", "2021-07-01"), + new Tuple("RecoveryServices", "MoveRecoveryPoint", "2021-07-01"), + new Tuple("RecoveryServices", "Operation", "2021-07-01"), + new Tuple("RecoveryServices", "Operations", "2021-07-01"), + new Tuple("RecoveryServices", "PrivateEndpoint", "2021-07-01"), + new Tuple("RecoveryServices", "PrivateEndpointConnection", "2021-07-01"), + new Tuple("RecoveryServices", "ProtectableContainers", "2021-07-01"), + new Tuple("RecoveryServices", "ProtectedItemOperationResults", "2021-07-01"), + new Tuple("RecoveryServices", "ProtectedItemOperationStatuses", "2021-07-01"), + new Tuple("RecoveryServices", "ProtectedItems", "2021-07-01"), + new Tuple("RecoveryServices", "ProtectionContainerOperationResults", "2021-07-01"), + new Tuple("RecoveryServices", "ProtectionContainerRefreshOperationResults", "2021-07-01"), + new Tuple("RecoveryServices", "ProtectionContainers", "2021-07-01"), + new Tuple("RecoveryServices", "ProtectionIntent", "2021-07-01"), + new Tuple("RecoveryServices", "ProtectionPolicies", "2021-07-01"), + new Tuple("RecoveryServices", "ProtectionPolicyOperationResults", "2021-07-01"), + new Tuple("RecoveryServices", "ProtectionPolicyOperationStatuses", "2021-07-01"), new Tuple("RecoveryServices", "RecoveryPoints", "2018-12-20"), - new Tuple("RecoveryServices", "RecoveryPoints", "2021-06-01"), + new Tuple("RecoveryServices", "RecoveryPoints", "2021-07-01"), new Tuple("RecoveryServices", "RecoveryPointsCrr", "2018-12-20"), - new Tuple("RecoveryServices", "RecoveryPointsRecommendedForMove", "2021-06-01"), - new Tuple("RecoveryServices", "Restores", "2021-06-01"), - new Tuple("RecoveryServices", "SecurityPINs", "2021-06-01"), + new Tuple("RecoveryServices", "RecoveryPointsRecommendedForMove", "2021-07-01"), + new Tuple("RecoveryServices", "ResourceGuardProxies", "2021-07-01"), + new Tuple("RecoveryServices", "ResourceGuardProxy", "2021-07-01"), + new Tuple("RecoveryServices", "Restores", "2021-07-01"), + new Tuple("RecoveryServices", "SecurityPINs", "2021-07-01"), }.AsEnumerable(); } } - // BEGIN: Code Generation Metadata Section - public static readonly String AutoRestVersion = "v2"; - public static readonly String AutoRestBootStrapperVersion = "autorest@3.2.3"; - public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/recoveryservicesbackup/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --csharp-sdks-folder=D:\\monikajainms\\azure-sdk-for-net\\sdk"; - public static readonly String GithubForkName = "Azure"; - public static readonly String GithubBranchName = "master"; - public static readonly String GithubCommidId = "7a4a64310bec1f7f59bbdd8e8ab04ca938cbc3e6"; - public static readonly String CodeGenerationErrors = ""; - public static readonly String GithubRepoName = "azure-rest-api-specs"; - // END: Code Generation Metadata Section } } - diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/SecurityPINsOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/SecurityPINsOperations.cs index cb0c24e2cf0b3..95ab346402209 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/SecurityPINsOperations.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/SecurityPINsOperations.cs @@ -60,6 +60,9 @@ internal SecurityPINsOperations(RecoveryServicesBackupClient client) /// The name of the resource group where the recovery services vault is /// present. /// + /// + /// ResourceGuard Operation Requests + /// /// /// Headers that will be added to request. /// @@ -81,7 +84,7 @@ internal SecurityPINsOperations(RecoveryServicesBackupClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, IList resourceGuardOperationRequests = default(IList), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (vaultName == null) { @@ -95,7 +98,13 @@ internal SecurityPINsOperations(RecoveryServicesBackupClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2021-06-01"; + string apiVersion = "2021-07-01"; + SecurityPinBase parameters = default(SecurityPinBase); + if (resourceGuardOperationRequests != null) + { + parameters = new SecurityPinBase(); + parameters.ResourceGuardOperationRequests = resourceGuardOperationRequests; + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -106,6 +115,7 @@ internal SecurityPINsOperations(RecoveryServicesBackupClient client) tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("parameters", parameters); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } @@ -158,6 +168,12 @@ internal SecurityPINsOperations(RecoveryServicesBackupClient client) // 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); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (Client.Credentials != null) { diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/SecurityPINsOperationsExtensions.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/SecurityPINsOperationsExtensions.cs index 946ea46602a60..edc950ce58aec 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/SecurityPINsOperationsExtensions.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/SecurityPINsOperationsExtensions.cs @@ -13,6 +13,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; + using System.Collections; + using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; @@ -34,9 +36,12 @@ public static partial class SecurityPINsOperationsExtensions /// The name of the resource group where the recovery services vault is /// present. /// - public static TokenInformation Get(this ISecurityPINsOperations operations, string vaultName, string resourceGroupName) + /// + /// ResourceGuard Operation Requests + /// + public static TokenInformation Get(this ISecurityPINsOperations operations, string vaultName, string resourceGroupName, IList resourceGuardOperationRequests = default(IList)) { - return operations.GetAsync(vaultName, resourceGroupName).GetAwaiter().GetResult(); + return operations.GetAsync(vaultName, resourceGroupName, resourceGuardOperationRequests).GetAwaiter().GetResult(); } /// @@ -52,12 +57,15 @@ public static TokenInformation Get(this ISecurityPINsOperations operations, stri /// The name of the resource group where the recovery services vault is /// present. /// + /// + /// ResourceGuard Operation Requests + /// /// /// The cancellation token. /// - public static async Task GetAsync(this ISecurityPINsOperations operations, string vaultName, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task GetAsync(this ISecurityPINsOperations operations, string vaultName, string resourceGroupName, IList resourceGuardOperationRequests = default(IList), CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.GetWithHttpMessagesAsync(vaultName, resourceGroupName, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.GetWithHttpMessagesAsync(vaultName, resourceGroupName, resourceGuardOperationRequests, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; }