diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/AadPropertiesOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/AadPropertiesOperations.cs
deleted file mode 100644
index 32083e4e98f4..000000000000
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/AadPropertiesOperations.cs
+++ /dev/null
@@ -1,239 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.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;
-
- ///
- /// AadPropertiesOperations operations.
- ///
- internal partial class AadPropertiesOperations : IServiceOperations, IAadPropertiesOperations
- {
- ///
- /// Initializes a new instance of the AadPropertiesOperations class.
- ///
- ///
- /// Reference to the service client.
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- internal AadPropertiesOperations(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 the AAD properties from target region BCM stamp.
- ///
- ///
- /// Azure region to hit Api
- ///
- ///
- /// 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 azureRegion, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (azureRegion == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "azureRegion");
- }
- if (Client.SubscriptionId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
- }
- string apiVersion = "2018-12-20";
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("apiVersion", apiVersion);
- tracingParameters.Add("azureRegion", azureRegion);
- 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}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupAadProperties/default").ToString();
- _url = _url.Replace("{azureRegion}", System.Uri.EscapeDataString(azureRegion));
- _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;
- }
-
- }
-}
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/AadPropertiesOperationsExtensions.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/AadPropertiesOperationsExtensions.cs
deleted file mode 100644
index c7f381cb17b1..000000000000
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/AadPropertiesOperationsExtensions.cs
+++ /dev/null
@@ -1,59 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.RecoveryServices.Backup
-{
- using Microsoft.Rest;
- using Microsoft.Rest.Azure;
- using Models;
- using System.Threading;
- using System.Threading.Tasks;
-
- ///
- /// Extension methods for AadPropertiesOperations.
- ///
- public static partial class AadPropertiesOperationsExtensions
- {
- ///
- /// Fetches the AAD properties from target region BCM stamp.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// Azure region to hit Api
- ///
- public static AADPropertiesResource Get(this IAadPropertiesOperations operations, string azureRegion)
- {
- return operations.GetAsync(azureRegion).GetAwaiter().GetResult();
- }
-
- ///
- /// Fetches the AAD properties from target region BCM stamp.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// Azure region to hit Api
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task GetAsync(this IAadPropertiesOperations operations, string azureRegion, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.GetWithHttpMessagesAsync(azureRegion, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- }
-}
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 3992612b934d..5d3ebbf98aed 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
@@ -249,9 +249,5 @@ internal BMSPrepareDataMoveOperationResultOperations(RecoveryServicesBackupClien
return _result;
}
- public Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- throw new System.NotImplementedException();
- }
}
}
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupCrrJobDetailsOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupCrrJobDetailsOperations.cs
deleted file mode 100644
index cc0e15fe3355..000000000000
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupCrrJobDetailsOperations.cs
+++ /dev/null
@@ -1,239 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.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;
-
- ///
- /// BackupCrrJobDetailsOperations operations.
- ///
- internal partial class BackupCrrJobDetailsOperations : IServiceOperations, IBackupCrrJobDetailsOperations
- {
- ///
- /// Initializes a new instance of the BackupCrrJobDetailsOperations class.
- ///
- ///
- /// Reference to the service client.
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- internal BackupCrrJobDetailsOperations(RecoveryServicesBackupClient client)
- {
- if (client == null)
- {
- throw new System.ArgumentNullException("client");
- }
- Client = client;
- }
-
- ///
- /// Gets a reference to the RecoveryServicesBackupClient
- ///
- public RecoveryServicesBackupClient Client { get; private set; }
-
- ///
- /// Get CRR job details from target region.
- ///
- ///
- /// Azure region to hit Api
- ///
- ///
- /// 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 azureRegion, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (azureRegion == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "azureRegion");
- }
- if (Client.SubscriptionId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
- }
- string apiVersion = "2018-12-20";
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("apiVersion", apiVersion);
- tracingParameters.Add("azureRegion", azureRegion);
- 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}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrrJob").ToString();
- _url = _url.Replace("{azureRegion}", System.Uri.EscapeDataString(azureRegion));
- _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("POST");
- _httpRequest.RequestUri = new System.Uri(_url);
- // Set Headers
- if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
- {
- _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
- }
- if (Client.AcceptLanguage != null)
- {
- if (_httpRequest.Headers.Contains("accept-language"))
- {
- _httpRequest.Headers.Remove("accept-language");
- }
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
- }
-
-
- if (customHeaders != null)
- {
- foreach(var _header in customHeaders)
- {
- if (_httpRequest.Headers.Contains(_header.Key))
- {
- _httpRequest.Headers.Remove(_header.Key);
- }
- _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
- }
- }
-
- // Serialize Request
- string _requestContent = null;
- // Set Credentials
- if (Client.Credentials != null)
- {
- cancellationToken.ThrowIfCancellationRequested();
- await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- }
- // Send Request
- if (_shouldTrace)
- {
- ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- if (_shouldTrace)
- {
- ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
- }
- 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/BackupCrrJobDetailsOperationsExtensions.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupCrrJobDetailsOperationsExtensions.cs
deleted file mode 100644
index 013853a5fc6a..000000000000
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupCrrJobDetailsOperationsExtensions.cs
+++ /dev/null
@@ -1,59 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.RecoveryServices.Backup
-{
- using Microsoft.Rest;
- using Microsoft.Rest.Azure;
- using Models;
- using System.Threading;
- using System.Threading.Tasks;
-
- ///
- /// Extension methods for BackupCrrJobDetailsOperations.
- ///
- public static partial class BackupCrrJobDetailsOperationsExtensions
- {
- ///
- /// Get CRR job details from target region.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// Azure region to hit Api
- ///
- public static JobResource Get(this IBackupCrrJobDetailsOperations operations, string azureRegion)
- {
- return operations.GetAsync(azureRegion).GetAwaiter().GetResult();
- }
-
- ///
- /// Get CRR job details from target region.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// Azure region to hit Api
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task GetAsync(this IBackupCrrJobDetailsOperations operations, string azureRegion, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.GetWithHttpMessagesAsync(azureRegion, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- }
-}
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupCrrJobsOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupCrrJobsOperations.cs
deleted file mode 100644
index 4871cc1fa79a..000000000000
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupCrrJobsOperations.cs
+++ /dev/null
@@ -1,412 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.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;
-
- ///
- /// BackupCrrJobsOperations operations.
- ///
- internal partial class BackupCrrJobsOperations : IServiceOperations, IBackupCrrJobsOperations
- {
- ///
- /// Initializes a new instance of the BackupCrrJobsOperations class.
- ///
- ///
- /// Reference to the service client.
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- internal BackupCrrJobsOperations(RecoveryServicesBackupClient client)
- {
- if (client == null)
- {
- throw new System.ArgumentNullException("client");
- }
- Client = client;
- }
-
- ///
- /// Gets a reference to the RecoveryServicesBackupClient
- ///
- public RecoveryServicesBackupClient Client { get; private set; }
-
- ///
- /// Gets the list of CRR jobs from the target region.
- ///
- ///
- /// Azure region to hit Api
- ///
- ///
- /// 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>> ListWithHttpMessagesAsync(string azureRegion, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (azureRegion == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "azureRegion");
- }
- if (Client.SubscriptionId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
- }
- string apiVersion = "2018-12-20";
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("apiVersion", apiVersion);
- tracingParameters.Add("azureRegion", azureRegion);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters);
- }
- // Construct URL
- var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrrJobs").ToString();
- _url = _url.Replace("{azureRegion}", System.Uri.EscapeDataString(azureRegion));
- _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("POST");
- _httpRequest.RequestUri = new System.Uri(_url);
- // Set Headers
- if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
- {
- _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
- }
- if (Client.AcceptLanguage != null)
- {
- if (_httpRequest.Headers.Contains("accept-language"))
- {
- _httpRequest.Headers.Remove("accept-language");
- }
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
- }
-
-
- if (customHeaders != null)
- {
- foreach(var _header in customHeaders)
- {
- if (_httpRequest.Headers.Contains(_header.Key))
- {
- _httpRequest.Headers.Remove(_header.Key);
- }
- _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
- }
- }
-
- // Serialize Request
- string _requestContent = null;
- // Set Credentials
- if (Client.Credentials != null)
- {
- cancellationToken.ThrowIfCancellationRequested();
- await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- }
- // Send Request
- if (_shouldTrace)
- {
- ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- if (_shouldTrace)
- {
- ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
- }
- 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;
- }
-
- ///
- /// Gets the list of CRR jobs from the target region.
- ///
- ///
- /// 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>> ListNextWithHttpMessagesAsync(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, "ListNext", 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("POST");
- _httpRequest.RequestUri = new System.Uri(_url);
- // Set Headers
- if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
- {
- _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
- }
- if (Client.AcceptLanguage != null)
- {
- if (_httpRequest.Headers.Contains("accept-language"))
- {
- _httpRequest.Headers.Remove("accept-language");
- }
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
- }
-
-
- if (customHeaders != null)
- {
- foreach(var _header in customHeaders)
- {
- if (_httpRequest.Headers.Contains(_header.Key))
- {
- _httpRequest.Headers.Remove(_header.Key);
- }
- _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
- }
- }
-
- // Serialize Request
- string _requestContent = null;
- // Set Credentials
- if (Client.Credentials != null)
- {
- cancellationToken.ThrowIfCancellationRequested();
- await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- }
- // Send Request
- if (_shouldTrace)
- {
- ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- if (_shouldTrace)
- {
- ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
- }
- 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/BackupCrrJobsOperationsExtensions.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupCrrJobsOperationsExtensions.cs
deleted file mode 100644
index 94ce0e56e93b..000000000000
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupCrrJobsOperationsExtensions.cs
+++ /dev/null
@@ -1,93 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.RecoveryServices.Backup
-{
- using Microsoft.Rest;
- using Microsoft.Rest.Azure;
- using Models;
- using System.Threading;
- using System.Threading.Tasks;
-
- ///
- /// Extension methods for BackupCrrJobsOperations.
- ///
- public static partial class BackupCrrJobsOperationsExtensions
- {
- ///
- /// Gets the list of CRR jobs from the target region.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// Azure region to hit Api
- ///
- public static IPage List(this IBackupCrrJobsOperations operations, string azureRegion)
- {
- return operations.ListAsync(azureRegion).GetAwaiter().GetResult();
- }
-
- ///
- /// Gets the list of CRR jobs from the target region.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// Azure region to hit Api
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task> ListAsync(this IBackupCrrJobsOperations operations, string azureRegion, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.ListWithHttpMessagesAsync(azureRegion, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- ///
- /// Gets the list of CRR jobs from the target region.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The NextLink from the previous successful call to List operation.
- ///
- public static IPage ListNext(this IBackupCrrJobsOperations operations, string nextPageLink)
- {
- return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult();
- }
-
- ///
- /// Gets the list of CRR jobs from the target region.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The NextLink from the previous successful call to List operation.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task> ListNextAsync(this IBackupCrrJobsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- }
-}
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupProtectedItemsCrrOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupProtectedItemsCrrOperations.cs
deleted file mode 100644
index c9bbf7121226..000000000000
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupProtectedItemsCrrOperations.cs
+++ /dev/null
@@ -1,443 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.RecoveryServices.Backup
-{
- using Microsoft.Rest;
- using Microsoft.Rest.Azure;
- using Microsoft.Rest.Azure.OData;
- 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;
-
- ///
- /// BackupProtectedItemsCrrOperations operations.
- ///
- internal partial class BackupProtectedItemsCrrOperations : IServiceOperations, IBackupProtectedItemsCrrOperations
- {
- ///
- /// Initializes a new instance of the BackupProtectedItemsCrrOperations class.
- ///
- ///
- /// Reference to the service client.
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- internal BackupProtectedItemsCrrOperations(RecoveryServicesBackupClient client)
- {
- if (client == null)
- {
- throw new System.ArgumentNullException("client");
- }
- Client = client;
- }
-
- ///
- /// Gets a reference to the RecoveryServicesBackupClient
- ///
- public RecoveryServicesBackupClient Client { get; private set; }
-
- ///
- /// Provides a pageable list of all items that are backed up within a vault.
- ///
- ///
- /// The name of the recovery services vault.
- ///
- ///
- /// The name of the resource group where the recovery services vault is
- /// present.
- ///
- ///
- /// OData parameters to apply to the operation.
- ///
- ///
- /// skipToken Filter.
- ///
- ///
- /// 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>> ListWithHttpMessagesAsync(string vaultName, string resourceGroupName, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), 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 = "2018-12-20";
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("odataQuery", odataQuery);
- tracingParameters.Add("apiVersion", apiVersion);
- tracingParameters.Add("vaultName", vaultName);
- tracingParameters.Add("resourceGroupName", resourceGroupName);
- tracingParameters.Add("skipToken", skipToken);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "List", 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}/backupProtectedItems/").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 (odataQuery != null)
- {
- var _odataFilter = odataQuery.ToString();
- if (!string.IsNullOrEmpty(_odataFilter))
- {
- _queryParameters.Add(_odataFilter);
- }
- }
- if (apiVersion != null)
- {
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
- }
- if (skipToken != null)
- {
- _queryParameters.Add(string.Format("$skipToken={0}", System.Uri.EscapeDataString(skipToken)));
- }
- 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;
- }
-
- ///
- /// Provides a pageable list of all items that are backed up within a 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>> ListNextWithHttpMessagesAsync(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, "ListNext", 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/BackupProtectedItemsCrrOperationsExtensions.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupProtectedItemsCrrOperationsExtensions.cs
deleted file mode 100644
index 0cc9e4ce6aab..000000000000
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/BackupProtectedItemsCrrOperationsExtensions.cs
+++ /dev/null
@@ -1,114 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.RecoveryServices.Backup
-{
- using Microsoft.Rest;
- using Microsoft.Rest.Azure;
- using Microsoft.Rest.Azure.OData;
- using Models;
- using System.Threading;
- using System.Threading.Tasks;
-
- ///
- /// Extension methods for BackupProtectedItemsCrrOperations.
- ///
- public static partial class BackupProtectedItemsCrrOperationsExtensions
- {
- ///
- /// Provides a pageable list of all items that are backed up within a 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.
- ///
- ///
- /// OData parameters to apply to the operation.
- ///
- ///
- /// skipToken Filter.
- ///
- public static IPage List(this IBackupProtectedItemsCrrOperations operations, string vaultName, string resourceGroupName, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string))
- {
- return operations.ListAsync(vaultName, resourceGroupName, odataQuery, skipToken).GetAwaiter().GetResult();
- }
-
- ///
- /// Provides a pageable list of all items that are backed up within a 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.
- ///
- ///
- /// OData parameters to apply to the operation.
- ///
- ///
- /// skipToken Filter.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task> ListAsync(this IBackupProtectedItemsCrrOperations operations, string vaultName, string resourceGroupName, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.ListWithHttpMessagesAsync(vaultName, resourceGroupName, odataQuery, skipToken, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- ///
- /// Provides a pageable list of all items that are backed up within a vault.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The NextLink from the previous successful call to List operation.
- ///
- public static IPage ListNext(this IBackupProtectedItemsCrrOperations operations, string nextPageLink)
- {
- return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult();
- }
-
- ///
- /// Provides a pageable list of all items that are backed up within a 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> ListNextAsync(this IBackupProtectedItemsCrrOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- }
-}
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/CrossRegionRestoreOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/CrossRegionRestoreOperations.cs
deleted file mode 100644
index 1d0cb6b6e7d5..000000000000
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/CrossRegionRestoreOperations.cs
+++ /dev/null
@@ -1,256 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.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;
-
- ///
- /// CrossRegionRestoreOperations operations.
- ///
- internal partial class CrossRegionRestoreOperations : IServiceOperations, ICrossRegionRestoreOperations
- {
- ///
- /// Initializes a new instance of the CrossRegionRestoreOperations class.
- ///
- ///
- /// Reference to the service client.
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- internal CrossRegionRestoreOperations(RecoveryServicesBackupClient client)
- {
- if (client == null)
- {
- throw new System.ArgumentNullException("client");
- }
- Client = client;
- }
-
- ///
- /// Gets a reference to the RecoveryServicesBackupClient
- ///
- public RecoveryServicesBackupClient Client { get; private set; }
-
- ///
- /// Restores the specified backed up data in a different region as compared to
- /// where the data is backed up.
- ///
- ///
- /// Azure region to hit Api
- ///
- ///
- /// resource cross region restore request
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- public async Task TriggerWithHttpMessagesAsync(string azureRegion, CrossRegionRestoreRequestResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- // Send request
- AzureOperationResponse _response = await BeginTriggerWithHttpMessagesAsync(azureRegion, parameters, customHeaders, cancellationToken).ConfigureAwait(false);
- return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
- }
-
- ///
- /// Restores the specified backed up data in a different region as compared to
- /// where the data is backed up.
- ///
- ///
- /// Azure region to hit Api
- ///
- ///
- /// resource cross region restore 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 BeginTriggerWithHttpMessagesAsync(string azureRegion, CrossRegionRestoreRequestResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (azureRegion == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "azureRegion");
- }
- if (Client.SubscriptionId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
- }
- if (parameters == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
- }
- string apiVersion = "2018-12-20";
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("apiVersion", apiVersion);
- tracingParameters.Add("azureRegion", azureRegion);
- tracingParameters.Add("parameters", parameters);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "BeginTrigger", tracingParameters);
- }
- // Construct URL
- var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrossRegionRestore").ToString();
- _url = _url.Replace("{azureRegion}", System.Uri.EscapeDataString(azureRegion));
- _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("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 != 202)
- {
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- try
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- if (_errorBody != null)
- {
- ex = new CloudException(_errorBody.Message);
- ex.Body = _errorBody;
- }
- }
- catch (JsonException)
- {
- // Ignore the exception
- }
- ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
- ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Error(_invocationId, ex);
- }
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw ex;
- }
- // Create Result
- var _result = new AzureOperationResponse();
- _result.Request = _httpRequest;
- _result.Response = _httpResponse;
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Exit(_invocationId, _result);
- }
- return _result;
- }
-
- }
-}
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/CrossRegionRestoreOperationsExtensions.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/CrossRegionRestoreOperationsExtensions.cs
deleted file mode 100644
index 683c9230e807..000000000000
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/CrossRegionRestoreOperationsExtensions.cs
+++ /dev/null
@@ -1,103 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.RecoveryServices.Backup
-{
- using Microsoft.Rest;
- using Microsoft.Rest.Azure;
- using Models;
- using System.Threading;
- using System.Threading.Tasks;
-
- ///
- /// Extension methods for CrossRegionRestoreOperations.
- ///
- public static partial class CrossRegionRestoreOperationsExtensions
- {
- ///
- /// Restores the specified backed up data in a different region as compared to
- /// where the data is backed up.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// Azure region to hit Api
- ///
- ///
- /// resource cross region restore request
- ///
- public static void Trigger(this ICrossRegionRestoreOperations operations, string azureRegion, CrossRegionRestoreRequestResource parameters)
- {
- operations.TriggerAsync(azureRegion, parameters).GetAwaiter().GetResult();
- }
-
- ///
- /// Restores the specified backed up data in a different region as compared to
- /// where the data is backed up.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// Azure region to hit Api
- ///
- ///
- /// resource cross region restore request
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task TriggerAsync(this ICrossRegionRestoreOperations operations, string azureRegion, CrossRegionRestoreRequestResource parameters, CancellationToken cancellationToken = default(CancellationToken))
- {
- (await operations.TriggerWithHttpMessagesAsync(azureRegion, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose();
- }
-
- ///
- /// Restores the specified backed up data in a different region as compared to
- /// where the data is backed up.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// Azure region to hit Api
- ///
- ///
- /// resource cross region restore request
- ///
- public static void BeginTrigger(this ICrossRegionRestoreOperations operations, string azureRegion, CrossRegionRestoreRequestResource parameters)
- {
- operations.BeginTriggerAsync(azureRegion, parameters).GetAwaiter().GetResult();
- }
-
- ///
- /// Restores the specified backed up data in a different region as compared to
- /// where the data is backed up.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// Azure region to hit Api
- ///
- ///
- /// resource cross region restore request
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task BeginTriggerAsync(this ICrossRegionRestoreOperations operations, string azureRegion, CrossRegionRestoreRequestResource parameters, CancellationToken cancellationToken = default(CancellationToken))
- {
- (await operations.BeginTriggerWithHttpMessagesAsync(azureRegion, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose();
- }
-
- }
-}
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/CrrOperationResultsOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/CrrOperationResultsOperations.cs
deleted file mode 100644
index bb90e8548a59..000000000000
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/CrrOperationResultsOperations.cs
+++ /dev/null
@@ -1,228 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.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;
-
- ///
- /// CrrOperationResultsOperations operations.
- ///
- internal partial class CrrOperationResultsOperations : IServiceOperations, ICrrOperationResultsOperations
- {
- ///
- /// Initializes a new instance of the CrrOperationResultsOperations class.
- ///
- ///
- /// Reference to the service client.
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- internal CrrOperationResultsOperations(RecoveryServicesBackupClient client)
- {
- if (client == null)
- {
- throw new System.ArgumentNullException("client");
- }
- Client = client;
- }
-
- ///
- /// Gets a reference to the RecoveryServicesBackupClient
- ///
- public RecoveryServicesBackupClient Client { get; private set; }
-
-
- ///
- /// Azure region to hit Api
- ///
- ///
- ///
- ///
- /// 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 BeginGetWithHttpMessagesAsync(string azureRegion, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (azureRegion == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "azureRegion");
- }
- if (Client.SubscriptionId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
- }
- if (operationId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "operationId");
- }
- string apiVersion = "2018-12-20";
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("apiVersion", apiVersion);
- tracingParameters.Add("azureRegion", azureRegion);
- tracingParameters.Add("operationId", operationId);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "BeginGet", tracingParameters);
- }
- // Construct URL
- var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrrOperationResults/{operationId}").ToString();
- _url = _url.Replace("{azureRegion}", System.Uri.EscapeDataString(azureRegion));
- _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(operationId));
- 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 && (int)_statusCode != 202)
- {
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- try
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- if (_errorBody != null)
- {
- ex = new CloudException(_errorBody.Message);
- ex.Body = _errorBody;
- }
- }
- catch (JsonException)
- {
- // Ignore the exception
- }
- ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
- ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Error(_invocationId, ex);
- }
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw ex;
- }
- // Create Result
- var _result = new AzureOperationResponse();
- _result.Request = _httpRequest;
- _result.Response = _httpResponse;
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Exit(_invocationId, _result);
- }
- return _result;
- }
-
- public Task GetWithHttpMessagesAsync(string azureRegion, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- throw new System.NotImplementedException();
- }
- }
-}
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/CrrOperationResultsOperationsExtensions.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/CrrOperationResultsOperationsExtensions.cs
deleted file mode 100644
index 8ddeaebb2b07..000000000000
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/CrrOperationResultsOperationsExtensions.cs
+++ /dev/null
@@ -1,83 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.RecoveryServices.Backup
-{
- using Microsoft.Rest;
- using Microsoft.Rest.Azure;
- using Models;
- using System.Threading;
- using System.Threading.Tasks;
-
- ///
- /// Extension methods for CrrOperationResultsOperations.
- ///
- public static partial class CrrOperationResultsOperationsExtensions
- {
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// Azure region to hit Api
- ///
- ///
- ///
- public static void Get(this ICrrOperationResultsOperations operations, string azureRegion, string operationId)
- {
- operations.GetAsync(azureRegion, operationId).GetAwaiter().GetResult();
- }
-
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// Azure region to hit Api
- ///
- ///
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task GetAsync(this ICrrOperationResultsOperations operations, string azureRegion, string operationId, CancellationToken cancellationToken = default(CancellationToken))
- {
- (await operations.GetWithHttpMessagesAsync(azureRegion, operationId, null, cancellationToken).ConfigureAwait(false)).Dispose();
- }
-
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// Azure region to hit Api
- ///
- ///
- ///
- public static void BeginGet(this ICrrOperationResultsOperations operations, string azureRegion, string operationId)
- {
- operations.BeginGetAsync(azureRegion, operationId).GetAwaiter().GetResult();
- }
-
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// Azure region to hit Api
- ///
- ///
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task BeginGetAsync(this ICrrOperationResultsOperations operations, string azureRegion, string operationId, CancellationToken cancellationToken = default(CancellationToken))
- {
- (await operations.BeginGetWithHttpMessagesAsync(azureRegion, operationId, null, cancellationToken).ConfigureAwait(false)).Dispose();
- }
-
- }
-}
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/CrrOperationStatusOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/CrrOperationStatusOperations.cs
deleted file mode 100644
index d4fb30bab8bd..000000000000
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/CrrOperationStatusOperations.cs
+++ /dev/null
@@ -1,244 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.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;
-
- ///
- /// CrrOperationStatusOperations operations.
- ///
- internal partial class CrrOperationStatusOperations : IServiceOperations, ICrrOperationStatusOperations
- {
- ///
- /// Initializes a new instance of the CrrOperationStatusOperations class.
- ///
- ///
- /// Reference to the service client.
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- internal CrrOperationStatusOperations(RecoveryServicesBackupClient client)
- {
- if (client == null)
- {
- throw new System.ArgumentNullException("client");
- }
- Client = client;
- }
-
- ///
- /// Gets a reference to the RecoveryServicesBackupClient
- ///
- public RecoveryServicesBackupClient Client { get; private set; }
-
- ///
- /// Azure region to hit Api
- ///
- ///
- ///
- ///
- /// 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 azureRegion, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (azureRegion == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "azureRegion");
- }
- if (Client.SubscriptionId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
- }
- if (operationId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "operationId");
- }
- string apiVersion = "2018-12-20";
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("apiVersion", apiVersion);
- tracingParameters.Add("azureRegion", azureRegion);
- tracingParameters.Add("operationId", operationId);
- 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}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupCrrOperationsStatus/{operationId}").ToString();
- _url = _url.Replace("{azureRegion}", System.Uri.EscapeDataString(azureRegion));
- _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(operationId));
- 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;
- }
-
- }
-}
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/CrrOperationStatusOperationsExtensions.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/CrrOperationStatusOperationsExtensions.cs
deleted file mode 100644
index 19be6b36645b..000000000000
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/CrrOperationStatusOperationsExtensions.cs
+++ /dev/null
@@ -1,57 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.RecoveryServices.Backup
-{
- using Microsoft.Rest;
- using Microsoft.Rest.Azure;
- using Models;
- using System.Threading;
- using System.Threading.Tasks;
-
- ///
- /// Extension methods for CrrOperationStatusOperations.
- ///
- public static partial class CrrOperationStatusOperationsExtensions
- {
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// Azure region to hit Api
- ///
- ///
- ///
- public static OperationStatus Get(this ICrrOperationStatusOperations operations, string azureRegion, string operationId)
- {
- return operations.GetAsync(azureRegion, operationId).GetAwaiter().GetResult();
- }
-
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// Azure region to hit Api
- ///
- ///
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task GetAsync(this ICrrOperationStatusOperations operations, string azureRegion, string operationId, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.GetWithHttpMessagesAsync(azureRegion, operationId, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- }
-}
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IAadPropertiesOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IAadPropertiesOperations.cs
deleted file mode 100644
index cdcbca94439b..000000000000
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IAadPropertiesOperations.cs
+++ /dev/null
@@ -1,49 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.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;
-
- ///
- /// AadPropertiesOperations operations.
- ///
- public partial interface IAadPropertiesOperations
- {
- ///
- /// Fetches the AAD properties from target region BCM stamp.
- ///
- ///
- /// Azure region to hit Api
- ///
- ///
- /// 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 azureRegion, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- }
-}
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IBackupCrrJobDetailsOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IBackupCrrJobDetailsOperations.cs
deleted file mode 100644
index 295d0d06cb28..000000000000
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IBackupCrrJobDetailsOperations.cs
+++ /dev/null
@@ -1,49 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.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;
-
- ///
- /// BackupCrrJobDetailsOperations operations.
- ///
- public partial interface IBackupCrrJobDetailsOperations
- {
- ///
- /// Get CRR job details from target region.
- ///
- ///
- /// Azure region to hit Api
- ///
- ///
- /// 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 azureRegion, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- }
-}
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IBackupCrrJobsOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IBackupCrrJobsOperations.cs
deleted file mode 100644
index 5f863605342d..000000000000
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IBackupCrrJobsOperations.cs
+++ /dev/null
@@ -1,71 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.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;
-
- ///
- /// BackupCrrJobsOperations operations.
- ///
- public partial interface IBackupCrrJobsOperations
- {
- ///
- /// Gets the list of CRR jobs from the target region.
- ///
- ///
- /// Azure region to hit Api
- ///
- ///
- /// 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>> ListWithHttpMessagesAsync(string azureRegion, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Gets the list of CRR jobs from the target region.
- ///
- ///
- /// 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>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- }
-}
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IBackupProtectedItemsCrrOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IBackupProtectedItemsCrrOperations.cs
deleted file mode 100644
index 7265c495f237..000000000000
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IBackupProtectedItemsCrrOperations.cs
+++ /dev/null
@@ -1,84 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.RecoveryServices.Backup
-{
- using Microsoft.Rest;
- using Microsoft.Rest.Azure;
- using Microsoft.Rest.Azure.OData;
- using Models;
- using System.Collections;
- using System.Collections.Generic;
- using System.Threading;
- using System.Threading.Tasks;
-
- ///
- /// BackupProtectedItemsCrrOperations operations.
- ///
- public partial interface IBackupProtectedItemsCrrOperations
- {
- ///
- /// Provides a pageable list of all items that are backed up within a
- /// vault.
- ///
- ///
- /// The name of the recovery services vault.
- ///
- ///
- /// The name of the resource group where the recovery services vault is
- /// present.
- ///
- ///
- /// OData parameters to apply to the operation.
- ///
- ///
- /// skipToken Filter.
- ///
- ///
- /// 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>> ListWithHttpMessagesAsync(string vaultName, string resourceGroupName, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Provides a pageable list of all items that are backed up within a
- /// 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>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- }
-}
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ICrossRegionRestoreOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ICrossRegionRestoreOperations.cs
deleted file mode 100644
index b2a29fd928b2..000000000000
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ICrossRegionRestoreOperations.cs
+++ /dev/null
@@ -1,73 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.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;
-
- ///
- /// CrossRegionRestoreOperations operations.
- ///
- public partial interface ICrossRegionRestoreOperations
- {
- ///
- /// Restores the specified backed up data in a different region as
- /// compared to where the data is backed up.
- ///
- ///
- /// Azure region to hit Api
- ///
- ///
- /// resource cross region restore 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 TriggerWithHttpMessagesAsync(string azureRegion, CrossRegionRestoreRequestResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Restores the specified backed up data in a different region as
- /// compared to where the data is backed up.
- ///
- ///
- /// Azure region to hit Api
- ///
- ///
- /// resource cross region restore 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 BeginTriggerWithHttpMessagesAsync(string azureRegion, CrossRegionRestoreRequestResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- }
-}
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ICrrOperationResultsOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ICrrOperationResultsOperations.cs
deleted file mode 100644
index ef70a4ee2313..000000000000
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ICrrOperationResultsOperations.cs
+++ /dev/null
@@ -1,63 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.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;
-
- ///
- /// CrrOperationResultsOperations operations.
- ///
- public partial interface ICrrOperationResultsOperations
- {
- ///
- /// Azure region to hit Api
- ///
- ///
- ///
- ///
- /// 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 GetWithHttpMessagesAsync(string azureRegion, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Azure region to hit Api
- ///
- ///
- ///
- ///
- /// 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 BeginGetWithHttpMessagesAsync(string azureRegion, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- }
-}
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ICrrOperationStatusOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ICrrOperationStatusOperations.cs
deleted file mode 100644
index a898fad373fd..000000000000
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/ICrrOperationStatusOperations.cs
+++ /dev/null
@@ -1,48 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.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;
-
- ///
- /// CrrOperationStatusOperations operations.
- ///
- public partial interface ICrrOperationStatusOperations
- {
- ///
- /// Azure region to hit Api
- ///
- ///
- ///
- ///
- /// 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 azureRegion, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- }
-}
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IRecoveryPointsCrrOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IRecoveryPointsCrrOperations.cs
deleted file mode 100644
index bb9a111ee71d..000000000000
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IRecoveryPointsCrrOperations.cs
+++ /dev/null
@@ -1,88 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.RecoveryServices.Backup
-{
- using Microsoft.Rest;
- using Microsoft.Rest.Azure;
- using Microsoft.Rest.Azure.OData;
- using Models;
- using System.Collections;
- using System.Collections.Generic;
- using System.Threading;
- using System.Threading.Tasks;
-
- ///
- /// RecoveryPointsCrrOperations operations.
- ///
- public partial interface IRecoveryPointsCrrOperations
- {
- ///
- /// Lists the backup copies for the backed up item.
- ///
- ///
- /// The name of the recovery services vault.
- ///
- ///
- /// The name of the resource group where the recovery services vault is
- /// present.
- ///
- ///
- /// Fabric name associated with the backed up item.
- ///
- ///
- /// Container name associated with the backed up item.
- ///
- ///
- /// Backed up item whose backup copies are to be fetched.
- ///
- ///
- /// OData parameters to apply to the 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>> ListWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Lists the backup copies for the backed up item.
- ///
- ///
- /// 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>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- }
-}
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IRecoveryPointsOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IRecoveryPointsOperations.cs
index d2aa94fe345d..2d6874694647 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IRecoveryPointsOperations.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/IRecoveryPointsOperations.cs
@@ -104,45 +104,6 @@ public partial interface IRecoveryPointsOperations
///
Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Returns the Access token for communication between BMS and
- /// Protection service
- ///
- ///
- /// The name of the recovery services vault.
- ///
- ///
- /// The name of the resource group where the recovery services vault is
- /// present.
- ///
- ///
- /// Fabric name associated with the container.
- ///
- ///
- /// Name of the container.
- ///
- ///
- /// Name of the Protected Item.
- ///
- ///
- /// Recovery Point Id
- ///
- ///
- /// 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> GetAccessTokenWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
/// Lists the backup copies for the backed up item.
///
///
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 9d30c0f9a708..d3a3f5ea7544 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
@@ -153,46 +153,6 @@ public partial interface IRecoveryServicesBackupClient : System.IDisposable
///
IBackupProtectedItemsOperations BackupProtectedItems { get; }
- ///
- /// Gets the IAadPropertiesOperations.
- ///
- IAadPropertiesOperations AadProperties { get; }
-
- ///
- /// Gets the ICrossRegionRestoreOperations.
- ///
- ICrossRegionRestoreOperations CrossRegionRestore { get; }
-
- ///
- /// Gets the IBackupCrrJobDetailsOperations.
- ///
- IBackupCrrJobDetailsOperations BackupCrrJobDetails { get; }
-
- ///
- /// Gets the IBackupCrrJobsOperations.
- ///
- IBackupCrrJobsOperations BackupCrrJobs { get; }
-
- ///
- /// Gets the ICrrOperationResultsOperations.
- ///
- ICrrOperationResultsOperations CrrOperationResults { get; }
-
- ///
- /// Gets the ICrrOperationStatusOperations.
- ///
- ICrrOperationStatusOperations CrrOperationStatus { get; }
-
- ///
- /// Gets the IRecoveryPointsCrrOperations.
- ///
- IRecoveryPointsCrrOperations RecoveryPointsCrr { get; }
-
- ///
- /// Gets the IBackupProtectedItemsCrrOperations.
- ///
- IBackupProtectedItemsCrrOperations BackupProtectedItemsCrr { get; }
-
///
/// Gets the IOperationOperations.
///
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AADProperties.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AADProperties.cs
deleted file mode 100644
index c427544da20f..000000000000
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AADProperties.cs
+++ /dev/null
@@ -1,70 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models
-{
- using Newtonsoft.Json;
- using System.Linq;
-
- public partial class AADProperties
- {
- ///
- /// Initializes a new instance of the AADProperties class.
- ///
- public AADProperties()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the AADProperties class.
- ///
- public AADProperties(string servicePrincipalClientId = default(string), string tenantId = default(string), string authority = default(string), string audience = default(string), string servicePrincipalObjectId = default(string))
- {
- ServicePrincipalClientId = servicePrincipalClientId;
- TenantId = tenantId;
- Authority = authority;
- Audience = audience;
- ServicePrincipalObjectId = servicePrincipalObjectId;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- ///
- [JsonProperty(PropertyName = "servicePrincipalClientId")]
- public string ServicePrincipalClientId { get; set; }
-
- ///
- ///
- [JsonProperty(PropertyName = "tenantId")]
- public string TenantId { get; set; }
-
- ///
- ///
- [JsonProperty(PropertyName = "authority")]
- public string Authority { get; set; }
-
- ///
- ///
- [JsonProperty(PropertyName = "audience")]
- public string Audience { get; set; }
-
- ///
- ///
- [JsonProperty(PropertyName = "servicePrincipalObjectId")]
- public string ServicePrincipalObjectId { get; set; }
-
- }
-}
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AADPropertiesResource.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AADPropertiesResource.cs
deleted file mode 100644
index ca0bba27ebb2..000000000000
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/AADPropertiesResource.cs
+++ /dev/null
@@ -1,60 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models
-{
- using Newtonsoft.Json;
- using System.Collections;
- using System.Collections.Generic;
- using System.Linq;
-
- public partial class AADPropertiesResource : Resource
- {
- ///
- /// Initializes a new instance of the AADPropertiesResource class.
- ///
- public AADPropertiesResource()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the AADPropertiesResource 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.
- /// AADPropertiesResource properties
- public AADPropertiesResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), string eTag = default(string), AADProperties properties = default(AADProperties))
- : 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 aADPropertiesResource properties
- ///
- [JsonProperty(PropertyName = "properties")]
- public AADProperties Properties { get; set; }
-
- }
-}
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/CrossRegionRestoreRequest.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/CrossRegionRestoreRequest.cs
deleted file mode 100644
index c555e80bef31..000000000000
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/CrossRegionRestoreRequest.cs
+++ /dev/null
@@ -1,58 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models
-{
- using Newtonsoft.Json;
- using System.Linq;
-
- public partial class CrossRegionRestoreRequest
- {
- ///
- /// Initializes a new instance of the CrossRegionRestoreRequest class.
- ///
- public CrossRegionRestoreRequest()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the CrossRegionRestoreRequest class.
- ///
- /// Access details for
- /// cross region restore
- /// Request object for triggering
- /// restore
- public CrossRegionRestoreRequest(CrrAccessToken crossRegionRestoreAccessDetails = default(CrrAccessToken), RestoreRequest restoreRequest = default(RestoreRequest))
- {
- CrossRegionRestoreAccessDetails = crossRegionRestoreAccessDetails;
- RestoreRequest = restoreRequest;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets or sets access details for cross region restore
- ///
- [JsonProperty(PropertyName = "crossRegionRestoreAccessDetails")]
- public CrrAccessToken CrossRegionRestoreAccessDetails { get; set; }
-
- ///
- /// Gets or sets request object for triggering restore
- ///
- [JsonProperty(PropertyName = "restoreRequest")]
- public RestoreRequest RestoreRequest { get; set; }
-
- }
-}
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/CrossRegionRestoreRequestResource.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/CrossRegionRestoreRequestResource.cs
deleted file mode 100644
index 89eda50cf8bf..000000000000
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/CrossRegionRestoreRequestResource.cs
+++ /dev/null
@@ -1,63 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models
-{
- using Newtonsoft.Json;
- using System.Collections;
- using System.Collections.Generic;
- using System.Linq;
-
- public partial class CrossRegionRestoreRequestResource : Resource
- {
- ///
- /// Initializes a new instance of the CrossRegionRestoreRequestResource
- /// class.
- ///
- public CrossRegionRestoreRequestResource()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the CrossRegionRestoreRequestResource
- /// 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.
- /// CrossRegionRestoreRequestResource
- /// properties
- public CrossRegionRestoreRequestResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), string eTag = default(string), CrossRegionRestoreRequest properties = default(CrossRegionRestoreRequest))
- : 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 crossRegionRestoreRequestResource properties
- ///
- [JsonProperty(PropertyName = "properties")]
- public CrossRegionRestoreRequest Properties { get; set; }
-
- }
-}
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/CrrAccessToken.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/CrrAccessToken.cs
deleted file mode 100644
index 2a74c37d196b..000000000000
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/CrrAccessToken.cs
+++ /dev/null
@@ -1,210 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models
-{
- using Newtonsoft.Json;
- using System.Linq;
-
- ///
- /// Container level access token for CRR
- ///
- public partial class CrrAccessToken
- {
- ///
- /// Initializes a new instance of the CrrAccessToken class.
- ///
- public CrrAccessToken()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the CrrAccessToken class.
- ///
- /// Access token used for
- /// authentication
- /// Subscription Id of the source
- /// vault
- /// Resource Group name of the source
- /// vault
- /// Resource Name of the source
- /// vault
- /// Resource Id of the source vault
- /// Recovery Point Id
- /// Recovery Point Time
- /// Container Unique name
- /// Container Type
- /// Backup Management Type
- /// Datasource Type
- /// Datasource Friendly Name
- /// Datasource Id
- /// Datasource Container Unique
- /// Name
- /// CoordinatorServiceStampId
- /// to be used by BCM in restore call
- /// CoordinatorServiceStampUri
- /// to be used by BCM in restore call
- /// ProtectionServiceStampId to
- /// be used by BCM in restore call
- /// ProtectionServiceStampUri
- /// to be used by BCM in restore call
- /// Extended Information about
- /// the token like FileSpec etc.
- public CrrAccessToken(string accessTokenString = default(string), string subscriptionId = default(string), string resourceGroupName = default(string), string resourceName = default(string), string resourceId = default(string), string recoveryPointId = default(string), string recoveryPointTime = default(string), string containerName = default(string), string containerType = default(string), string backupManagementType = default(string), string datasourceType = default(string), string datasourceName = default(string), string datasourceId = default(string), string datasourceContainerName = default(string), string coordinatorServiceStampId = default(string), string coordinatorServiceStampUri = default(string), string protectionServiceStampId = default(string), string protectionServiceStampUri = default(string), string tokenExtendedInformation = default(string))
- {
- AccessTokenString = accessTokenString;
- SubscriptionId = subscriptionId;
- ResourceGroupName = resourceGroupName;
- ResourceName = resourceName;
- ResourceId = resourceId;
- RecoveryPointId = recoveryPointId;
- RecoveryPointTime = recoveryPointTime;
- ContainerName = containerName;
- ContainerType = containerType;
- BackupManagementType = backupManagementType;
- DatasourceType = datasourceType;
- DatasourceName = datasourceName;
- DatasourceId = datasourceId;
- DatasourceContainerName = datasourceContainerName;
- CoordinatorServiceStampId = coordinatorServiceStampId;
- CoordinatorServiceStampUri = coordinatorServiceStampUri;
- ProtectionServiceStampId = protectionServiceStampId;
- ProtectionServiceStampUri = protectionServiceStampUri;
- TokenExtendedInformation = tokenExtendedInformation;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets or sets access token used for authentication
- ///
- [JsonProperty(PropertyName = "accessTokenString")]
- public string AccessTokenString { get; set; }
-
- ///
- /// Gets or sets subscription Id of the source vault
- ///
- [JsonProperty(PropertyName = "subscriptionId")]
- public string SubscriptionId { get; set; }
-
- ///
- /// Gets or sets resource Group name of the source vault
- ///
- [JsonProperty(PropertyName = "resourceGroupName")]
- public string ResourceGroupName { get; set; }
-
- ///
- /// Gets or sets resource Name of the source vault
- ///
- [JsonProperty(PropertyName = "resourceName")]
- public string ResourceName { get; set; }
-
- ///
- /// Gets or sets resource Id of the source vault
- ///
- [JsonProperty(PropertyName = "resourceId")]
- public string ResourceId { get; set; }
-
- ///
- /// Gets or sets recovery Point Id
- ///
- [JsonProperty(PropertyName = "recoveryPointId")]
- public string RecoveryPointId { get; set; }
-
- ///
- /// Gets or sets recovery Point Time
- ///
- [JsonProperty(PropertyName = "recoveryPointTime")]
- public string RecoveryPointTime { get; set; }
-
- ///
- /// Gets or sets container Unique name
- ///
- [JsonProperty(PropertyName = "containerName")]
- public string ContainerName { get; set; }
-
- ///
- /// Gets or sets container Type
- ///
- [JsonProperty(PropertyName = "containerType")]
- public string ContainerType { get; set; }
-
- ///
- /// Gets or sets backup Management Type
- ///
- [JsonProperty(PropertyName = "backupManagementType")]
- public string BackupManagementType { get; set; }
-
- ///
- /// Gets or sets datasource Type
- ///
- [JsonProperty(PropertyName = "datasourceType")]
- public string DatasourceType { get; set; }
-
- ///
- /// Gets or sets datasource Friendly Name
- ///
- [JsonProperty(PropertyName = "datasourceName")]
- public string DatasourceName { get; set; }
-
- ///
- /// Gets or sets datasource Id
- ///
- [JsonProperty(PropertyName = "datasourceId")]
- public string DatasourceId { get; set; }
-
- ///
- /// Gets or sets datasource Container Unique Name
- ///
- [JsonProperty(PropertyName = "datasourceContainerName")]
- public string DatasourceContainerName { get; set; }
-
- ///
- /// Gets or sets coordinatorServiceStampId to be used by BCM in restore
- /// call
- ///
- [JsonProperty(PropertyName = "coordinatorServiceStampId")]
- public string CoordinatorServiceStampId { get; set; }
-
- ///
- /// Gets or sets coordinatorServiceStampUri to be used by BCM in
- /// restore call
- ///
- [JsonProperty(PropertyName = "coordinatorServiceStampUri")]
- public string CoordinatorServiceStampUri { get; set; }
-
- ///
- /// Gets or sets protectionServiceStampId to be used by BCM in restore
- /// call
- ///
- [JsonProperty(PropertyName = "protectionServiceStampId")]
- public string ProtectionServiceStampId { get; set; }
-
- ///
- /// Gets or sets protectionServiceStampUri to be used by BCM in restore
- /// call
- ///
- [JsonProperty(PropertyName = "protectionServiceStampUri")]
- public string ProtectionServiceStampUri { get; set; }
-
- ///
- /// Gets or sets extended Information about the token like FileSpec
- /// etc.
- ///
- [JsonProperty(PropertyName = "tokenExtendedInformation")]
- public string TokenExtendedInformation { get; set; }
-
- }
-}
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/CrrAccessTokenResource.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/CrrAccessTokenResource.cs
deleted file mode 100644
index b8b7429d8030..000000000000
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/CrrAccessTokenResource.cs
+++ /dev/null
@@ -1,63 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models
-{
- using Newtonsoft.Json;
- using System.Collections;
- using System.Collections.Generic;
- using System.Linq;
-
- ///
- /// Container level access token for CRR
- ///
- public partial class CrrAccessTokenResource : Resource
- {
- ///
- /// Initializes a new instance of the CrrAccessTokenResource class.
- ///
- public CrrAccessTokenResource()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the CrrAccessTokenResource 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.
- /// CrrAccessTokenResource properties
- public CrrAccessTokenResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), string eTag = default(string), CrrAccessToken properties = default(CrrAccessToken))
- : 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 crrAccessTokenResource properties
- ///
- [JsonProperty(PropertyName = "properties")]
- public CrrAccessToken Properties { get; set; }
-
- }
-}
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/OperationStatusRecoveryPointExtendedInfo.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/OperationStatusRecoveryPointExtendedInfo.cs
deleted file mode 100644
index 8140ddb34cab..000000000000
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/OperationStatusRecoveryPointExtendedInfo.cs
+++ /dev/null
@@ -1,65 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models
-{
- using Newtonsoft.Json;
- using System.Linq;
-
- ///
- /// Operation status extended info for Updated Recovery Point.
- ///
- public partial class OperationStatusRecoveryPointExtendedInfo : OperationStatusExtendedInfo
- {
- ///
- /// Initializes a new instance of the
- /// OperationStatusRecoveryPointExtendedInfo class.
- ///
- public OperationStatusRecoveryPointExtendedInfo()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the
- /// OperationStatusRecoveryPointExtendedInfo class.
- ///
- /// Recovery Point info with updated
- /// source snapshot URI
- /// In case the share is in
- /// soft-deleted state, populate this field with deleted backup
- /// item
- public OperationStatusRecoveryPointExtendedInfo(RecoveryPoint updatedRecoveryPoint = default(RecoveryPoint), string deletedBackupItemVersion = default(string))
- {
- UpdatedRecoveryPoint = updatedRecoveryPoint;
- DeletedBackupItemVersion = deletedBackupItemVersion;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets or sets recovery Point info with updated source snapshot URI
- ///
- [JsonProperty(PropertyName = "updatedRecoveryPoint")]
- public RecoveryPoint UpdatedRecoveryPoint { get; set; }
-
- ///
- /// Gets or sets in case the share is in soft-deleted state, populate
- /// this field with deleted backup item
- ///
- [JsonProperty(PropertyName = "deletedBackupItemVersion")]
- public string DeletedBackupItemVersion { get; set; }
-
- }
-}
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/PrepareDataMoveResponse.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/PrepareDataMoveResponse.cs
index 5d5ce2f21af9..f06503738b7c 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/PrepareDataMoveResponse.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/PrepareDataMoveResponse.cs
@@ -18,7 +18,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models
///
/// Prepare DataMove Response
///
- public partial class PrepareDataMoveResponse
+ public partial class PrepareDataMoveResponse : VaultStorageConfigOperationResultResponse
{
///
/// Initializes a new instance of the PrepareDataMoveResponse class.
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/VaultStorageConfigOperationResultResponse.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/VaultStorageConfigOperationResultResponse.cs
index 50b2efa8e104..33d5948a0c8c 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/VaultStorageConfigOperationResultResponse.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/Models/VaultStorageConfigOperationResultResponse.cs
@@ -10,12 +10,10 @@
namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models
{
- using Microsoft.Rest;
- using Newtonsoft.Json;
using System.Linq;
///
- /// Operation result response for VaultStorageConfig
+ /// Operation result response for Vault Storage Config
///
public partial class VaultStorageConfigOperationResultResponse
{
@@ -28,38 +26,11 @@ public VaultStorageConfigOperationResultResponse()
CustomInit();
}
- ///
- /// Initializes a new instance of the
- /// VaultStorageConfigOperationResultResponse class.
- ///
- public VaultStorageConfigOperationResultResponse(string objectType)
- {
- ObjectType = objectType;
- CustomInit();
- }
///
/// An initialization method that performs custom operations like setting defaults
///
partial void CustomInit();
- ///
- ///
- [JsonProperty(PropertyName = "objectType")]
- public string ObjectType { get; set; }
-
- ///
- /// Validate the object.
- ///
- ///
- /// Thrown if validation fails
- ///
- public virtual void Validate()
- {
- if (ObjectType == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "ObjectType");
- }
- }
}
}
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/RecoveryPointsCrrOperations.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/RecoveryPointsCrrOperations.cs
deleted file mode 100644
index 7ecbb8c5298a..000000000000
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/RecoveryPointsCrrOperations.cs
+++ /dev/null
@@ -1,462 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.RecoveryServices.Backup
-{
- using Microsoft.Rest;
- using Microsoft.Rest.Azure;
- using Microsoft.Rest.Azure.OData;
- 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;
-
- ///
- /// RecoveryPointsCrrOperations operations.
- ///
- internal partial class RecoveryPointsCrrOperations : IServiceOperations, IRecoveryPointsCrrOperations
- {
- ///
- /// Initializes a new instance of the RecoveryPointsCrrOperations class.
- ///
- ///
- /// Reference to the service client.
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- internal RecoveryPointsCrrOperations(RecoveryServicesBackupClient client)
- {
- if (client == null)
- {
- throw new System.ArgumentNullException("client");
- }
- Client = client;
- }
-
- ///
- /// Gets a reference to the RecoveryServicesBackupClient
- ///
- public RecoveryServicesBackupClient Client { get; private set; }
-
- ///
- /// Lists the backup copies for the backed up item.
- ///
- ///
- /// The name of the recovery services vault.
- ///
- ///
- /// The name of the resource group where the recovery services vault is
- /// present.
- ///
- ///
- /// Fabric name associated with the backed up item.
- ///
- ///
- /// Container name associated with the backed up item.
- ///
- ///
- /// Backed up item whose backup copies are to be fetched.
- ///
- ///
- /// OData parameters to apply to the 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>> ListWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, ODataQuery odataQuery = default(ODataQuery), 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 (fabricName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "fabricName");
- }
- if (containerName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "containerName");
- }
- if (protectedItemName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "protectedItemName");
- }
- string apiVersion = "2018-12-20";
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("odataQuery", odataQuery);
- tracingParameters.Add("apiVersion", apiVersion);
- tracingParameters.Add("vaultName", vaultName);
- tracingParameters.Add("resourceGroupName", resourceGroupName);
- tracingParameters.Add("fabricName", fabricName);
- tracingParameters.Add("containerName", containerName);
- tracingParameters.Add("protectedItemName", protectedItemName);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "List", 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}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/").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("{fabricName}", System.Uri.EscapeDataString(fabricName));
- _url = _url.Replace("{containerName}", System.Uri.EscapeDataString(containerName));
- _url = _url.Replace("{protectedItemName}", System.Uri.EscapeDataString(protectedItemName));
- List _queryParameters = new List();
- if (odataQuery != null)
- {
- var _odataFilter = odataQuery.ToString();
- if (!string.IsNullOrEmpty(_odataFilter))
- {
- _queryParameters.Add(_odataFilter);
- }
- }
- 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;
- }
-
- ///
- /// Lists the backup copies for the backed up item.
- ///
- ///
- /// 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>> ListNextWithHttpMessagesAsync(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, "ListNext", 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/RecoveryPointsCrrOperationsExtensions.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/RecoveryPointsCrrOperationsExtensions.cs
deleted file mode 100644
index d92fd9e88fe9..000000000000
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/RecoveryPointsCrrOperationsExtensions.cs
+++ /dev/null
@@ -1,126 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.RecoveryServices.Backup
-{
- using Microsoft.Rest;
- using Microsoft.Rest.Azure;
- using Microsoft.Rest.Azure.OData;
- using Models;
- using System.Threading;
- using System.Threading.Tasks;
-
- ///
- /// Extension methods for RecoveryPointsCrrOperations.
- ///
- public static partial class RecoveryPointsCrrOperationsExtensions
- {
- ///
- /// Lists the backup copies for the backed up item.
- ///
- ///
- /// 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.
- ///
- ///
- /// Fabric name associated with the backed up item.
- ///
- ///
- /// Container name associated with the backed up item.
- ///
- ///
- /// Backed up item whose backup copies are to be fetched.
- ///
- ///
- /// OData parameters to apply to the operation.
- ///
- public static IPage List(this IRecoveryPointsCrrOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, ODataQuery odataQuery = default(ODataQuery))
- {
- return operations.ListAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, odataQuery).GetAwaiter().GetResult();
- }
-
- ///
- /// Lists the backup copies for the backed up item.
- ///
- ///
- /// 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.
- ///
- ///
- /// Fabric name associated with the backed up item.
- ///
- ///
- /// Container name associated with the backed up item.
- ///
- ///
- /// Backed up item whose backup copies are to be fetched.
- ///
- ///
- /// OData parameters to apply to the operation.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task> ListAsync(this IRecoveryPointsCrrOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, ODataQuery odataQuery = default(ODataQuery), CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.ListWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, odataQuery, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- ///
- /// Lists the backup copies for the backed up item.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The NextLink from the previous successful call to List operation.
- ///
- public static IPage ListNext(this IRecoveryPointsCrrOperations operations, string nextPageLink)
- {
- return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult();
- }
-
- ///
- /// Lists the backup copies for the backed up item.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The NextLink from the previous successful call to List operation.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task> ListNextAsync(this IRecoveryPointsCrrOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- }
-}
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 b3b6d724b958..633a2d828927 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
@@ -519,238 +519,6 @@ internal RecoveryPointsOperations(RecoveryServicesBackupClient client)
return _result;
}
- ///
- /// Returns the Access token for communication between BMS and Protection
- /// service
- ///
- ///
- /// The name of the recovery services vault.
- ///
- ///
- /// The name of the resource group where the recovery services vault is
- /// present.
- ///
- ///
- /// Fabric name associated with the container.
- ///
- ///
- /// Name of the container.
- ///
- ///
- /// Name of the Protected Item.
- ///
- ///
- /// Recovery Point Id
- ///
- ///
- /// 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> GetAccessTokenWithHttpMessagesAsync(string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, 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 (fabricName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "fabricName");
- }
- if (containerName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "containerName");
- }
- if (protectedItemName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "protectedItemName");
- }
- if (recoveryPointId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "recoveryPointId");
- }
- string apiVersion = "2018-12-20";
- // 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("fabricName", fabricName);
- tracingParameters.Add("containerName", containerName);
- tracingParameters.Add("protectedItemName", protectedItemName);
- tracingParameters.Add("recoveryPointId", recoveryPointId);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "GetAccessToken", 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}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointId}/accessToken").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("{fabricName}", System.Uri.EscapeDataString(fabricName));
- _url = _url.Replace("{containerName}", System.Uri.EscapeDataString(containerName));
- _url = _url.Replace("{protectedItemName}", System.Uri.EscapeDataString(protectedItemName));
- _url = _url.Replace("{recoveryPointId}", System.Uri.EscapeDataString(recoveryPointId));
- List _queryParameters = new List();
- if (apiVersion != null)
- {
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
- }
- if (_queryParameters.Count > 0)
- {
- _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
- }
- // Create HTTP transport objects
- var _httpRequest = new HttpRequestMessage();
- HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("POST");
- _httpRequest.RequestUri = new System.Uri(_url);
- // Set Headers
- if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
- {
- _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
- }
- if (Client.AcceptLanguage != null)
- {
- if (_httpRequest.Headers.Contains("accept-language"))
- {
- _httpRequest.Headers.Remove("accept-language");
- }
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
- }
-
-
- if (customHeaders != null)
- {
- foreach (var _header in customHeaders)
- {
- if (_httpRequest.Headers.Contains(_header.Key))
- {
- _httpRequest.Headers.Remove(_header.Key);
- }
- _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
- }
- }
-
- // Serialize Request
- string _requestContent = null;
- // Set Credentials
- if (Client.Credentials != null)
- {
- cancellationToken.ThrowIfCancellationRequested();
- await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- }
- // Send Request
- if (_shouldTrace)
- {
- ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- if (_shouldTrace)
- {
- ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
- }
- 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;
- }
-
///
/// Lists the backup copies for the backed up item.
///
diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/RecoveryPointsOperationsExtensions.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/RecoveryPointsOperationsExtensions.cs
index 6d93906ad872..e6ecbe1a9930 100644
--- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/RecoveryPointsOperationsExtensions.cs
+++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/Generated/RecoveryPointsOperationsExtensions.cs
@@ -160,74 +160,6 @@ public static RecoveryPointResource Get(this IRecoveryPointsOperations operation
}
}
- ///
- /// Returns the Access token for communication between BMS and Protection
- /// service
- ///
- ///
- /// 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.
- ///
- ///
- /// Fabric name associated with the container.
- ///
- ///
- /// Name of the container.
- ///
- ///
- /// Name of the Protected Item.
- ///
- ///
- /// Recovery Point Id
- ///
- public static CrrAccessTokenResource GetAccessToken(this IRecoveryPointsOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId)
- {
- return operations.GetAccessTokenAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointId).GetAwaiter().GetResult();
- }
-
- ///
- /// Returns the Access token for communication between BMS and Protection
- /// service
- ///
- ///
- /// 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.
- ///
- ///
- /// Fabric name associated with the container.
- ///
- ///
- /// Name of the container.
- ///
- ///
- /// Name of the Protected Item.
- ///
- ///
- /// Recovery Point Id
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task GetAccessTokenAsync(this IRecoveryPointsOperations operations, string vaultName, string resourceGroupName, string fabricName, string containerName, string protectedItemName, string recoveryPointId, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.GetAccessTokenWithHttpMessagesAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointId, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
///
/// Lists the backup copies for the backed up item.
///
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 785d8e6a5fde..f0948631d1ba 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
@@ -161,46 +161,6 @@ public partial class RecoveryServicesBackupClient : ServiceClient
public virtual IOperationOperations Operation { get; private set; }
- ///
- /// Gets the IAadPropertiesOperations.
- ///
- public virtual IAadPropertiesOperations AadProperties { get; private set; }
-
- ///
- /// Gets the ICrossRegionRestoreOperations.
- ///
- public virtual ICrossRegionRestoreOperations CrossRegionRestore { get; private set; }
-
- ///
- /// Gets the IBackupCrrJobDetailsOperations.
- ///
- public virtual IBackupCrrJobDetailsOperations BackupCrrJobDetails { get; private set; }
-
- ///
- /// Gets the IBackupCrrJobsOperations.
- ///
- public virtual IBackupCrrJobsOperations BackupCrrJobs { get; private set; }
-
- ///
- /// Gets the ICrrOperationResultsOperations.
- ///
- public virtual ICrrOperationResultsOperations CrrOperationResults { get; private set; }
-
- ///
- /// Gets the ICrrOperationStatusOperations.
- ///
- public virtual ICrrOperationStatusOperations CrrOperationStatus { get; private set; }
-
- ///
- /// Gets the IRecoveryPointsCrrOperations.
- ///
- public virtual IRecoveryPointsCrrOperations RecoveryPointsCrr { get; private set; }
-
- ///
- /// Gets the IBackupProtectedItemsCrrOperations.
- ///
- public virtual IBackupProtectedItemsCrrOperations BackupProtectedItemsCrr { get; private set; }
-
///
/// Gets the IProtectionIntentOperations.
///
@@ -570,14 +530,6 @@ private void Initialize()
Jobs = new JobsOperations(this);
BackupProtectedItems = new BackupProtectedItemsOperations(this);
Operation = new OperationOperations(this);
- AadProperties = new AadPropertiesOperations(this);
- CrossRegionRestore = new CrossRegionRestoreOperations(this);
- BackupCrrJobDetails = new BackupCrrJobDetailsOperations(this);
- BackupCrrJobs = new BackupCrrJobsOperations(this);
- CrrOperationResults = new CrrOperationResultsOperations(this);
- CrrOperationStatus = new CrrOperationStatusOperations(this);
- RecoveryPointsCrr = new RecoveryPointsCrrOperations(this);
- BackupProtectedItemsCrr = new BackupProtectedItemsCrrOperations(this);
ProtectionIntent = new ProtectionIntentOperations(this);
BackupStatus = new BackupStatusOperations(this);
FeatureSupport = new FeatureSupportOperations(this);
@@ -629,6 +581,8 @@ private void Initialize()
new Iso8601TimeSpanConverter()
}
};
+ SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("objectType"));
+ DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("objectType"));
SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("objectType"));
DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("objectType"));
SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("schedulePolicyType"));
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 752ea1f5a081..7406bd74cc16 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
@@ -19,9 +19,6 @@ public static IEnumerable> ApiInfo_RecoveryService
{
return new Tuple[]
{
- new Tuple("RecoveryServices", "AadProperties", "2018-12-20"),
- new Tuple("RecoveryServices", "BackupCrrJobDetails", "2018-12-20"),
- new Tuple("RecoveryServices", "BackupCrrJobs", "2018-12-20"),
new Tuple("RecoveryServices", "BMSPrepareDataMove", "2020-07-01"),
new Tuple("RecoveryServices", "BMSPrepareDataMoveOperationResult", "2020-07-01"),
new Tuple("RecoveryServices", "BMSTriggerDataMove", "2020-07-01"),
@@ -32,7 +29,6 @@ public static IEnumerable> ApiInfo_RecoveryService
new Tuple("RecoveryServices", "BackupPolicies", "2019-06-15"),
new Tuple("RecoveryServices", "BackupProtectableItems", "2016-12-01"),
new Tuple("RecoveryServices", "BackupProtectedItems", "2019-06-15"),
- new Tuple("RecoveryServices", "BackupProtectedItemsCrr", "2018-12-20"),
new Tuple("RecoveryServices", "BackupProtectionContainers", "2016-12-01"),
new Tuple("RecoveryServices", "BackupProtectionIntent", "2017-07-01"),
new Tuple("RecoveryServices", "BackupResourceStorageConfigs", "2016-12-01"),
@@ -42,9 +38,6 @@ public static IEnumerable> ApiInfo_RecoveryService
new Tuple("RecoveryServices", "BackupWorkloadItems", "2016-12-01"),
new Tuple("RecoveryServices", "Backups", "2016-12-01"),
new Tuple("RecoveryServices", "ExportJobsOperationResults", "2019-06-15"),
- new Tuple("RecoveryServices", "CrossRegionRestore", "2018-12-20"),
- new Tuple("RecoveryServices", "CrrOperationResults", "2018-12-20"),
- new Tuple("RecoveryServices", "CrrOperationStatus", "2018-12-20"),
new Tuple("RecoveryServices", "FeatureSupport", "2017-07-01"),
new Tuple("RecoveryServices", "GetOperationStatus", "2020-02-02"),
new Tuple("RecoveryServices", "GetOperationStatus", "2020-07-01"),
@@ -70,22 +63,9 @@ public static IEnumerable> ApiInfo_RecoveryService
new Tuple("RecoveryServices", "ProtectionPolicyOperationStatuses", "2016-12-01"),
new Tuple("RecoveryServices", "RecoveryPoints", "2019-06-15"),
new Tuple("RecoveryServices", "Restores", "2019-06-15"),
- new Tuple("RecoveryServices", "RecoveryPoints", "2018-12-20"),
- new Tuple("RecoveryServices", "RecoveryPointsCrr", "2018-12-20"),
new Tuple("RecoveryServices", "SecurityPINs", "2016-12-01"),
}.AsEnumerable();
}
}
- // BEGIN: Code Generation Metadata Section
- public static readonly String AutoRestVersion = "v2";
- public static readonly String AutoRestBootStrapperVersion = "autorest@2.0.4413";
- 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 --tag=package-2020-07 --csharp-sdks-folder=C:\\SwaggerSDK\\azure-sdk-for-net\\sdk";
- public static readonly String GithubForkName = "Azure";
- public static readonly String GithubBranchName = "master";
- public static readonly String GithubCommidId = "24773c685796a5242117e316bbefef2755869bd3";
- public static readonly String CodeGenerationErrors = "";
- public static readonly String GithubRepoName = "azure-rest-api-specs";
- // END: Code Generation Metadata Section
}
}
-