diff --git a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/BackupInstancesOperations.cs b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/BackupInstancesOperations.cs
index 0b6a3d3a3c94d..71fde8e99f028 100644
--- a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/BackupInstancesOperations.cs
+++ b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/BackupInstancesOperations.cs
@@ -632,10 +632,10 @@ internal BackupInstancesOperations(DataProtectionClient client)
///
/// The cancellation token.
///
- public async Task> ValidateRestoreWithHttpMessagesAsync(string vaultName, string resourceGroupName, string backupInstanceName, AzureBackupRestoreRequest restoreRequestObject, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> ValidateForRestoreWithHttpMessagesAsync(string vaultName, string resourceGroupName, string backupInstanceName, AzureBackupRestoreRequest restoreRequestObject, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
// Send request
- AzureOperationResponse _response = await BeginValidateRestoreWithHttpMessagesAsync(vaultName, resourceGroupName, backupInstanceName, restoreRequestObject, customHeaders, cancellationToken).ConfigureAwait(false);
+ AzureOperationResponse _response = await BeginValidateForRestoreWithHttpMessagesAsync(vaultName, resourceGroupName, backupInstanceName, restoreRequestObject, customHeaders, cancellationToken).ConfigureAwait(false);
return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
}
@@ -2035,7 +2035,7 @@ internal BackupInstancesOperations(DataProtectionClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> BeginValidateRestoreWithHttpMessagesAsync(string vaultName, string resourceGroupName, string backupInstanceName, AzureBackupRestoreRequest restoreRequestObject, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> BeginValidateForRestoreWithHttpMessagesAsync(string vaultName, string resourceGroupName, string backupInstanceName, AzureBackupRestoreRequest restoreRequestObject, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.ApiVersion == null)
{
@@ -2082,7 +2082,7 @@ internal BackupInstancesOperations(DataProtectionClient client)
tracingParameters.Add("backupInstanceName", backupInstanceName);
tracingParameters.Add("parameters", parameters);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "BeginValidateRestore", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "BeginValidateForRestore", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
@@ -2195,7 +2195,7 @@ internal BackupInstancesOperations(DataProtectionClient client)
throw ex;
}
// Create Result
- var _result = new AzureOperationResponse();
+ var _result = new AzureOperationResponse();
_result.Request = _httpRequest;
_result.Response = _httpResponse;
if (_httpResponse.Headers.Contains("x-ms-request-id"))
@@ -2222,7 +2222,7 @@ internal BackupInstancesOperations(DataProtectionClient client)
}
try
{
- _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings));
+ _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings));
}
catch (JsonException ex)
{
diff --git a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/BackupInstancesOperationsExtensions.cs b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/BackupInstancesOperationsExtensions.cs
index 811cdb7bb7279..a1b6ffdb9073a 100644
--- a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/BackupInstancesOperationsExtensions.cs
+++ b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/BackupInstancesOperationsExtensions.cs
@@ -421,9 +421,9 @@ public static OperationJobExtendedInfo TriggerRestore(this IBackupInstancesOpera
///
/// Gets or sets the restore request object.
///
- public static OperationJobExtendedInfo ValidateRestore(this IBackupInstancesOperations operations, string vaultName, string resourceGroupName, string backupInstanceName, AzureBackupRestoreRequest restoreRequestObject)
+ public static OperationJobExtendedInfo ValidateForRestore(this IBackupInstancesOperations operations, string vaultName, string resourceGroupName, string backupInstanceName, AzureBackupRestoreRequest restoreRequestObject)
{
- return operations.ValidateRestoreAsync(vaultName, resourceGroupName, backupInstanceName, restoreRequestObject).GetAwaiter().GetResult();
+ return operations.ValidateForRestoreAsync(vaultName, resourceGroupName, backupInstanceName, restoreRequestObject).GetAwaiter().GetResult();
}
///
@@ -447,9 +447,9 @@ public static OperationJobExtendedInfo ValidateRestore(this IBackupInstancesOper
///
/// The cancellation token.
///
- public static async Task ValidateRestoreAsync(this IBackupInstancesOperations operations, string vaultName, string resourceGroupName, string backupInstanceName, AzureBackupRestoreRequest restoreRequestObject, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task ValidateForRestoreAsync(this IBackupInstancesOperations operations, string vaultName, string resourceGroupName, string backupInstanceName, AzureBackupRestoreRequest restoreRequestObject, CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.ValidateRestoreWithHttpMessagesAsync(vaultName, resourceGroupName, backupInstanceName, restoreRequestObject, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.ValidateForRestoreWithHttpMessagesAsync(vaultName, resourceGroupName, backupInstanceName, restoreRequestObject, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
@@ -769,9 +769,9 @@ public static OperationJobExtendedInfo BeginTriggerRestore(this IBackupInstances
///
/// Gets or sets the restore request object.
///
- public static OperationJobExtendedInfo BeginValidateRestore(this IBackupInstancesOperations operations, string vaultName, string resourceGroupName, string backupInstanceName, AzureBackupRestoreRequest restoreRequestObject)
+ public static OperationJobExtendedInfo BeginValidateForRestore(this IBackupInstancesOperations operations, string vaultName, string resourceGroupName, string backupInstanceName, AzureBackupRestoreRequest restoreRequestObject)
{
- return operations.BeginValidateRestoreAsync(vaultName, resourceGroupName, backupInstanceName, restoreRequestObject).GetAwaiter().GetResult();
+ return operations.BeginValidateForRestoreAsync(vaultName, resourceGroupName, backupInstanceName, restoreRequestObject).GetAwaiter().GetResult();
}
///
@@ -795,9 +795,9 @@ public static OperationJobExtendedInfo BeginValidateRestore(this IBackupInstance
///
/// The cancellation token.
///
- public static async Task BeginValidateRestoreAsync(this IBackupInstancesOperations operations, string vaultName, string resourceGroupName, string backupInstanceName, AzureBackupRestoreRequest restoreRequestObject, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task BeginValidateForRestoreAsync(this IBackupInstancesOperations operations, string vaultName, string resourceGroupName, string backupInstanceName, AzureBackupRestoreRequest restoreRequestObject, CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.BeginValidateRestoreWithHttpMessagesAsync(vaultName, resourceGroupName, backupInstanceName, restoreRequestObject, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.BeginValidateForRestoreWithHttpMessagesAsync(vaultName, resourceGroupName, backupInstanceName, restoreRequestObject, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
diff --git a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/BackupPoliciesOperations.cs b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/BackupPoliciesOperations.cs
index cab2079c5415b..f261279d84196 100644
--- a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/BackupPoliciesOperations.cs
+++ b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/BackupPoliciesOperations.cs
@@ -463,6 +463,7 @@ internal BackupPoliciesOperations(DataProtectionClient client)
/// The name of the resource group where the backup vault is present.
///
///
+ /// Name of the policy
///
///
/// Request body for operation
diff --git a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/BackupPoliciesOperationsExtensions.cs b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/BackupPoliciesOperationsExtensions.cs
index d55ed26c73937..7046f6843383c 100644
--- a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/BackupPoliciesOperationsExtensions.cs
+++ b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/BackupPoliciesOperationsExtensions.cs
@@ -124,6 +124,7 @@ public static BaseBackupPolicyResource Get(this IBackupPoliciesOperations operat
/// The name of the resource group where the backup vault is present.
///
///
+ /// Name of the policy
///
///
/// Request body for operation
@@ -146,6 +147,7 @@ public static BaseBackupPolicyResource CreateOrUpdate(this IBackupPoliciesOperat
/// The name of the resource group where the backup vault is present.
///
///
+ /// Name of the policy
///
///
/// Request body for operation
diff --git a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/JobOperations.cs b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/BackupVaultOperationResultsOperations.cs
similarity index 89%
rename from sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/JobOperations.cs
rename to sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/BackupVaultOperationResultsOperations.cs
index 578839820c51d..a57c0c2549fb6 100644
--- a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/JobOperations.cs
+++ b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/BackupVaultOperationResultsOperations.cs
@@ -23,12 +23,12 @@ namespace Microsoft.Azure.Management.DataProtection
using System.Threading.Tasks;
///
- /// JobOperations operations.
+ /// BackupVaultOperationResultsOperations operations.
///
- internal partial class JobOperations : IServiceOperations, IJobOperations
+ internal partial class BackupVaultOperationResultsOperations : IServiceOperations, IBackupVaultOperationResultsOperations
{
///
- /// Initializes a new instance of the JobOperations class.
+ /// Initializes a new instance of the BackupVaultOperationResultsOperations class.
///
///
/// Reference to the service client.
@@ -36,7 +36,7 @@ internal partial class JobOperations : IServiceOperations,
///
/// Thrown when a required parameter is null
///
- internal JobOperations(DataProtectionClient client)
+ internal BackupVaultOperationResultsOperations(DataProtectionClient client)
{
if (client == null)
{
@@ -50,18 +50,13 @@ internal JobOperations(DataProtectionClient client)
///
public DataProtectionClient Client { get; private set; }
- ///
- /// Gets a job with id in a backup vault
- ///
- ///
- /// The name of the resource group where the backup vault is present.
- ///
///
/// The name of the backup vault.
///
- ///
- /// The Job ID. This is a GUID-formatted string (e.g.
- /// 00000000-0000-0000-0000-000000000000).
+ ///
+ /// The name of the resource group where the backup vault is present.
+ ///
+ ///
///
///
/// Headers that will be added to request.
@@ -84,27 +79,27 @@ internal JobOperations(DataProtectionClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string vaultName, string jobId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.ApiVersion == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
}
- if (Client.SubscriptionId == null)
+ if (vaultName == null)
{
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ throw new ValidationException(ValidationRules.CannotBeNull, "vaultName");
}
if (resourceGroupName == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
- if (vaultName == null)
+ if (Client.SubscriptionId == null)
{
- throw new ValidationException(ValidationRules.CannotBeNull, "vaultName");
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
- if (jobId == null)
+ if (operationId == null)
{
- throw new ValidationException(ValidationRules.CannotBeNull, "jobId");
+ throw new ValidationException(ValidationRules.CannotBeNull, "operationId");
}
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
@@ -113,19 +108,19 @@ internal JobOperations(DataProtectionClient client)
{
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("vaultName", vaultName);
- tracingParameters.Add("jobId", jobId);
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ 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}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupJobs/{jobId}").ToString();
- _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/operationResults/{operationId}").ToString();
_url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName));
- _url = _url.Replace("{jobId}", System.Uri.EscapeDataString(jobId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(operationId));
List _queryParameters = new List();
if (Client.ApiVersion != null)
{
@@ -224,7 +219,7 @@ internal JobOperations(DataProtectionClient client)
throw ex;
}
// Create Result
- var _result = new AzureOperationResponse();
+ var _result = new AzureOperationResponse();
_result.Request = _httpRequest;
_result.Response = _httpResponse;
if (_httpResponse.Headers.Contains("x-ms-request-id"))
@@ -237,7 +232,7 @@ internal JobOperations(DataProtectionClient client)
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
try
{
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
}
catch (JsonException ex)
{
diff --git a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/JobOperationsExtensions.cs b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/BackupVaultOperationResultsOperationsExtensions.cs
similarity index 59%
rename from sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/JobOperationsExtensions.cs
rename to sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/BackupVaultOperationResultsOperationsExtensions.cs
index f2faadb5fc68c..4c8ef4e40199f 100644
--- a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/JobOperationsExtensions.cs
+++ b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/BackupVaultOperationResultsOperationsExtensions.cs
@@ -17,53 +17,43 @@ namespace Microsoft.Azure.Management.DataProtection
using System.Threading.Tasks;
///
- /// Extension methods for JobOperations.
+ /// Extension methods for BackupVaultOperationResultsOperations.
///
- public static partial class JobOperationsExtensions
+ public static partial class BackupVaultOperationResultsOperationsExtensions
{
- ///
- /// Gets a job with id in a backup vault
- ///
///
/// The operations group for this extension method.
///
- ///
- /// The name of the resource group where the backup vault is present.
- ///
///
/// The name of the backup vault.
///
- ///
- /// The Job ID. This is a GUID-formatted string (e.g.
- /// 00000000-0000-0000-0000-000000000000).
+ ///
+ /// The name of the resource group where the backup vault is present.
+ ///
+ ///
///
- public static AzureBackupJobResource Get(this IJobOperations operations, string resourceGroupName, string vaultName, string jobId)
+ public static BackupVaultResource Get(this IBackupVaultOperationResultsOperations operations, string vaultName, string resourceGroupName, string operationId)
{
- return operations.GetAsync(resourceGroupName, vaultName, jobId).GetAwaiter().GetResult();
+ return operations.GetAsync(vaultName, resourceGroupName, operationId).GetAwaiter().GetResult();
}
- ///
- /// Gets a job with id in a backup vault
- ///
///
/// The operations group for this extension method.
///
- ///
- /// The name of the resource group where the backup vault is present.
- ///
///
/// The name of the backup vault.
///
- ///
- /// The Job ID. This is a GUID-formatted string (e.g.
- /// 00000000-0000-0000-0000-000000000000).
+ ///
+ /// The name of the resource group where the backup vault is present.
+ ///
+ ///
///
///
/// The cancellation token.
///
- public static async Task GetAsync(this IJobOperations operations, string resourceGroupName, string vaultName, string jobId, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task GetAsync(this IBackupVaultOperationResultsOperations operations, string vaultName, string resourceGroupName, string operationId, CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, vaultName, jobId, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.GetWithHttpMessagesAsync(vaultName, resourceGroupName, operationId, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
diff --git a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/BackupVaultsOperations.cs b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/BackupVaultsOperations.cs
index e9768b0e5e37c..b15138438612a 100644
--- a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/BackupVaultsOperations.cs
+++ b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/BackupVaultsOperations.cs
@@ -74,7 +74,7 @@ internal BackupVaultsOperations(DataProtectionClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task>> GetResourcesInSubscriptionWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task>> GetInSubscriptionWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.ApiVersion == null)
{
@@ -92,7 +92,7 @@ internal BackupVaultsOperations(DataProtectionClient client)
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "GetResourcesInSubscription", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "GetInSubscription", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
@@ -255,7 +255,7 @@ internal BackupVaultsOperations(DataProtectionClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task>> GetResourcesInResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task>> GetInResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.ApiVersion == null)
{
@@ -278,7 +278,7 @@ internal BackupVaultsOperations(DataProtectionClient client)
Dictionary tracingParameters = new Dictionary();
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "GetResourcesInResourceGroup", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "GetInResourceGroup", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
@@ -830,10 +830,10 @@ internal BackupVaultsOperations(DataProtectionClient client)
///
/// The cancellation token.
///
- public async Task> PatchWithHttpMessagesAsync(string vaultName, string resourceGroupName, PatchResourceRequestInput parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> UpdateWithHttpMessagesAsync(string vaultName, string resourceGroupName, PatchResourceRequestInput parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
// Send Request
- AzureOperationResponse _response = await BeginPatchWithHttpMessagesAsync(vaultName, resourceGroupName, parameters, customHeaders, cancellationToken).ConfigureAwait(false);
+ AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(vaultName, resourceGroupName, parameters, customHeaders, cancellationToken).ConfigureAwait(false);
return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
}
@@ -1313,7 +1313,7 @@ internal BackupVaultsOperations(DataProtectionClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> BeginPatchWithHttpMessagesAsync(string vaultName, string resourceGroupName, PatchResourceRequestInput parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> BeginUpdateWithHttpMessagesAsync(string vaultName, string resourceGroupName, PatchResourceRequestInput parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.ApiVersion == null)
{
@@ -1346,7 +1346,7 @@ internal BackupVaultsOperations(DataProtectionClient client)
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("parameters", parameters);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "BeginPatch", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "BeginUpdate", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
@@ -1517,7 +1517,7 @@ internal BackupVaultsOperations(DataProtectionClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task>> GetResourcesInSubscriptionNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task>> GetInSubscriptionNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (nextPageLink == null)
{
@@ -1532,7 +1532,7 @@ internal BackupVaultsOperations(DataProtectionClient client)
Dictionary tracingParameters = new Dictionary();
tracingParameters.Add("nextPageLink", nextPageLink);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "GetResourcesInSubscriptionNext", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "GetInSubscriptionNext", tracingParameters);
}
// Construct URL
string _url = "{nextLink}";
@@ -1690,7 +1690,7 @@ internal BackupVaultsOperations(DataProtectionClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task>> GetResourcesInResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task>> GetInResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (nextPageLink == null)
{
@@ -1705,7 +1705,7 @@ internal BackupVaultsOperations(DataProtectionClient client)
Dictionary tracingParameters = new Dictionary();
tracingParameters.Add("nextPageLink", nextPageLink);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "GetResourcesInResourceGroupNext", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "GetInResourceGroupNext", tracingParameters);
}
// Construct URL
string _url = "{nextLink}";
diff --git a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/BackupVaultsOperationsExtensions.cs b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/BackupVaultsOperationsExtensions.cs
index 60b269f48c1f1..f4c6667a53505 100644
--- a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/BackupVaultsOperationsExtensions.cs
+++ b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/BackupVaultsOperationsExtensions.cs
@@ -27,9 +27,9 @@ public static partial class BackupVaultsOperationsExtensions
///
/// The operations group for this extension method.
///
- public static IPage GetResourcesInSubscription(this IBackupVaultsOperations operations)
+ public static IPage GetInSubscription(this IBackupVaultsOperations operations)
{
- return operations.GetResourcesInSubscriptionAsync().GetAwaiter().GetResult();
+ return operations.GetInSubscriptionAsync().GetAwaiter().GetResult();
}
///
@@ -41,9 +41,9 @@ public static IPage GetResourcesInSubscription(this IBackup
///
/// The cancellation token.
///
- public static async Task> GetResourcesInSubscriptionAsync(this IBackupVaultsOperations operations, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task> GetInSubscriptionAsync(this IBackupVaultsOperations operations, CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.GetResourcesInSubscriptionWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.GetInSubscriptionWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
@@ -58,9 +58,9 @@ public static IPage GetResourcesInSubscription(this IBackup
///
/// The name of the resource group where the backup vault is present.
///
- public static IPage GetResourcesInResourceGroup(this IBackupVaultsOperations operations, string resourceGroupName)
+ public static IPage GetInResourceGroup(this IBackupVaultsOperations operations, string resourceGroupName)
{
- return operations.GetResourcesInResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult();
+ return operations.GetInResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult();
}
///
@@ -75,9 +75,9 @@ public static IPage GetResourcesInResourceGroup(this IBacku
///
/// The cancellation token.
///
- public static async Task> GetResourcesInResourceGroupAsync(this IBackupVaultsOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task> GetInResourceGroupAsync(this IBackupVaultsOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.GetResourcesInResourceGroupWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.GetInResourceGroupWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
@@ -222,9 +222,9 @@ public static void Delete(this IBackupVaultsOperations operations, string vaultN
///
/// Request body for operation
///
- public static BackupVaultResource Patch(this IBackupVaultsOperations operations, string vaultName, string resourceGroupName, PatchResourceRequestInput parameters)
+ public static BackupVaultResource Update(this IBackupVaultsOperations operations, string vaultName, string resourceGroupName, PatchResourceRequestInput parameters)
{
- return operations.PatchAsync(vaultName, resourceGroupName, parameters).GetAwaiter().GetResult();
+ return operations.UpdateAsync(vaultName, resourceGroupName, parameters).GetAwaiter().GetResult();
}
///
@@ -246,9 +246,9 @@ public static BackupVaultResource Patch(this IBackupVaultsOperations operations,
///
/// The cancellation token.
///
- public static async Task PatchAsync(this IBackupVaultsOperations operations, string vaultName, string resourceGroupName, PatchResourceRequestInput parameters, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task UpdateAsync(this IBackupVaultsOperations operations, string vaultName, string resourceGroupName, PatchResourceRequestInput parameters, CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.PatchWithHttpMessagesAsync(vaultName, resourceGroupName, parameters, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.UpdateWithHttpMessagesAsync(vaultName, resourceGroupName, parameters, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
@@ -362,9 +362,9 @@ public static BackupVaultResource BeginCreateOrUpdate(this IBackupVaultsOperatio
///
/// Request body for operation
///
- public static BackupVaultResource BeginPatch(this IBackupVaultsOperations operations, string vaultName, string resourceGroupName, PatchResourceRequestInput parameters)
+ public static BackupVaultResource BeginUpdate(this IBackupVaultsOperations operations, string vaultName, string resourceGroupName, PatchResourceRequestInput parameters)
{
- return operations.BeginPatchAsync(vaultName, resourceGroupName, parameters).GetAwaiter().GetResult();
+ return operations.BeginUpdateAsync(vaultName, resourceGroupName, parameters).GetAwaiter().GetResult();
}
///
@@ -386,9 +386,9 @@ public static BackupVaultResource BeginPatch(this IBackupVaultsOperations operat
///
/// The cancellation token.
///
- public static async Task BeginPatchAsync(this IBackupVaultsOperations operations, string vaultName, string resourceGroupName, PatchResourceRequestInput parameters, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task BeginUpdateAsync(this IBackupVaultsOperations operations, string vaultName, string resourceGroupName, PatchResourceRequestInput parameters, CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.BeginPatchWithHttpMessagesAsync(vaultName, resourceGroupName, parameters, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(vaultName, resourceGroupName, parameters, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
@@ -403,9 +403,9 @@ public static BackupVaultResource BeginPatch(this IBackupVaultsOperations operat
///
/// The NextLink from the previous successful call to List operation.
///
- public static IPage GetResourcesInSubscriptionNext(this IBackupVaultsOperations operations, string nextPageLink)
+ public static IPage GetInSubscriptionNext(this IBackupVaultsOperations operations, string nextPageLink)
{
- return operations.GetResourcesInSubscriptionNextAsync(nextPageLink).GetAwaiter().GetResult();
+ return operations.GetInSubscriptionNextAsync(nextPageLink).GetAwaiter().GetResult();
}
///
@@ -420,9 +420,9 @@ public static IPage GetResourcesInSubscriptionNext(this IBa
///
/// The cancellation token.
///
- public static async Task> GetResourcesInSubscriptionNextAsync(this IBackupVaultsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task> GetInSubscriptionNextAsync(this IBackupVaultsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.GetResourcesInSubscriptionNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.GetInSubscriptionNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
@@ -437,9 +437,9 @@ public static IPage GetResourcesInSubscriptionNext(this IBa
///
/// The NextLink from the previous successful call to List operation.
///
- public static IPage GetResourcesInResourceGroupNext(this IBackupVaultsOperations operations, string nextPageLink)
+ public static IPage GetInResourceGroupNext(this IBackupVaultsOperations operations, string nextPageLink)
{
- return operations.GetResourcesInResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult();
+ return operations.GetInResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult();
}
///
@@ -454,9 +454,9 @@ public static IPage GetResourcesInResourceGroupNext(this IB
///
/// The cancellation token.
///
- public static async Task> GetResourcesInResourceGroupNextAsync(this IBackupVaultsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task> GetInResourceGroupNextAsync(this IBackupVaultsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.GetResourcesInResourceGroupNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.GetInResourceGroupNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
diff --git a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/DataProtectionClient.cs b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/DataProtectionClient.cs
index a82e959b23f54..eece4b822dd9d 100644
--- a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/DataProtectionClient.cs
+++ b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/DataProtectionClient.cs
@@ -20,8 +20,6 @@ namespace Microsoft.Azure.Management.DataProtection
using System.Linq;
using System.Net;
using System.Net.Http;
- using System.Threading;
- using System.Threading.Tasks;
///
/// Open API 2.0 Specs for Azure Data Protection service
@@ -87,9 +85,24 @@ public partial class DataProtectionClient : ServiceClient,
public virtual IOperationResultOperations OperationResult { get; private set; }
///
- /// Gets the IOperations.
+ /// Gets the IOperationStatusOperations.
///
- public virtual IOperations Operations { get; private set; }
+ public virtual IOperationStatusOperations OperationStatus { get; private set; }
+
+ ///
+ /// Gets the IBackupVaultOperationResultsOperations.
+ ///
+ public virtual IBackupVaultOperationResultsOperations BackupVaultOperationResults { get; private set; }
+
+ ///
+ /// Gets the IDataProtectionOperations.
+ ///
+ public virtual IDataProtectionOperations DataProtection { get; private set; }
+
+ ///
+ /// Gets the IDataProtectionOperationsOperations.
+ ///
+ public virtual IDataProtectionOperationsOperations DataProtectionOperations { get; private set; }
///
/// Gets the IBackupPoliciesOperations.
@@ -106,25 +119,15 @@ public partial class DataProtectionClient : ServiceClient,
///
public virtual IRecoveryPointsOperations RecoveryPoints { get; private set; }
- ///
- /// Gets the IRecoveryPointOperations.
- ///
- public virtual IRecoveryPointOperations RecoveryPoint { get; private set; }
-
///
/// Gets the IJobsOperations.
///
public virtual IJobsOperations Jobs { get; private set; }
///
- /// Gets the IFindRestorableTimeRangesOperations.
+ /// Gets the IRestorableTimeRangesOperations.
///
- public virtual IFindRestorableTimeRangesOperations FindRestorableTimeRanges { get; private set; }
-
- ///
- /// Gets the IJobOperations.
- ///
- public virtual IJobOperations Job { get; private set; }
+ public virtual IRestorableTimeRangesOperations RestorableTimeRanges { get; private set; }
///
/// Gets the IExportJobsOperations.
@@ -379,14 +382,15 @@ private void Initialize()
{
BackupVaults = new BackupVaultsOperations(this);
OperationResult = new OperationResultOperations(this);
- Operations = new Operations(this);
+ OperationStatus = new OperationStatusOperations(this);
+ BackupVaultOperationResults = new BackupVaultOperationResultsOperations(this);
+ DataProtection = new DataProtectionOperations(this);
+ DataProtectionOperations = new DataProtectionOperationsOperations(this);
BackupPolicies = new BackupPoliciesOperations(this);
BackupInstances = new BackupInstancesOperations(this);
RecoveryPoints = new RecoveryPointsOperations(this);
- RecoveryPoint = new RecoveryPointOperations(this);
Jobs = new JobsOperations(this);
- FindRestorableTimeRanges = new FindRestorableTimeRangesOperations(this);
- Job = new JobOperations(this);
+ RestorableTimeRanges = new RestorableTimeRangesOperations(this);
ExportJobs = new ExportJobsOperations(this);
ExportJobsOperationResult = new ExportJobsOperationResultOperations(this);
BaseUri = new System.Uri("https://management.azure.com");
@@ -450,600 +454,5 @@ private void Initialize()
CustomInitialize();
DeserializationSettings.Converters.Add(new CloudErrorJsonConverter());
}
- ///
- /// Gets the operation status for a resource.
- ///
- ///
- ///
- ///
- ///
- ///
- /// 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> GetOperationStatusWithHttpMessagesAsync(string location, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (ApiVersion == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.ApiVersion");
- }
- if (SubscriptionId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.SubscriptionId");
- }
- if (location == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "location");
- }
- if (operationId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "operationId");
- }
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("location", location);
- tracingParameters.Add("operationId", operationId);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "GetOperationStatus", tracingParameters);
- }
- // Construct URL
- var _baseUrl = BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.DataProtection/locations/{location}/operationStatus/{operationId}").ToString();
- _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(SubscriptionId));
- _url = _url.Replace("{location}", System.Uri.EscapeDataString(location));
- _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 (GenerateClientRequestId != null && GenerateClientRequestId.Value)
- {
- _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
- }
- if (AcceptLanguage != null)
- {
- if (_httpRequest.Headers.Contains("accept-language"))
- {
- _httpRequest.Headers.Remove("accept-language");
- }
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Credentials != null)
- {
- cancellationToken.ThrowIfCancellationRequested();
- await Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- }
- // Send Request
- if (_shouldTrace)
- {
- ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- if (_shouldTrace)
- {
- ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
- }
- HttpStatusCode _statusCode = _httpResponse.StatusCode;
- cancellationToken.ThrowIfCancellationRequested();
- string _responseContent = null;
- if ((int)_statusCode != 200)
- {
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- try
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, 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 = SafeJsonConvert.DeserializeObject(_responseContent, 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;
- }
-
- ///
- /// The name of the backup vault.
- ///
- ///
- /// The name of the resource group where the backup vault is present.
- ///
- ///
- ///
- ///
- /// Headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// A response object containing the response body and response headers.
- ///
- public async Task> GetOperationResultPatchWithHttpMessagesAsync(string vaultName, string resourceGroupName, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (ApiVersion == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.ApiVersion");
- }
- if (vaultName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "vaultName");
- }
- if (resourceGroupName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
- }
- if (SubscriptionId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.SubscriptionId");
- }
- if (operationId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "operationId");
- }
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("vaultName", vaultName);
- tracingParameters.Add("resourceGroupName", resourceGroupName);
- tracingParameters.Add("operationId", operationId);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "GetOperationResultPatch", tracingParameters);
- }
- // Construct URL
- var _baseUrl = BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/operationResults/{operationId}").ToString();
- _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName));
- _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
- _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(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 (GenerateClientRequestId != null && GenerateClientRequestId.Value)
- {
- _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
- }
- if (AcceptLanguage != null)
- {
- if (_httpRequest.Headers.Contains("accept-language"))
- {
- _httpRequest.Headers.Remove("accept-language");
- }
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Credentials != null)
- {
- cancellationToken.ThrowIfCancellationRequested();
- await Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- }
- // Send Request
- if (_shouldTrace)
- {
- ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- if (_shouldTrace)
- {
- ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
- }
- HttpStatusCode _statusCode = _httpResponse.StatusCode;
- cancellationToken.ThrowIfCancellationRequested();
- string _responseContent = null;
- if ((int)_statusCode != 200)
- {
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- try
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, 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 = SafeJsonConvert.DeserializeObject(_responseContent, 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;
- }
-
- ///
- /// Validates if a feature is supported
- ///
- ///
- ///
- ///
- /// Feature support request object
- ///
- ///
- /// 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> CheckFeatureSupportWithHttpMessagesAsync(string location, FeatureValidationRequestBase parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (ApiVersion == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.ApiVersion");
- }
- if (SubscriptionId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.SubscriptionId");
- }
- if (location == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "location");
- }
- if (parameters == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
- }
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("location", location);
- tracingParameters.Add("parameters", parameters);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "CheckFeatureSupport", tracingParameters);
- }
- // Construct URL
- var _baseUrl = BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.DataProtection/locations/{location}/checkFeatureSupport").ToString();
- _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(SubscriptionId));
- _url = _url.Replace("{location}", System.Uri.EscapeDataString(location));
- 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 (GenerateClientRequestId != null && GenerateClientRequestId.Value)
- {
- _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
- }
- if (AcceptLanguage != null)
- {
- if (_httpRequest.Headers.Contains("accept-language"))
- {
- _httpRequest.Headers.Remove("accept-language");
- }
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 = SafeJsonConvert.SerializeObject(parameters, 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 (Credentials != null)
- {
- cancellationToken.ThrowIfCancellationRequested();
- await Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- }
- // Send Request
- if (_shouldTrace)
- {
- ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- if (_shouldTrace)
- {
- ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
- }
- HttpStatusCode _statusCode = _httpResponse.StatusCode;
- cancellationToken.ThrowIfCancellationRequested();
- string _responseContent = null;
- if ((int)_statusCode != 200)
- {
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- try
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, 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 = SafeJsonConvert.DeserializeObject(_responseContent, 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/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/DataProtectionClientExtensions.cs b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/DataProtectionClientExtensions.cs
deleted file mode 100644
index ac4e7abcc0d38..0000000000000
--- a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/DataProtectionClientExtensions.cs
+++ /dev/null
@@ -1,137 +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.DataProtection
-{
- using Microsoft.Rest;
- using Microsoft.Rest.Azure;
- using Models;
- using System.Threading;
- using System.Threading.Tasks;
-
- ///
- /// Extension methods for DataProtectionClient.
- ///
- public static partial class DataProtectionClientExtensions
- {
- ///
- /// Gets the operation status for a resource.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- ///
- ///
- ///
- public static OperationResource GetOperationStatus(this IDataProtectionClient operations, string location, string operationId)
- {
- return operations.GetOperationStatusAsync(location, operationId).GetAwaiter().GetResult();
- }
-
- ///
- /// Gets the operation status for a resource.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- ///
- ///
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task GetOperationStatusAsync(this IDataProtectionClient operations, string location, string operationId, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.GetOperationStatusWithHttpMessagesAsync(location, operationId, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the backup vault.
- ///
- ///
- /// The name of the resource group where the backup vault is present.
- ///
- ///
- ///
- public static BackupVaultResource GetOperationResultPatch(this IDataProtectionClient operations, string vaultName, string resourceGroupName, string operationId)
- {
- return operations.GetOperationResultPatchAsync(vaultName, resourceGroupName, operationId).GetAwaiter().GetResult();
- }
-
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the backup vault.
- ///
- ///
- /// The name of the resource group where the backup vault is present.
- ///
- ///
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task GetOperationResultPatchAsync(this IDataProtectionClient operations, string vaultName, string resourceGroupName, string operationId, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.GetOperationResultPatchWithHttpMessagesAsync(vaultName, resourceGroupName, operationId, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- ///
- /// Validates if a feature is supported
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- ///
- ///
- /// Feature support request object
- ///
- public static FeatureValidationResponseBase CheckFeatureSupport(this IDataProtectionClient operations, string location, FeatureValidationRequestBase parameters)
- {
- return operations.CheckFeatureSupportAsync(location, parameters).GetAwaiter().GetResult();
- }
-
- ///
- /// Validates if a feature is supported
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- ///
- ///
- /// Feature support request object
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task CheckFeatureSupportAsync(this IDataProtectionClient operations, string location, FeatureValidationRequestBase parameters, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.CheckFeatureSupportWithHttpMessagesAsync(location, parameters, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- }
-}
diff --git a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/DataProtectionOperations.cs b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/DataProtectionOperations.cs
new file mode 100644
index 0000000000000..f1bf432b5f204
--- /dev/null
+++ b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/DataProtectionOperations.cs
@@ -0,0 +1,254 @@
+//
+// 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.DataProtection
+{
+ 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;
+
+ ///
+ /// DataProtectionOperations operations.
+ ///
+ internal partial class DataProtectionOperations : IServiceOperations, IDataProtectionOperations
+ {
+ ///
+ /// Initializes a new instance of the DataProtectionOperations class.
+ ///
+ ///
+ /// Reference to the service client.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ internal DataProtectionOperations(DataProtectionClient client)
+ {
+ if (client == null)
+ {
+ throw new System.ArgumentNullException("client");
+ }
+ Client = client;
+ }
+
+ ///
+ /// Gets a reference to the DataProtectionClient
+ ///
+ public DataProtectionClient Client { get; private set; }
+
+ ///
+ /// Validates if a feature is supported
+ ///
+ ///
+ ///
+ ///
+ /// Feature support request object
+ ///
+ ///
+ /// 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> CheckFeatureSupportWithHttpMessagesAsync(string location, FeatureValidationRequestBase parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (location == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "location");
+ }
+ if (parameters == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("location", location);
+ tracingParameters.Add("parameters", parameters);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "CheckFeatureSupport", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.DataProtection/locations/{location}/checkFeatureSupport").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{location}", System.Uri.EscapeDataString(location));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("POST");
+ _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);
+ }
+ 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/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/DataProtectionOperationsExtensions.cs b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/DataProtectionOperationsExtensions.cs
new file mode 100644
index 0000000000000..adc84f8e60795
--- /dev/null
+++ b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/DataProtectionOperationsExtensions.cs
@@ -0,0 +1,63 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.DataProtection
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// Extension methods for DataProtectionOperations.
+ ///
+ public static partial class DataProtectionOperationsExtensions
+ {
+ ///
+ /// Validates if a feature is supported
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ ///
+ ///
+ /// Feature support request object
+ ///
+ public static FeatureValidationResponseBase CheckFeatureSupport(this IDataProtectionOperations operations, string location, FeatureValidationRequestBase parameters)
+ {
+ return operations.CheckFeatureSupportAsync(location, parameters).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Validates if a feature is supported
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ ///
+ ///
+ /// Feature support request object
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task CheckFeatureSupportAsync(this IDataProtectionOperations operations, string location, FeatureValidationRequestBase parameters, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.CheckFeatureSupportWithHttpMessagesAsync(location, parameters, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ }
+}
diff --git a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/Operations.cs b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/DataProtectionOperationsOperations.cs
similarity index 97%
rename from sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/Operations.cs
rename to sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/DataProtectionOperationsOperations.cs
index d03fb04abcdcf..b2ac1ee668ee0 100644
--- a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/Operations.cs
+++ b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/DataProtectionOperationsOperations.cs
@@ -23,12 +23,12 @@ namespace Microsoft.Azure.Management.DataProtection
using System.Threading.Tasks;
///
- /// Operations operations.
+ /// DataProtectionOperationsOperations operations.
///
- internal partial class Operations : IServiceOperations, IOperations
+ internal partial class DataProtectionOperationsOperations : IServiceOperations, IDataProtectionOperationsOperations
{
///
- /// Initializes a new instance of the Operations class.
+ /// Initializes a new instance of the DataProtectionOperationsOperations class.
///
///
/// Reference to the service client.
@@ -36,7 +36,7 @@ internal partial class Operations : IServiceOperations, IO
///
/// Thrown when a required parameter is null
///
- internal Operations(DataProtectionClient client)
+ internal DataProtectionOperationsOperations(DataProtectionClient client)
{
if (client == null)
{
diff --git a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/OperationsExtensions.cs b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/DataProtectionOperationsOperationsExtensions.cs
similarity index 83%
rename from sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/OperationsExtensions.cs
rename to sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/DataProtectionOperationsOperationsExtensions.cs
index d58f9b4ef7903..dac3df49f939f 100644
--- a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/OperationsExtensions.cs
+++ b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/DataProtectionOperationsOperationsExtensions.cs
@@ -17,9 +17,9 @@ namespace Microsoft.Azure.Management.DataProtection
using System.Threading.Tasks;
///
- /// Extension methods for Operations.
+ /// Extension methods for DataProtectionOperationsOperations.
///
- public static partial class OperationsExtensions
+ public static partial class DataProtectionOperationsOperationsExtensions
{
///
/// Returns the list of available operations.
@@ -27,7 +27,7 @@ public static partial class OperationsExtensions
///
/// The operations group for this extension method.
///
- public static IPage List(this IOperations operations)
+ public static IPage List(this IDataProtectionOperationsOperations operations)
{
return operations.ListAsync().GetAwaiter().GetResult();
}
@@ -41,7 +41,7 @@ public static IPage List(this IOperations oper
///
/// The cancellation token.
///
- public static async Task> ListAsync(this IOperations operations, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task> ListAsync(this IDataProtectionOperationsOperations operations, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
{
@@ -58,7 +58,7 @@ public static IPage List(this IOperations oper
///
/// The NextLink from the previous successful call to List operation.
///
- public static IPage ListNext(this IOperations operations, string nextPageLink)
+ public static IPage ListNext(this IDataProtectionOperationsOperations operations, string nextPageLink)
{
return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult();
}
@@ -75,7 +75,7 @@ public static IPage ListNext(this IOperations
///
/// The cancellation token.
///
- public static async Task> ListNextAsync(this IOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task> ListNextAsync(this IDataProtectionOperationsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
{
diff --git a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/IBackupInstancesOperations.cs b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/IBackupInstancesOperations.cs
index 3fe682fc7c272..f434be5b79e1e 100644
--- a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/IBackupInstancesOperations.cs
+++ b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/IBackupInstancesOperations.cs
@@ -279,7 +279,7 @@ public partial interface IBackupInstancesOperations
///
/// Thrown when a required parameter is null
///
- Task> ValidateRestoreWithHttpMessagesAsync(string vaultName, string resourceGroupName, string backupInstanceName, AzureBackupRestoreRequest restoreRequestObject, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> ValidateForRestoreWithHttpMessagesAsync(string vaultName, string resourceGroupName, string backupInstanceName, AzureBackupRestoreRequest restoreRequestObject, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Create or update a backup instance in a backup vault
///
@@ -483,7 +483,7 @@ public partial interface IBackupInstancesOperations
///
/// Thrown when a required parameter is null
///
- Task> BeginValidateRestoreWithHttpMessagesAsync(string vaultName, string resourceGroupName, string backupInstanceName, AzureBackupRestoreRequest restoreRequestObject, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> BeginValidateForRestoreWithHttpMessagesAsync(string vaultName, string resourceGroupName, string backupInstanceName, AzureBackupRestoreRequest restoreRequestObject, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Gets a backup instances belonging to a backup vault
///
diff --git a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/IBackupPoliciesOperations.cs b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/IBackupPoliciesOperations.cs
index 5be8de5bd0f54..df8957ca3e52b 100644
--- a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/IBackupPoliciesOperations.cs
+++ b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/IBackupPoliciesOperations.cs
@@ -88,6 +88,7 @@ public partial interface IBackupPoliciesOperations
/// The name of the resource group where the backup vault is present.
///
///
+ /// Name of the policy
///
///
/// Request body for operation
diff --git a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/IJobOperations.cs b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/IBackupVaultOperationResultsOperations.cs
similarity index 73%
rename from sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/IJobOperations.cs
rename to sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/IBackupVaultOperationResultsOperations.cs
index 7eda13ba0d92f..471ccec99969b 100644
--- a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/IJobOperations.cs
+++ b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/IBackupVaultOperationResultsOperations.cs
@@ -19,22 +19,17 @@ namespace Microsoft.Azure.Management.DataProtection
using System.Threading.Tasks;
///
- /// JobOperations operations.
+ /// BackupVaultOperationResultsOperations operations.
///
- public partial interface IJobOperations
+ public partial interface IBackupVaultOperationResultsOperations
{
- ///
- /// Gets a job with id in a backup vault
- ///
- ///
- /// The name of the resource group where the backup vault is present.
- ///
///
/// The name of the backup vault.
///
- ///
- /// The Job ID. This is a GUID-formatted string (e.g.
- /// 00000000-0000-0000-0000-000000000000).
+ ///
+ /// The name of the resource group where the backup vault is present.
+ ///
+ ///
///
///
/// The headers that will be added to request.
@@ -51,6 +46,6 @@ public partial interface IJobOperations
///
/// Thrown when a required parameter is null
///
- Task> GetWithHttpMessagesAsync(string resourceGroupName, string vaultName, string jobId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
diff --git a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/IBackupVaultsOperations.cs b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/IBackupVaultsOperations.cs
index 527a9027c8d39..91cf4a56e14b1 100644
--- a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/IBackupVaultsOperations.cs
+++ b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/IBackupVaultsOperations.cs
@@ -41,7 +41,7 @@ public partial interface IBackupVaultsOperations
///
/// Thrown when a required parameter is null
///
- Task>> GetResourcesInSubscriptionWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task>> GetInSubscriptionWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Returns resource collection belonging to a resource group.
///
@@ -63,7 +63,7 @@ public partial interface IBackupVaultsOperations
///
/// Thrown when a required parameter is null
///
- Task>> GetResourcesInResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task>> GetInResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Returns a resource belonging to a resource group.
///
@@ -168,7 +168,7 @@ public partial interface IBackupVaultsOperations
///
/// Thrown when a required parameter is null
///
- Task> PatchWithHttpMessagesAsync(string vaultName, string resourceGroupName, PatchResourceRequestInput parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> UpdateWithHttpMessagesAsync(string vaultName, string resourceGroupName, PatchResourceRequestInput parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// API to check for resource name availability
///
@@ -254,7 +254,7 @@ public partial interface IBackupVaultsOperations
///
/// Thrown when a required parameter is null
///
- Task> BeginPatchWithHttpMessagesAsync(string vaultName, string resourceGroupName, PatchResourceRequestInput parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> BeginUpdateWithHttpMessagesAsync(string vaultName, string resourceGroupName, PatchResourceRequestInput parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Returns resource collection belonging to a subscription.
///
@@ -276,7 +276,7 @@ public partial interface IBackupVaultsOperations
///
/// Thrown when a required parameter is null
///
- Task>> GetResourcesInSubscriptionNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task>> GetInSubscriptionNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Returns resource collection belonging to a resource group.
///
@@ -298,6 +298,6 @@ public partial interface IBackupVaultsOperations
///
/// Thrown when a required parameter is null
///
- Task>> GetResourcesInResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task>> GetInResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
diff --git a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/IDataProtectionClient.cs b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/IDataProtectionClient.cs
index f14fca4980d92..cb3374d6f7561 100644
--- a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/IDataProtectionClient.cs
+++ b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/IDataProtectionClient.cs
@@ -14,10 +14,6 @@ namespace Microsoft.Azure.Management.DataProtection
using Microsoft.Rest.Azure;
using Models;
using Newtonsoft.Json;
- using System.Collections;
- using System.Collections.Generic;
- using System.Threading;
- using System.Threading.Tasks;
///
/// Open API 2.0 Specs for Azure Data Protection service
@@ -84,9 +80,24 @@ public partial interface IDataProtectionClient : System.IDisposable
IOperationResultOperations OperationResult { get; }
///
- /// Gets the IOperations.
+ /// Gets the IOperationStatusOperations.
///
- IOperations Operations { get; }
+ IOperationStatusOperations OperationStatus { get; }
+
+ ///
+ /// Gets the IBackupVaultOperationResultsOperations.
+ ///
+ IBackupVaultOperationResultsOperations BackupVaultOperationResults { get; }
+
+ ///
+ /// Gets the IDataProtectionOperations.
+ ///
+ IDataProtectionOperations DataProtection { get; }
+
+ ///
+ /// Gets the IDataProtectionOperationsOperations.
+ ///
+ IDataProtectionOperationsOperations DataProtectionOperations { get; }
///
/// Gets the IBackupPoliciesOperations.
@@ -103,25 +114,15 @@ public partial interface IDataProtectionClient : System.IDisposable
///
IRecoveryPointsOperations RecoveryPoints { get; }
- ///
- /// Gets the IRecoveryPointOperations.
- ///
- IRecoveryPointOperations RecoveryPoint { get; }
-
///
/// Gets the IJobsOperations.
///
IJobsOperations Jobs { get; }
///
- /// Gets the IFindRestorableTimeRangesOperations.
- ///
- IFindRestorableTimeRangesOperations FindRestorableTimeRanges { get; }
-
- ///
- /// Gets the IJobOperations.
+ /// Gets the IRestorableTimeRangesOperations.
///
- IJobOperations Job { get; }
+ IRestorableTimeRangesOperations RestorableTimeRanges { get; }
///
/// Gets the IExportJobsOperations.
@@ -133,52 +134,5 @@ public partial interface IDataProtectionClient : System.IDisposable
///
IExportJobsOperationResultOperations ExportJobsOperationResult { get; }
- ///
- /// Gets the operation status for a resource.
- ///
- ///
- ///
- ///
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- Task> GetOperationStatusWithHttpMessagesAsync(string location, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
-
- ///
- /// The name of the backup vault.
- ///
- ///
- /// The name of the resource group where the backup vault is present.
- ///
- ///
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- Task> GetOperationResultPatchWithHttpMessagesAsync(string vaultName, string resourceGroupName, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
-
- ///
- /// Validates if a feature is supported
- ///
- ///
- ///
- ///
- /// Feature support request object
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- Task> CheckFeatureSupportWithHttpMessagesAsync(string location, FeatureValidationRequestBase parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
-
}
}
diff --git a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/IRecoveryPointOperations.cs b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/IDataProtectionOperations.cs
similarity index 62%
rename from sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/IRecoveryPointOperations.cs
rename to sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/IDataProtectionOperations.cs
index 8709cd2687abc..ee73d59aba452 100644
--- a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/IRecoveryPointOperations.cs
+++ b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/IDataProtectionOperations.cs
@@ -19,23 +19,17 @@ namespace Microsoft.Azure.Management.DataProtection
using System.Threading.Tasks;
///
- /// RecoveryPointOperations operations.
+ /// DataProtectionOperations operations.
///
- public partial interface IRecoveryPointOperations
+ public partial interface IDataProtectionOperations
{
///
- /// Gets a Recovery Point using recoveryPointId for a Datasource.
+ /// Validates if a feature is supported
///
- ///
- /// The name of the backup vault.
+ ///
///
- ///
- /// The name of the resource group where the backup vault is present.
- ///
- ///
- /// The name of the backup instance
- ///
- ///
+ ///
+ /// Feature support request object
///
///
/// The headers that will be added to request.
@@ -52,6 +46,6 @@ public partial interface IRecoveryPointOperations
///
/// Thrown when a required parameter is null
///
- Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string backupInstanceName, string recoveryPointId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> CheckFeatureSupportWithHttpMessagesAsync(string location, FeatureValidationRequestBase parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
diff --git a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/IOperations.cs b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/IDataProtectionOperationsOperations.cs
similarity index 95%
rename from sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/IOperations.cs
rename to sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/IDataProtectionOperationsOperations.cs
index dfc6a2ed33c80..fff09d93866e0 100644
--- a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/IOperations.cs
+++ b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/IDataProtectionOperationsOperations.cs
@@ -19,9 +19,9 @@ namespace Microsoft.Azure.Management.DataProtection
using System.Threading.Tasks;
///
- /// Operations operations.
+ /// DataProtectionOperationsOperations operations.
///
- public partial interface IOperations
+ public partial interface IDataProtectionOperationsOperations
{
///
/// Returns the list of available operations.
diff --git a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/IJobsOperations.cs b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/IJobsOperations.cs
index 934b1eee274a6..3352c7bcbc4f4 100644
--- a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/IJobsOperations.cs
+++ b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/IJobsOperations.cs
@@ -49,6 +49,35 @@ public partial interface IJobsOperations
///
Task>> ListWithHttpMessagesAsync(string resourceGroupName, string vaultName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
+ /// Gets a job with id in a backup vault
+ ///
+ ///
+ /// The name of the resource group where the backup vault is present.
+ ///
+ ///
+ /// The name of the backup vault.
+ ///
+ ///
+ /// The Job ID. This is a GUID-formatted string (e.g.
+ /// 00000000-0000-0000-0000-000000000000).
+ ///
+ ///
+ /// 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 resourceGroupName, string vaultName, string jobId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
/// Returns list of jobs belonging to a backup vault
///
///
diff --git a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/IOperationStatusOperations.cs b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/IOperationStatusOperations.cs
new file mode 100644
index 0000000000000..db7168d01c795
--- /dev/null
+++ b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/IOperationStatusOperations.cs
@@ -0,0 +1,50 @@
+//
+// 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.DataProtection
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// OperationStatusOperations operations.
+ ///
+ public partial interface IOperationStatusOperations
+ {
+ ///
+ /// Gets the operation status for a resource.
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// 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 location, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/IRecoveryPointsOperations.cs b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/IRecoveryPointsOperations.cs
index 6809bf1b3c0f0..795eb564e7921 100644
--- a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/IRecoveryPointsOperations.cs
+++ b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/IRecoveryPointsOperations.cs
@@ -57,7 +57,37 @@ public partial interface IRecoveryPointsOperations
///
/// Thrown when a required parameter is null
///
- Task>> GetListWithHttpMessagesAsync(string vaultName, string resourceGroupName, string backupInstanceName, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task>> ListWithHttpMessagesAsync(string vaultName, string resourceGroupName, string backupInstanceName, ODataQuery odataQuery = default(ODataQuery), string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Gets a Recovery Point using recoveryPointId for a Datasource.
+ ///
+ ///
+ /// The name of the backup vault.
+ ///
+ ///
+ /// The name of the resource group where the backup vault is present.
+ ///
+ ///
+ /// The name of the backup instance
+ ///
+ ///
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> GetWithHttpMessagesAsync(string vaultName, string resourceGroupName, string backupInstanceName, string recoveryPointId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Returns a list of Recovery Points for a DataSource in a vault.
///
@@ -79,6 +109,6 @@ public partial interface IRecoveryPointsOperations
///
/// Thrown when a required parameter is null
///
- Task>> GetListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
diff --git a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/IFindRestorableTimeRangesOperations.cs b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/IRestorableTimeRangesOperations.cs
similarity index 77%
rename from sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/IFindRestorableTimeRangesOperations.cs
rename to sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/IRestorableTimeRangesOperations.cs
index 8e6b13a111b7a..86522466f5bf9 100644
--- a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/IFindRestorableTimeRangesOperations.cs
+++ b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/IRestorableTimeRangesOperations.cs
@@ -19,9 +19,9 @@ namespace Microsoft.Azure.Management.DataProtection
using System.Threading.Tasks;
///
- /// FindRestorableTimeRangesOperations operations.
+ /// RestorableTimeRangesOperations operations.
///
- public partial interface IFindRestorableTimeRangesOperations
+ public partial interface IRestorableTimeRangesOperations
{
///
/// The name of the backup vault.
@@ -29,7 +29,8 @@ public partial interface IFindRestorableTimeRangesOperations
///
/// The name of the resource group where the backup vault is present.
///
- ///
+ ///
+ /// The name of the backup instance
///
///
/// Request body for operation
@@ -49,6 +50,6 @@ public partial interface IFindRestorableTimeRangesOperations
///
/// Thrown when a required parameter is null
///
- Task> PostWithHttpMessagesAsync(string vaultName, string resourceGroupName, string backupInstances, AzureBackupFindRestorableTimeRangesRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> FindWithHttpMessagesAsync(string vaultName, string resourceGroupName, string backupInstanceName, AzureBackupFindRestorableTimeRangesRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
diff --git a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/JobsOperations.cs b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/JobsOperations.cs
index 289fbd1f6bdb9..2b26450c2f50c 100644
--- a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/JobsOperations.cs
+++ b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/JobsOperations.cs
@@ -246,6 +246,212 @@ internal JobsOperations(DataProtectionClient client)
return _result;
}
+ ///
+ /// Gets a job with id in a backup vault
+ ///
+ ///
+ /// The name of the resource group where the backup vault is present.
+ ///
+ ///
+ /// The name of the backup vault.
+ ///
+ ///
+ /// The Job ID. This is a GUID-formatted string (e.g.
+ /// 00000000-0000-0000-0000-000000000000).
+ ///
+ ///
+ /// 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 resourceGroupName, string vaultName, string jobId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (vaultName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "vaultName");
+ }
+ if (jobId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "jobId");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("vaultName", vaultName);
+ tracingParameters.Add("jobId", jobId);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupJobs/{jobId}").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName));
+ _url = _url.Replace("{jobId}", System.Uri.EscapeDataString(jobId));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ 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;
+ }
+
///
/// Returns list of jobs belonging to a backup vault
///
diff --git a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/JobsOperationsExtensions.cs b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/JobsOperationsExtensions.cs
index bbee7362fa3d9..c4e6755375436 100644
--- a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/JobsOperationsExtensions.cs
+++ b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/JobsOperationsExtensions.cs
@@ -61,6 +61,54 @@ public static IPage List(this IJobsOperations operations
}
}
+ ///
+ /// Gets a job with id in a backup vault
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group where the backup vault is present.
+ ///
+ ///
+ /// The name of the backup vault.
+ ///
+ ///
+ /// The Job ID. This is a GUID-formatted string (e.g.
+ /// 00000000-0000-0000-0000-000000000000).
+ ///
+ public static AzureBackupJobResource Get(this IJobsOperations operations, string resourceGroupName, string vaultName, string jobId)
+ {
+ return operations.GetAsync(resourceGroupName, vaultName, jobId).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Gets a job with id in a backup vault
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group where the backup vault is present.
+ ///
+ ///
+ /// The name of the backup vault.
+ ///
+ ///
+ /// The Job ID. This is a GUID-formatted string (e.g.
+ /// 00000000-0000-0000-0000-000000000000).
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task GetAsync(this IJobsOperations operations, string resourceGroupName, string vaultName, string jobId, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, vaultName, jobId, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
///
/// Returns list of jobs belonging to a backup vault
///
diff --git a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/Models/AbsoluteDeleteOption.cs b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/Models/AbsoluteDeleteOption.cs
index b9449c574b3ce..bdeef3022b874 100644
--- a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/Models/AbsoluteDeleteOption.cs
+++ b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/Models/AbsoluteDeleteOption.cs
@@ -10,7 +10,6 @@
namespace Microsoft.Azure.Management.DataProtection.Models
{
- using Newtonsoft.Json;
using System.Linq;
///
@@ -19,7 +18,6 @@ namespace Microsoft.Azure.Management.DataProtection.Models
///
/// Delete option with duration
///
- [Newtonsoft.Json.JsonObject("AbsoluteDeleteOption")]
public partial class AbsoluteDeleteOption : DeleteOption
{
///
diff --git a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/Models/AdhocBasedTriggerContext.cs b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/Models/AdhocBasedTriggerContext.cs
index 2610f931230e2..34b57086ea748 100644
--- a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/Models/AdhocBasedTriggerContext.cs
+++ b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/Models/AdhocBasedTriggerContext.cs
@@ -20,7 +20,6 @@ namespace Microsoft.Azure.Management.DataProtection.Models
///
/// Adhoc trigger context
///
- [Newtonsoft.Json.JsonObject("AdhocBasedTriggerContext")]
public partial class AdhocBasedTriggerContext : TriggerContext
{
///
diff --git a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/Models/AzureBackupDiscreteRecoveryPoint.cs b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/Models/AzureBackupDiscreteRecoveryPoint.cs
index e10e676eb6a77..d66d2250627ab 100644
--- a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/Models/AzureBackupDiscreteRecoveryPoint.cs
+++ b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/Models/AzureBackupDiscreteRecoveryPoint.cs
@@ -21,7 +21,6 @@ namespace Microsoft.Azure.Management.DataProtection.Models
///
/// Azure backup discrete RecoveryPoint
///
- [Newtonsoft.Json.JsonObject("AzureBackupDiscreteRecoveryPoint")]
public partial class AzureBackupDiscreteRecoveryPoint : AzureBackupRecoveryPoint
{
///
diff --git a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/Models/AzureBackupFindRestorableTimeRangesRequest.cs b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/Models/AzureBackupFindRestorableTimeRangesRequest.cs
index 8cb683fc578a5..986233b5ec263 100644
--- a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/Models/AzureBackupFindRestorableTimeRangesRequest.cs
+++ b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/Models/AzureBackupFindRestorableTimeRangesRequest.cs
@@ -36,10 +36,10 @@ public AzureBackupFindRestorableTimeRangesRequest()
/// source data store. Possible values include: 'OperationalStore',
/// 'VaultStore', 'ArchiveStore'
/// Start time for the List Restore Ranges
- /// request
- /// End time for the List Restore Ranges
- /// request
- public AzureBackupFindRestorableTimeRangesRequest(string sourceDataStoreType, string startTime, string endTime)
+ /// request. ISO 8601 format.
+ /// End time for the List Restore Ranges request.
+ /// ISO 8601 format.
+ public AzureBackupFindRestorableTimeRangesRequest(string sourceDataStoreType, string startTime = default(string), string endTime = default(string))
{
SourceDataStoreType = sourceDataStoreType;
StartTime = startTime;
@@ -60,13 +60,15 @@ public AzureBackupFindRestorableTimeRangesRequest(string sourceDataStoreType, st
public string SourceDataStoreType { get; set; }
///
- /// Gets or sets start time for the List Restore Ranges request
+ /// Gets or sets start time for the List Restore Ranges request. ISO
+ /// 8601 format.
///
[JsonProperty(PropertyName = "startTime")]
public string StartTime { get; set; }
///
- /// Gets or sets end time for the List Restore Ranges request
+ /// Gets or sets end time for the List Restore Ranges request. ISO 8601
+ /// format.
///
[JsonProperty(PropertyName = "endTime")]
public string EndTime { get; set; }
@@ -83,14 +85,6 @@ public virtual void Validate()
{
throw new ValidationException(ValidationRules.CannotBeNull, "SourceDataStoreType");
}
- if (StartTime == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "StartTime");
- }
- if (EndTime == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "EndTime");
- }
}
}
}
diff --git a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/Models/AzureBackupParams.cs b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/Models/AzureBackupParams.cs
index 05f9e5052d31f..df49dcb4d65a0 100644
--- a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/Models/AzureBackupParams.cs
+++ b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/Models/AzureBackupParams.cs
@@ -20,7 +20,6 @@ namespace Microsoft.Azure.Management.DataProtection.Models
///
/// Azure backup parameters
///
- [Newtonsoft.Json.JsonObject("AzureBackupParams")]
public partial class AzureBackupParams : BackupParameters
{
///
diff --git a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/Models/AzureBackupRecoveryPoint.cs b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/Models/AzureBackupRecoveryPoint.cs
index b645088534477..afecf4f87e8d8 100644
--- a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/Models/AzureBackupRecoveryPoint.cs
+++ b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/Models/AzureBackupRecoveryPoint.cs
@@ -10,7 +10,6 @@
namespace Microsoft.Azure.Management.DataProtection.Models
{
- using Newtonsoft.Json;
using System.Linq;
///
@@ -19,7 +18,6 @@ namespace Microsoft.Azure.Management.DataProtection.Models
///
/// Azure backup recoveryPoint
///
- [Newtonsoft.Json.JsonObject("AzureBackupRecoveryPoint")]
public partial class AzureBackupRecoveryPoint
{
///
diff --git a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/Models/AzureBackupRecoveryPointBasedRestoreRequest.cs b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/Models/AzureBackupRecoveryPointBasedRestoreRequest.cs
index 7b34466b12a80..35b08d7f53bef 100644
--- a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/Models/AzureBackupRecoveryPointBasedRestoreRequest.cs
+++ b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/Models/AzureBackupRecoveryPointBasedRestoreRequest.cs
@@ -20,7 +20,6 @@ namespace Microsoft.Azure.Management.DataProtection.Models
///
/// Azure backup recoveryPoint based restore request
///
- [Newtonsoft.Json.JsonObject("AzureBackupRecoveryPointBasedRestoreRequest")]
public partial class AzureBackupRecoveryPointBasedRestoreRequest : AzureBackupRestoreRequest
{
///
diff --git a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/Models/AzureBackupRecoveryTimeBasedRestoreRequest.cs b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/Models/AzureBackupRecoveryTimeBasedRestoreRequest.cs
index aba88b23dbba5..facb67aca110b 100644
--- a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/Models/AzureBackupRecoveryTimeBasedRestoreRequest.cs
+++ b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/Models/AzureBackupRecoveryTimeBasedRestoreRequest.cs
@@ -20,7 +20,6 @@ namespace Microsoft.Azure.Management.DataProtection.Models
///
/// AzureBackup RecoveryPointTime Based Restore Request
///
- [Newtonsoft.Json.JsonObject("AzureBackupRecoveryTimeBasedRestoreRequest")]
public partial class AzureBackupRecoveryTimeBasedRestoreRequest : AzureBackupRestoreRequest
{
///
diff --git a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/Models/AzureBackupRestoreRequest.cs b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/Models/AzureBackupRestoreRequest.cs
index 5a075556edd6b..51f4ca15a49d1 100644
--- a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/Models/AzureBackupRestoreRequest.cs
+++ b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/Models/AzureBackupRestoreRequest.cs
@@ -20,7 +20,6 @@ namespace Microsoft.Azure.Management.DataProtection.Models
///
/// Azure backup restore request
///
- [Newtonsoft.Json.JsonObject("AzureBackupRestoreRequest")]
public partial class AzureBackupRestoreRequest
{
///
diff --git a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/Models/AzureBackupRestoreWithRehydrationRequest.cs b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/Models/AzureBackupRestoreWithRehydrationRequest.cs
index f2e642f05511d..2389fa6656173 100644
--- a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/Models/AzureBackupRestoreWithRehydrationRequest.cs
+++ b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/Models/AzureBackupRestoreWithRehydrationRequest.cs
@@ -20,7 +20,6 @@ namespace Microsoft.Azure.Management.DataProtection.Models
///
/// AzureBackup Restore with Rehydration Request
///
- [Newtonsoft.Json.JsonObject("AzureBackupRestoreWithRehydrationRequest")]
public partial class AzureBackupRestoreWithRehydrationRequest : AzureBackupRecoveryPointBasedRestoreRequest
{
///
diff --git a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/Models/AzureBackupRule.cs b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/Models/AzureBackupRule.cs
index d656aa74bc130..11f890c168c2c 100644
--- a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/Models/AzureBackupRule.cs
+++ b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/Models/AzureBackupRule.cs
@@ -20,7 +20,6 @@ namespace Microsoft.Azure.Management.DataProtection.Models
///
/// Azure backup rule
///
- [Newtonsoft.Json.JsonObject("AzureBackupRule")]
public partial class AzureBackupRule : BasePolicyRule
{
///
diff --git a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/Models/AzureOperationalStoreParameters.cs b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/Models/AzureOperationalStoreParameters.cs
index bd538a47978c6..7cdafb6d372e5 100644
--- a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/Models/AzureOperationalStoreParameters.cs
+++ b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/Models/AzureOperationalStoreParameters.cs
@@ -16,7 +16,6 @@ namespace Microsoft.Azure.Management.DataProtection.Models
///
/// Parameters for Operational-Tier DataStore
///
- [Newtonsoft.Json.JsonObject("AzureOperationalStoreParameters")]
public partial class AzureOperationalStoreParameters : DataStoreParameters
{
///
diff --git a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/Models/AzureRetentionRule.cs b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/Models/AzureRetentionRule.cs
index 62553c323ac19..38f0b6ac82693 100644
--- a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/Models/AzureRetentionRule.cs
+++ b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/Models/AzureRetentionRule.cs
@@ -22,7 +22,6 @@ namespace Microsoft.Azure.Management.DataProtection.Models
///
/// Azure retention rule
///
- [Newtonsoft.Json.JsonObject("AzureRetentionRule")]
public partial class AzureRetentionRule : BasePolicyRule
{
///
diff --git a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/Models/BackupCriteria.cs b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/Models/BackupCriteria.cs
index 0e6ce7b56625c..8d6841cf0e3e1 100644
--- a/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/Models/BackupCriteria.cs
+++ b/sdk/dataprotection/Microsoft.Azure.Management.DataProtection/src/Generated/Models/BackupCriteria.cs
@@ -10,7 +10,6 @@
namespace Microsoft.Azure.Management.DataProtection.Models
{
- using Newtonsoft.Json;
using System.Linq;
///
@@ -19,7 +18,6 @@ namespace Microsoft.Azure.Management.DataProtection.Models
///