diff --git a/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Customizations/RecoveryServicesClient.cs b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Customizations/RecoveryServicesClient.cs
new file mode 100644
index 000000000000..db2a6433f0ab
--- /dev/null
+++ b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Customizations/RecoveryServicesClient.cs
@@ -0,0 +1,59 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+
+using System.Linq;
+using System.Net.Http;
+using Microsoft.Rest;
+using Microsoft.Rest.Serialization;
+
+namespace Microsoft.Azure.Management.RecoveryServices
+{
+ public partial class RecoveryServicesClient
+ {
+ bool DisableDispose { get; set; }
+
+ protected RecoveryServicesClient(HttpClient httpClient, params DelegatingHandler[] handlers)
+ {
+ InitializeHttpClient(httpClient, null, handlers);
+ Initialize();
+ }
+
+ public RecoveryServicesClient(System.Uri baseUri, ServiceClientCredentials credentials, HttpClient httpClient, bool disableDispose, params DelegatingHandler[] handlers)
+ : this(httpClient, handlers)
+ {
+ if (baseUri == null)
+ {
+ throw new System.ArgumentNullException("baseUri");
+ }
+ if (credentials == null)
+ {
+ throw new System.ArgumentNullException("credentials");
+ }
+ BaseUri = baseUri;
+ Credentials = credentials;
+ if (Credentials != null)
+ {
+ Credentials.InitializeServiceClient(this);
+ }
+ DisableDispose = disableDispose;
+ }
+
+ protected override void Dispose(bool disposing)
+ {
+ if (DisableDispose)
+ {
+ base.Dispose(disposing);
+ }
+ }
+
+ partial void CustomInitialize()
+ {
+ var iso8601TimeSpanConverter = DeserializationSettings.Converters.First(conv => conv is Iso8601TimeSpanConverter);
+ if (iso8601TimeSpanConverter != null)
+ {
+ DeserializationSettings.Converters.Remove(iso8601TimeSpanConverter);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/BackupStorageConfigsOperations.cs b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/BackupStorageConfigsOperations.cs
new file mode 100644
index 000000000000..e75fdc8e9760
--- /dev/null
+++ b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/BackupStorageConfigsOperations.cs
@@ -0,0 +1,433 @@
+// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+
+namespace Microsoft.Azure.Management.RecoveryServices
+{
+ using Microsoft.Azure;
+ using Microsoft.Azure.Management;
+ 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;
+
+ ///
+ /// BackupStorageConfigsOperations operations.
+ ///
+ internal partial class BackupStorageConfigsOperations : IServiceOperations, IBackupStorageConfigsOperations
+ {
+ ///
+ /// Initializes a new instance of the BackupStorageConfigsOperations class.
+ ///
+ ///
+ /// Reference to the service client.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ internal BackupStorageConfigsOperations(RecoveryServicesClient client)
+ {
+ if (client == null)
+ {
+ throw new System.ArgumentNullException("client");
+ }
+ Client = client;
+ }
+
+ ///
+ /// Gets a reference to the RecoveryServicesClient
+ ///
+ public RecoveryServicesClient Client { get; private set; }
+
+ ///
+ /// Fetches resource storage config.
+ ///
+ ///
+ /// The name of the resource group where the recovery services vault is
+ /// present.
+ ///
+ ///
+ /// The name of the recovery services vault.
+ ///
+ ///
+ /// 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, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (vaultName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "vaultName");
+ }
+ string apiVersion = "2016-12-01";
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("vaultName", vaultName);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName));
+ List _queryParameters = new List();
+ if (apiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ 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;
+ }
+
+ ///
+ /// Updates vault storage model type.
+ ///
+ ///
+ /// The name of the resource group where the recovery services vault is
+ /// present.
+ ///
+ ///
+ /// The name of the recovery services vault.
+ ///
+ ///
+ /// Backup storage config.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task UpdateWithHttpMessagesAsync(string resourceGroupName, string vaultName, BackupStorageConfig backupStorageConfig, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (vaultName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "vaultName");
+ }
+ if (backupStorageConfig == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "backupStorageConfig");
+ }
+ string apiVersion = "2016-12-01";
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("vaultName", vaultName);
+ tracingParameters.Add("backupStorageConfig", backupStorageConfig);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName));
+ List _queryParameters = new List();
+ if (apiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("PATCH");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ if(backupStorageConfig != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(backupStorageConfig, 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 != 204)
+ {
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ }
+}
diff --git a/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/BackupStorageConfigsOperationsExtensions.cs b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/BackupStorageConfigsOperationsExtensions.cs
new file mode 100644
index 000000000000..a3eea8c07697
--- /dev/null
+++ b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/BackupStorageConfigsOperationsExtensions.cs
@@ -0,0 +1,108 @@
+// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+
+namespace Microsoft.Azure.Management.RecoveryServices
+{
+ using Microsoft.Azure;
+ using Microsoft.Azure.Management;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// Extension methods for BackupStorageConfigsOperations.
+ ///
+ public static partial class BackupStorageConfigsOperationsExtensions
+ {
+ ///
+ /// Fetches resource storage config.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group where the recovery services vault is
+ /// present.
+ ///
+ ///
+ /// The name of the recovery services vault.
+ ///
+ public static BackupStorageConfig Get(this IBackupStorageConfigsOperations operations, string resourceGroupName, string vaultName)
+ {
+ return operations.GetAsync(resourceGroupName, vaultName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Fetches resource storage config.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group where the recovery services vault is
+ /// present.
+ ///
+ ///
+ /// The name of the recovery services vault.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task GetAsync(this IBackupStorageConfigsOperations operations, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, vaultName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Updates vault storage model type.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group where the recovery services vault is
+ /// present.
+ ///
+ ///
+ /// The name of the recovery services vault.
+ ///
+ ///
+ /// Backup storage config.
+ ///
+ public static void Update(this IBackupStorageConfigsOperations operations, string resourceGroupName, string vaultName, BackupStorageConfig backupStorageConfig)
+ {
+ operations.UpdateAsync(resourceGroupName, vaultName, backupStorageConfig).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Updates vault storage model type.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group where the recovery services vault is
+ /// present.
+ ///
+ ///
+ /// The name of the recovery services vault.
+ ///
+ ///
+ /// Backup storage config.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task UpdateAsync(this IBackupStorageConfigsOperations operations, string resourceGroupName, string vaultName, BackupStorageConfig backupStorageConfig, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.UpdateWithHttpMessagesAsync(resourceGroupName, vaultName, backupStorageConfig, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
+ }
+}
diff --git a/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/BackupVaultConfigsOperations.cs b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/BackupVaultConfigsOperations.cs
new file mode 100644
index 000000000000..e6a7ad44a289
--- /dev/null
+++ b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/BackupVaultConfigsOperations.cs
@@ -0,0 +1,454 @@
+// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+
+namespace Microsoft.Azure.Management.RecoveryServices
+{
+ using Microsoft.Azure;
+ using Microsoft.Azure.Management;
+ 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;
+
+ ///
+ /// BackupVaultConfigsOperations operations.
+ ///
+ internal partial class BackupVaultConfigsOperations : IServiceOperations, IBackupVaultConfigsOperations
+ {
+ ///
+ /// Initializes a new instance of the BackupVaultConfigsOperations class.
+ ///
+ ///
+ /// Reference to the service client.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ internal BackupVaultConfigsOperations(RecoveryServicesClient client)
+ {
+ if (client == null)
+ {
+ throw new System.ArgumentNullException("client");
+ }
+ Client = client;
+ }
+
+ ///
+ /// Gets a reference to the RecoveryServicesClient
+ ///
+ public RecoveryServicesClient Client { get; private set; }
+
+ ///
+ /// Fetches vault config.
+ ///
+ ///
+ /// The name of the resource group where the recovery services vault is
+ /// present.
+ ///
+ ///
+ /// The name of the recovery services vault.
+ ///
+ ///
+ /// 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, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (vaultName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "vaultName");
+ }
+ string apiVersion = "2016-12-01";
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("vaultName", vaultName);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig").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));
+ List _queryParameters = new List();
+ if (apiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ 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;
+ }
+
+ ///
+ /// Updates vault config model type.
+ ///
+ ///
+ /// The name of the resource group where the recovery services vault is
+ /// present.
+ ///
+ ///
+ /// The name of the recovery services vault.
+ ///
+ ///
+ /// Backup vault config.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string vaultName, BackupVaultConfig backupVaultConfig, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (vaultName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "vaultName");
+ }
+ if (backupVaultConfig == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "backupVaultConfig");
+ }
+ string apiVersion = "2016-12-01";
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("vaultName", vaultName);
+ tracingParameters.Add("backupVaultConfig", backupVaultConfig);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig").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));
+ List _queryParameters = new List();
+ if (apiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("PATCH");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ if(backupVaultConfig != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(backupVaultConfig, 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/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/BackupVaultConfigsOperationsExtensions.cs b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/BackupVaultConfigsOperationsExtensions.cs
new file mode 100644
index 000000000000..d0a968329ca1
--- /dev/null
+++ b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/BackupVaultConfigsOperationsExtensions.cs
@@ -0,0 +1,111 @@
+// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+
+namespace Microsoft.Azure.Management.RecoveryServices
+{
+ using Microsoft.Azure;
+ using Microsoft.Azure.Management;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// Extension methods for BackupVaultConfigsOperations.
+ ///
+ public static partial class BackupVaultConfigsOperationsExtensions
+ {
+ ///
+ /// Fetches vault config.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group where the recovery services vault is
+ /// present.
+ ///
+ ///
+ /// The name of the recovery services vault.
+ ///
+ public static BackupVaultConfig Get(this IBackupVaultConfigsOperations operations, string resourceGroupName, string vaultName)
+ {
+ return operations.GetAsync(resourceGroupName, vaultName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Fetches vault config.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group where the recovery services vault is
+ /// present.
+ ///
+ ///
+ /// The name of the recovery services vault.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task GetAsync(this IBackupVaultConfigsOperations operations, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, vaultName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Updates vault config model type.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group where the recovery services vault is
+ /// present.
+ ///
+ ///
+ /// The name of the recovery services vault.
+ ///
+ ///
+ /// Backup vault config.
+ ///
+ public static BackupVaultConfig Update(this IBackupVaultConfigsOperations operations, string resourceGroupName, string vaultName, BackupVaultConfig backupVaultConfig)
+ {
+ return operations.UpdateAsync(resourceGroupName, vaultName, backupVaultConfig).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Updates vault config model type.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group where the recovery services vault is
+ /// present.
+ ///
+ ///
+ /// The name of the recovery services vault.
+ ///
+ ///
+ /// Backup vault config.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task UpdateAsync(this IBackupVaultConfigsOperations operations, string resourceGroupName, string vaultName, BackupVaultConfig backupVaultConfig, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, vaultName, backupVaultConfig, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ }
+}
diff --git a/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/IBackupStorageConfigsOperations.cs b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/IBackupStorageConfigsOperations.cs
new file mode 100644
index 000000000000..628d398c9ae2
--- /dev/null
+++ b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/IBackupStorageConfigsOperations.cs
@@ -0,0 +1,75 @@
+// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+
+namespace Microsoft.Azure.Management.RecoveryServices
+{
+ using Microsoft.Azure;
+ using Microsoft.Azure.Management;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// BackupStorageConfigsOperations operations.
+ ///
+ public partial interface IBackupStorageConfigsOperations
+ {
+ ///
+ /// Fetches resource storage config.
+ ///
+ ///
+ /// The name of the resource group where the recovery services vault is
+ /// present.
+ ///
+ ///
+ /// The name of the recovery services vault.
+ ///
+ ///
+ /// 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, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Updates vault storage model type.
+ ///
+ ///
+ /// The name of the resource group where the recovery services vault is
+ /// present.
+ ///
+ ///
+ /// The name of the recovery services vault.
+ ///
+ ///
+ /// Backup storage config.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task UpdateWithHttpMessagesAsync(string resourceGroupName, string vaultName, BackupStorageConfig backupStorageConfig, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/IBackupVaultConfigsOperations.cs b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/IBackupVaultConfigsOperations.cs
new file mode 100644
index 000000000000..d303bb217eff
--- /dev/null
+++ b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/IBackupVaultConfigsOperations.cs
@@ -0,0 +1,78 @@
+// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+
+namespace Microsoft.Azure.Management.RecoveryServices
+{
+ using Microsoft.Azure;
+ using Microsoft.Azure.Management;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// BackupVaultConfigsOperations operations.
+ ///
+ public partial interface IBackupVaultConfigsOperations
+ {
+ ///
+ /// Fetches vault config.
+ ///
+ ///
+ /// The name of the resource group where the recovery services vault is
+ /// present.
+ ///
+ ///
+ /// The name of the recovery services vault.
+ ///
+ ///
+ /// 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, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Updates vault config model type.
+ ///
+ ///
+ /// The name of the resource group where the recovery services vault is
+ /// present.
+ ///
+ ///
+ /// The name of the recovery services vault.
+ ///
+ ///
+ /// Backup vault config.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string vaultName, BackupVaultConfig backupVaultConfig, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/IOperations.cs b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/IOperations.cs
new file mode 100644
index 000000000000..675d715b50bb
--- /dev/null
+++ b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/IOperations.cs
@@ -0,0 +1,68 @@
+// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+
+namespace Microsoft.Azure.Management.RecoveryServices
+{
+ using Microsoft.Azure;
+ using Microsoft.Azure.Management;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// Operations operations.
+ ///
+ public partial interface IOperations
+ {
+ ///
+ /// Returns the list of available operations.
+ ///
+ ///
+ /// The name of the resource group where the recovery services vault is
+ /// present.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Returns the list of available operations.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/IRecoveryServicesClient.cs b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/IRecoveryServicesClient.cs
index 5c0691d781c5..983ef915a66d 100644
--- a/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/IRecoveryServicesClient.cs
+++ b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/IRecoveryServicesClient.cs
@@ -1,17 +1,18 @@
-// 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 0.17.0.0
+// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace Microsoft.Azure.Management.RecoveryServices
{
+ using Microsoft.Azure;
+ using Microsoft.Azure.Management;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;
+ using Newtonsoft.Json;
///
+ /// Composite Swagger for Recovery Services Client
///
public partial interface IRecoveryServicesClient : System.IDisposable
{
@@ -23,28 +24,23 @@ public partial interface IRecoveryServicesClient : System.IDisposable
///
/// Gets or sets json serialization settings.
///
- Newtonsoft.Json.JsonSerializerSettings SerializationSettings { get; }
+ JsonSerializerSettings SerializationSettings { get; }
///
/// Gets or sets json deserialization settings.
///
- Newtonsoft.Json.JsonSerializerSettings DeserializationSettings { get; }
+ JsonSerializerSettings DeserializationSettings { get; }
///
/// Credentials needed for the client to connect to Azure.
///
- Microsoft.Rest.ServiceClientCredentials Credentials { get; }
+ ServiceClientCredentials Credentials { get; }
///
/// The subscription Id.
///
string SubscriptionId { get; set; }
- ///
- /// Client Api Version.
- ///
- string ApiVersion { get; }
-
///
/// Gets or sets the preferred language for the response.
///
@@ -57,16 +53,56 @@ public partial interface IRecoveryServicesClient : System.IDisposable
int? LongRunningOperationRetryTimeout { get; set; }
///
- /// When set to true a unique x-ms-client-request-id value is
- /// generated and included in each request. Default is true.
+ /// When set to true a unique x-ms-client-request-id value is generated
+ /// and included in each request. Default is true.
///
bool? GenerateClientRequestId { get; set; }
+ ///
+ /// Gets the IOperations.
+ ///
+ IOperations Operations { get; }
+
+ ///
+ /// Gets the IBackupVaultConfigsOperations.
+ ///
+ IBackupVaultConfigsOperations BackupVaultConfigs { get; }
+
+ ///
+ /// Gets the IBackupStorageConfigsOperations.
+ ///
+ IBackupStorageConfigsOperations BackupStorageConfigs { get; }
+
+ ///
+ /// Gets the IVaultCertificatesOperations.
+ ///
+ IVaultCertificatesOperations VaultCertificates { get; }
+
+ ///
+ /// Gets the IRegisteredIdentitiesOperations.
+ ///
+ IRegisteredIdentitiesOperations RegisteredIdentities { get; }
+
+ ///
+ /// Gets the IReplicationUsagesOperations.
+ ///
+ IReplicationUsagesOperations ReplicationUsages { get; }
+
///
/// Gets the IVaultsOperations.
///
IVaultsOperations Vaults { get; }
+ ///
+ /// Gets the IVaultExtendedInfoOperations.
+ ///
+ IVaultExtendedInfoOperations VaultExtendedInfo { get; }
+
+ ///
+ /// Gets the IUsagesOperations.
+ ///
+ IUsagesOperations Usages { get; }
+
}
}
diff --git a/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/IRegisteredIdentitiesOperations.cs b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/IRegisteredIdentitiesOperations.cs
new file mode 100644
index 000000000000..a4d0b0bbcd44
--- /dev/null
+++ b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/IRegisteredIdentitiesOperations.cs
@@ -0,0 +1,49 @@
+// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+
+namespace Microsoft.Azure.Management.RecoveryServices
+{
+ using Microsoft.Azure;
+ using Microsoft.Azure.Management;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// RegisteredIdentitiesOperations operations.
+ ///
+ public partial interface IRegisteredIdentitiesOperations
+ {
+ ///
+ /// Unregisters the given container from your Recovery Services vault.
+ ///
+ ///
+ /// The name of the resource group where the recovery services vault is
+ /// present.
+ ///
+ ///
+ /// The name of the recovery services vault.
+ ///
+ ///
+ /// Name of the protection container to unregister.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task DeleteWithHttpMessagesAsync(string resourceGroupName, string vaultName, string identityName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/IReplicationUsagesOperations.cs b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/IReplicationUsagesOperations.cs
new file mode 100644
index 000000000000..e525882063c1
--- /dev/null
+++ b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/IReplicationUsagesOperations.cs
@@ -0,0 +1,49 @@
+// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+
+namespace Microsoft.Azure.Management.RecoveryServices
+{
+ using Microsoft.Azure;
+ using Microsoft.Azure.Management;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// ReplicationUsagesOperations operations.
+ ///
+ public partial interface IReplicationUsagesOperations
+ {
+ ///
+ /// Fetches the replication usages of the vault.
+ ///
+ ///
+ /// The name of the resource group where the recovery services vault is
+ /// present.
+ ///
+ ///
+ /// The name of the recovery services vault.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListWithHttpMessagesAsync(string resourceGroupName, string vaultName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/IUsagesOperations.cs b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/IUsagesOperations.cs
new file mode 100644
index 000000000000..e417b229bf3d
--- /dev/null
+++ b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/IUsagesOperations.cs
@@ -0,0 +1,49 @@
+// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+
+namespace Microsoft.Azure.Management.RecoveryServices
+{
+ using Microsoft.Azure;
+ using Microsoft.Azure.Management;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// UsagesOperations operations.
+ ///
+ public partial interface IUsagesOperations
+ {
+ ///
+ /// Fetches the usages of the vault.
+ ///
+ ///
+ /// The name of the resource group where the recovery services vault is
+ /// present.
+ ///
+ ///
+ /// The name of the recovery services vault.
+ ///
+ ///
+ /// 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>> ListByVaultsWithHttpMessagesAsync(string resourceGroupName, string vaultName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/IVaultCertificatesOperations.cs b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/IVaultCertificatesOperations.cs
new file mode 100644
index 000000000000..331c82d60486
--- /dev/null
+++ b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/IVaultCertificatesOperations.cs
@@ -0,0 +1,55 @@
+// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+
+namespace Microsoft.Azure.Management.RecoveryServices
+{
+ using Microsoft.Azure;
+ using Microsoft.Azure.Management;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// VaultCertificatesOperations operations.
+ ///
+ public partial interface IVaultCertificatesOperations
+ {
+ ///
+ /// Upload a certificate for a resource.
+ ///
+ ///
+ /// The name of the resource group where the recovery services vault is
+ /// present.
+ ///
+ ///
+ /// The name of the recovery services vault.
+ ///
+ ///
+ /// Certificate friendly name.
+ ///
+ ///
+ /// Input parameters for uploading the vault certificate.
+ ///
+ ///
+ /// 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> CreateWithHttpMessagesAsync(string resourceGroupName, string vaultName, string certificateName, CertificateRequest certificateRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/IVaultExtendedInfoOperations.cs b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/IVaultExtendedInfoOperations.cs
new file mode 100644
index 000000000000..acda50836779
--- /dev/null
+++ b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/IVaultExtendedInfoOperations.cs
@@ -0,0 +1,107 @@
+// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+
+namespace Microsoft.Azure.Management.RecoveryServices
+{
+ using Microsoft.Azure;
+ using Microsoft.Azure.Management;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// VaultExtendedInfoOperations operations.
+ ///
+ public partial interface IVaultExtendedInfoOperations
+ {
+ ///
+ /// Get the vault extended info.
+ ///
+ ///
+ /// The name of the resource group where the recovery services vault is
+ /// present.
+ ///
+ ///
+ /// The name of the recovery services vault.
+ ///
+ ///
+ /// 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, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Create vault extended info.
+ ///
+ ///
+ /// The name of the resource group where the recovery services vault is
+ /// present.
+ ///
+ ///
+ /// The name of the recovery services vault.
+ ///
+ ///
+ /// resourceResourceExtendedInfoDetails
+ ///
+ ///
+ /// 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> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string vaultName, VaultExtendedInfoResource resourceResourceExtendedInfoDetails, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Update vault extended info.
+ ///
+ ///
+ /// The name of the resource group where the recovery services vault is
+ /// present.
+ ///
+ ///
+ /// The name of the recovery services vault.
+ ///
+ ///
+ /// resourceResourceExtendedInfoDetails
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string vaultName, VaultExtendedInfoResource resourceResourceExtendedInfoDetails, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/IVaultsOperations.cs b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/IVaultsOperations.cs
index 7cd2f45f108e..9092457fc8cc 100644
--- a/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/IVaultsOperations.cs
+++ b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/IVaultsOperations.cs
@@ -1,14 +1,18 @@
-// 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 0.17.0.0
+// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace Microsoft.Azure.Management.RecoveryServices
{
+ using Microsoft.Azure;
+ using Microsoft.Azure.Management;
+ using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
///
/// VaultsOperations operations.
@@ -16,14 +20,31 @@ namespace Microsoft.Azure.Management.RecoveryServices
public partial interface IVaultsOperations
{
///
- /// Get the Vault details.
+ /// Fetches all the resources of the specified type in the
+ /// subscription.
///
- ///
- /// The name of the resource group where the recovery services vault
- /// is present.
+ ///
+ /// The headers that will be added to request.
///
- ///
- /// The name of the recovery services vault.
+ ///
+ /// 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>> ListBySubscriptionIdWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Retrieve a list of Vaults.
+ ///
+ ///
+ /// The name of the resource group where the recovery services vault is
+ /// present.
///
///
/// The headers that will be added to request.
@@ -40,20 +61,17 @@ public partial interface IVaultsOperations
///
/// Thrown when a required parameter is null
///
- System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string vaultName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Creates or updates a Recovery Services vault.
+ /// Get the Vault details.
///
///
- /// The name of the resource group where the recovery services vault
- /// is present.
+ /// The name of the resource group where the recovery services vault is
+ /// present.
///
///
/// The name of the recovery services vault.
///
- ///
- /// Recovery Services Vault to be created.
- ///
///
/// The headers that will be added to request.
///
@@ -69,17 +87,20 @@ public partial interface IVaultsOperations
///
/// Thrown when a required parameter is null
///
- System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string vaultName, Vault vault, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ Task> GetWithHttpMessagesAsync(string resourceGroupName, string vaultName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Deletes a vault.
+ /// Creates or updates a Recovery Services vault.
///
///
- /// The name of the resource group where the recovery services vault
- /// is present.
+ /// The name of the resource group where the recovery services vault is
+ /// present.
///
///
/// The name of the recovery services vault.
///
+ ///
+ /// Recovery Services Vault to be created.
+ ///
///
/// The headers that will be added to request.
///
@@ -89,16 +110,22 @@ public partial interface IVaultsOperations
///
/// Thrown when the operation returned an invalid status code
///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
///
/// Thrown when a required parameter is null
///
- System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string vaultName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string vaultName, Vault vault, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Retrieve a list of Vaults.
+ /// Deletes a vault.
///
///
- /// The name of the resource group where the recovery services vault
- /// is present.
+ /// The name of the resource group where the recovery services vault is
+ /// present.
+ ///
+ ///
+ /// The name of the recovery services vault.
///
///
/// The headers that will be added to request.
@@ -109,18 +136,22 @@ public partial interface IVaultsOperations
///
/// Thrown when the operation returned an invalid status code
///
- ///
- /// Thrown when unable to deserialize the response
- ///
///
/// Thrown when a required parameter is null
///
- System.Threading.Tasks.Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ Task DeleteWithHttpMessagesAsync(string resourceGroupName, string vaultName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Retrieve a list of Vaults.
+ /// Updates the vault.
///
- ///
- /// The NextLink from the previous successful call to List operation.
+ ///
+ /// The name of the resource group where the recovery services vault is
+ /// present.
+ ///
+ ///
+ /// The name of the recovery services vault.
+ ///
+ ///
+ /// Recovery Services Vault to be created.
///
///
/// The headers that will be added to request.
@@ -137,6 +168,6 @@ public partial interface IVaultsOperations
///
/// Thrown when a required parameter is null
///
- System.Threading.Tasks.Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string vaultName, Vault vault, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
diff --git a/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/AuthType.cs b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/AuthType.cs
new file mode 100644
index 000000000000..803d1f8d8764
--- /dev/null
+++ b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/AuthType.cs
@@ -0,0 +1,22 @@
+// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+
+namespace Microsoft.Azure.Management.RecoveryServices.Models
+{
+ using Microsoft.Azure;
+ using Microsoft.Azure.Management;
+ using Microsoft.Azure.Management.RecoveryServices;
+
+ ///
+ /// Defines values for AuthType.
+ ///
+ public static class AuthType
+ {
+ public const string Invalid = "Invalid";
+ public const string ACS = "ACS";
+ public const string AAD = "AAD";
+ public const string AccessControlService = "AccessControlService";
+ public const string AzureActiveDirectory = "AzureActiveDirectory";
+ }
+}
diff --git a/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/BackupStorageConfig.cs b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/BackupStorageConfig.cs
new file mode 100644
index 000000000000..3b79445fbac4
--- /dev/null
+++ b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/BackupStorageConfig.cs
@@ -0,0 +1,75 @@
+// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+
+namespace Microsoft.Azure.Management.RecoveryServices.Models
+{
+ using Microsoft.Azure;
+ using Microsoft.Azure.Management;
+ using Microsoft.Azure.Management.RecoveryServices;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// The backup storage config.
+ ///
+ [Rest.Serialization.JsonTransformation]
+ public partial class BackupStorageConfig : Resource
+ {
+ ///
+ /// Initializes a new instance of the BackupStorageConfig class.
+ ///
+ public BackupStorageConfig() { }
+
+ ///
+ /// Initializes a new instance of the BackupStorageConfig class.
+ ///
+ /// Resource Id represents the complete path to the
+ /// resource.
+ /// Resource name associated with the
+ /// resource.
+ /// Resource type represents the complete path of
+ /// the form Namespace/ResourceType/ResourceType/...
+ /// Optional ETag.
+ /// Storage model type. Possible values
+ /// include: 'Invalid', 'GeoRedundant', 'LocallyRedundant'
+ /// Storage type. Possible values include:
+ /// 'Invalid', 'GeoRedundant', 'LocallyRedundant'
+ /// Locked or Unlocked. Once a machine
+ /// is registered against a resource, the storageTypeState is always
+ /// Locked. Possible values include: 'Invalid', 'Locked',
+ /// 'Unlocked'
+ public BackupStorageConfig(string id = default(string), string name = default(string), string type = default(string), string eTag = default(string), string storageModelType = default(string), string storageType = default(string), string storageTypeState = default(string))
+ : base(id, name, type, eTag)
+ {
+ StorageModelType = storageModelType;
+ StorageType = storageType;
+ StorageTypeState = storageTypeState;
+ }
+
+ ///
+ /// Gets or sets storage model type. Possible values include:
+ /// 'Invalid', 'GeoRedundant', 'LocallyRedundant'
+ ///
+ [JsonProperty(PropertyName = "properties.storageModelType")]
+ public string StorageModelType { get; set; }
+
+ ///
+ /// Gets or sets storage type. Possible values include: 'Invalid',
+ /// 'GeoRedundant', 'LocallyRedundant'
+ ///
+ [JsonProperty(PropertyName = "properties.storageType")]
+ public string StorageType { get; set; }
+
+ ///
+ /// Gets or sets locked or Unlocked. Once a machine is registered
+ /// against a resource, the storageTypeState is always Locked. Possible
+ /// values include: 'Invalid', 'Locked', 'Unlocked'
+ ///
+ [JsonProperty(PropertyName = "properties.storageTypeState")]
+ public string StorageTypeState { get; set; }
+
+ }
+}
diff --git a/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/BackupVaultConfig.cs b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/BackupVaultConfig.cs
new file mode 100644
index 000000000000..76d310a59261
--- /dev/null
+++ b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/BackupVaultConfig.cs
@@ -0,0 +1,75 @@
+// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+
+namespace Microsoft.Azure.Management.RecoveryServices.Models
+{
+ using Microsoft.Azure;
+ using Microsoft.Azure.Management;
+ using Microsoft.Azure.Management.RecoveryServices;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Backup vault config details.
+ ///
+ [Rest.Serialization.JsonTransformation]
+ public partial class BackupVaultConfig : Resource
+ {
+ ///
+ /// Initializes a new instance of the BackupVaultConfig class.
+ ///
+ public BackupVaultConfig() { }
+
+ ///
+ /// Initializes a new instance of the BackupVaultConfig class.
+ ///
+ /// Resource Id represents the complete path to the
+ /// resource.
+ /// Resource name associated with the
+ /// resource.
+ /// Resource type represents the complete path of
+ /// the form Namespace/ResourceType/ResourceType/...
+ /// Optional ETag.
+ /// Storage type. Possible values include:
+ /// 'Invalid', 'GeoRedundant', 'LocallyRedundant'
+ /// Locked or Unlocked. Once a machine
+ /// is registered against a resource, the storageTypeState is always
+ /// Locked. Possible values include: 'Invalid', 'Locked',
+ /// 'Unlocked'
+ /// Enabled or Disabled. Possible
+ /// values include: 'Invalid', 'Enabled', 'Disabled'
+ public BackupVaultConfig(string id = default(string), string name = default(string), string type = default(string), string eTag = default(string), string storageType = default(string), string storageTypeState = default(string), string enhancedSecurityState = default(string))
+ : base(id, name, type, eTag)
+ {
+ StorageType = storageType;
+ StorageTypeState = storageTypeState;
+ EnhancedSecurityState = enhancedSecurityState;
+ }
+
+ ///
+ /// Gets or sets storage type. Possible values include: 'Invalid',
+ /// 'GeoRedundant', 'LocallyRedundant'
+ ///
+ [JsonProperty(PropertyName = "properties.storageType")]
+ public string StorageType { get; set; }
+
+ ///
+ /// Gets or sets locked or Unlocked. Once a machine is registered
+ /// against a resource, the storageTypeState is always Locked. Possible
+ /// values include: 'Invalid', 'Locked', 'Unlocked'
+ ///
+ [JsonProperty(PropertyName = "properties.storageTypeState")]
+ public string StorageTypeState { get; set; }
+
+ ///
+ /// Gets or sets enabled or Disabled. Possible values include:
+ /// 'Invalid', 'Enabled', 'Disabled'
+ ///
+ [JsonProperty(PropertyName = "properties.enhancedSecurityState")]
+ public string EnhancedSecurityState { get; set; }
+
+ }
+}
diff --git a/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/CertificateRequest.cs b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/CertificateRequest.cs
new file mode 100644
index 000000000000..dae9358c9196
--- /dev/null
+++ b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/CertificateRequest.cs
@@ -0,0 +1,37 @@
+// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+
+namespace Microsoft.Azure.Management.RecoveryServices.Models
+{
+ using Microsoft.Azure;
+ using Microsoft.Azure.Management;
+ using Microsoft.Azure.Management.RecoveryServices;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Details of the certificate to be uploaded to the vault.
+ ///
+ public partial class CertificateRequest
+ {
+ ///
+ /// Initializes a new instance of the CertificateRequest class.
+ ///
+ public CertificateRequest() { }
+
+ ///
+ /// Initializes a new instance of the CertificateRequest class.
+ ///
+ public CertificateRequest(RawCertificateData properties = default(RawCertificateData))
+ {
+ Properties = properties;
+ }
+
+ ///
+ ///
+ [JsonProperty(PropertyName = "properties")]
+ public RawCertificateData Properties { get; set; }
+
+ }
+}
diff --git a/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/ClientDiscoveryDisplay.cs b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/ClientDiscoveryDisplay.cs
new file mode 100644
index 000000000000..822c8c8e8d2f
--- /dev/null
+++ b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/ClientDiscoveryDisplay.cs
@@ -0,0 +1,63 @@
+// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+
+namespace Microsoft.Azure.Management.RecoveryServices.Models
+{
+ using Microsoft.Azure;
+ using Microsoft.Azure.Management;
+ using Microsoft.Azure.Management.RecoveryServices;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Localized display information of an operation.
+ ///
+ public partial class ClientDiscoveryDisplay
+ {
+ ///
+ /// Initializes a new instance of the ClientDiscoveryDisplay class.
+ ///
+ public ClientDiscoveryDisplay() { }
+
+ ///
+ /// Initializes a new instance of the ClientDiscoveryDisplay class.
+ ///
+ /// Name of the resource provider.
+ /// Type of the resource.
+ /// Name of the operation.
+ /// Operation description.
+ public ClientDiscoveryDisplay(string provider = default(string), string resource = default(string), string operation = default(string), string description = default(string))
+ {
+ Provider = provider;
+ Resource = resource;
+ Operation = operation;
+ Description = description;
+ }
+
+ ///
+ /// Gets name of the resource provider.
+ ///
+ [JsonProperty(PropertyName = "Provider")]
+ public string Provider { get; private set; }
+
+ ///
+ /// Gets type of the resource.
+ ///
+ [JsonProperty(PropertyName = "Resource")]
+ public string Resource { get; private set; }
+
+ ///
+ /// Gets name of the operation.
+ ///
+ [JsonProperty(PropertyName = "Operation")]
+ public string Operation { get; private set; }
+
+ ///
+ /// Gets operation description.
+ ///
+ [JsonProperty(PropertyName = "Description")]
+ public string Description { get; private set; }
+
+ }
+}
diff --git a/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/ClientDiscoveryForLogSpecification.cs b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/ClientDiscoveryForLogSpecification.cs
new file mode 100644
index 000000000000..fb323f122e9d
--- /dev/null
+++ b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/ClientDiscoveryForLogSpecification.cs
@@ -0,0 +1,57 @@
+// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+
+namespace Microsoft.Azure.Management.RecoveryServices.Models
+{
+ using Microsoft.Azure;
+ using Microsoft.Azure.Management;
+ using Microsoft.Azure.Management.RecoveryServices;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Log specification for the operation.
+ ///
+ public partial class ClientDiscoveryForLogSpecification
+ {
+ ///
+ /// Initializes a new instance of the
+ /// ClientDiscoveryForLogSpecification class.
+ ///
+ public ClientDiscoveryForLogSpecification() { }
+
+ ///
+ /// Initializes a new instance of the
+ /// ClientDiscoveryForLogSpecification class.
+ ///
+ /// Name of the log.
+ /// Localized display name.
+ /// Blob duration.
+ public ClientDiscoveryForLogSpecification(string name = default(string), string displayName = default(string), System.DateTime? blobDuration = default(System.DateTime?))
+ {
+ Name = name;
+ DisplayName = displayName;
+ BlobDuration = blobDuration;
+ }
+
+ ///
+ /// Gets name of the log.
+ ///
+ [JsonProperty(PropertyName = "name")]
+ public string Name { get; private set; }
+
+ ///
+ /// Gets localized display name.
+ ///
+ [JsonProperty(PropertyName = "displayName")]
+ public string DisplayName { get; private set; }
+
+ ///
+ /// Gets blob duration.
+ ///
+ [JsonProperty(PropertyName = "blobDuration")]
+ public System.DateTime? BlobDuration { get; private set; }
+
+ }
+}
diff --git a/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/ClientDiscoveryForServiceSpecification.cs b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/ClientDiscoveryForServiceSpecification.cs
new file mode 100644
index 000000000000..89f8adeddf57
--- /dev/null
+++ b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/ClientDiscoveryForServiceSpecification.cs
@@ -0,0 +1,44 @@
+// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+
+namespace Microsoft.Azure.Management.RecoveryServices.Models
+{
+ using Microsoft.Azure;
+ using Microsoft.Azure.Management;
+ using Microsoft.Azure.Management.RecoveryServices;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Operation properties.
+ ///
+ public partial class ClientDiscoveryForServiceSpecification
+ {
+ ///
+ /// Initializes a new instance of the
+ /// ClientDiscoveryForServiceSpecification class.
+ ///
+ public ClientDiscoveryForServiceSpecification() { }
+
+ ///
+ /// Initializes a new instance of the
+ /// ClientDiscoveryForServiceSpecification class.
+ ///
+ /// List of log specifications of this
+ /// operation.
+ public ClientDiscoveryForServiceSpecification(IList logSpecifications = default(IList))
+ {
+ LogSpecifications = logSpecifications;
+ }
+
+ ///
+ /// Gets list of log specifications of this operation.
+ ///
+ [JsonProperty(PropertyName = "logSpecifications")]
+ public IList LogSpecifications { get; private set; }
+
+ }
+}
diff --git a/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/ClientDiscoveryValueForSingleApi.cs b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/ClientDiscoveryValueForSingleApi.cs
new file mode 100644
index 000000000000..3b93e25482a0
--- /dev/null
+++ b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/ClientDiscoveryValueForSingleApi.cs
@@ -0,0 +1,71 @@
+// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+
+namespace Microsoft.Azure.Management.RecoveryServices.Models
+{
+ using Microsoft.Azure;
+ using Microsoft.Azure.Management;
+ using Microsoft.Azure.Management.RecoveryServices;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Available operation details.
+ ///
+ [Rest.Serialization.JsonTransformation]
+ public partial class ClientDiscoveryValueForSingleApi
+ {
+ ///
+ /// Initializes a new instance of the ClientDiscoveryValueForSingleApi
+ /// class.
+ ///
+ public ClientDiscoveryValueForSingleApi() { }
+
+ ///
+ /// Initializes a new instance of the ClientDiscoveryValueForSingleApi
+ /// class.
+ ///
+ /// Name of the operation.
+ /// Contains the localized display information
+ /// for this particular operation.
+ /// The intended executor of the
+ /// operation.
+ /// Operation properties.
+ public ClientDiscoveryValueForSingleApi(string name = default(string), ClientDiscoveryDisplay display = default(ClientDiscoveryDisplay), string origin = default(string), ClientDiscoveryForServiceSpecification serviceSpecification = default(ClientDiscoveryForServiceSpecification))
+ {
+ Name = name;
+ Display = display;
+ Origin = origin;
+ ServiceSpecification = serviceSpecification;
+ }
+
+ ///
+ /// Gets name of the operation.
+ ///
+ [JsonProperty(PropertyName = "Name")]
+ public string Name { get; private set; }
+
+ ///
+ /// Gets contains the localized display information for this particular
+ /// operation.
+ ///
+ [JsonProperty(PropertyName = "Display")]
+ public ClientDiscoveryDisplay Display { get; private set; }
+
+ ///
+ /// Gets the intended executor of the operation.
+ ///
+ [JsonProperty(PropertyName = "Origin")]
+ public string Origin { get; private set; }
+
+ ///
+ /// Gets operation properties.
+ ///
+ [JsonProperty(PropertyName = "Properties.serviceSpecification")]
+ public ClientDiscoveryForServiceSpecification ServiceSpecification { get; private set; }
+
+ }
+}
diff --git a/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/EnhancedSecurityState.cs b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/EnhancedSecurityState.cs
new file mode 100644
index 000000000000..0d6874a92bec
--- /dev/null
+++ b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/EnhancedSecurityState.cs
@@ -0,0 +1,20 @@
+// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+
+namespace Microsoft.Azure.Management.RecoveryServices.Models
+{
+ using Microsoft.Azure;
+ using Microsoft.Azure.Management;
+ using Microsoft.Azure.Management.RecoveryServices;
+
+ ///
+ /// Defines values for EnhancedSecurityState.
+ ///
+ public static class EnhancedSecurityState
+ {
+ public const string Invalid = "Invalid";
+ public const string Enabled = "Enabled";
+ public const string Disabled = "Disabled";
+ }
+}
diff --git a/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/JobsSummary.cs b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/JobsSummary.cs
new file mode 100644
index 000000000000..cffe781bf1d3
--- /dev/null
+++ b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/JobsSummary.cs
@@ -0,0 +1,55 @@
+// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+
+namespace Microsoft.Azure.Management.RecoveryServices.Models
+{
+ using Microsoft.Azure;
+ using Microsoft.Azure.Management;
+ using Microsoft.Azure.Management.RecoveryServices;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Summary of the replication job data for this vault.
+ ///
+ public partial class JobsSummary
+ {
+ ///
+ /// Initializes a new instance of the JobsSummary class.
+ ///
+ public JobsSummary() { }
+
+ ///
+ /// Initializes a new instance of the JobsSummary class.
+ ///
+ /// Count of failed jobs.
+ /// Count of suspended jobs.
+ /// Count of in-progress jobs.
+ public JobsSummary(int? failedJobs = default(int?), int? suspendedJobs = default(int?), int? inProgressJobs = default(int?))
+ {
+ FailedJobs = failedJobs;
+ SuspendedJobs = suspendedJobs;
+ InProgressJobs = inProgressJobs;
+ }
+
+ ///
+ /// Gets or sets count of failed jobs.
+ ///
+ [JsonProperty(PropertyName = "failedJobs")]
+ public int? FailedJobs { get; set; }
+
+ ///
+ /// Gets or sets count of suspended jobs.
+ ///
+ [JsonProperty(PropertyName = "suspendedJobs")]
+ public int? SuspendedJobs { get; set; }
+
+ ///
+ /// Gets or sets count of in-progress jobs.
+ ///
+ [JsonProperty(PropertyName = "inProgressJobs")]
+ public int? InProgressJobs { get; set; }
+
+ }
+}
diff --git a/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/MonitoringSummary.cs b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/MonitoringSummary.cs
new file mode 100644
index 000000000000..9a32ec20e015
--- /dev/null
+++ b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/MonitoringSummary.cs
@@ -0,0 +1,84 @@
+// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+
+namespace Microsoft.Azure.Management.RecoveryServices.Models
+{
+ using Microsoft.Azure;
+ using Microsoft.Azure.Management;
+ using Microsoft.Azure.Management.RecoveryServices;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Summary of the replication monitoring data for this vault.
+ ///
+ public partial class MonitoringSummary
+ {
+ ///
+ /// Initializes a new instance of the MonitoringSummary class.
+ ///
+ public MonitoringSummary() { }
+
+ ///
+ /// Initializes a new instance of the MonitoringSummary class.
+ ///
+ /// Count of unhealthy VMs.
+ /// Count of unhealthy replication
+ /// providers.
+ /// Count of all critical warnings.
+ /// Count of all deprecated
+ /// recovery service providers.
+ /// Count of all the supported
+ /// recovery service providers.
+ /// Count of all the unsupported
+ /// recovery service providers.
+ public MonitoringSummary(int? unHealthyVmCount = default(int?), int? unHealthyProviderCount = default(int?), int? eventsCount = default(int?), int? deprecatedProviderCount = default(int?), int? supportedProviderCount = default(int?), int? unsupportedProviderCount = default(int?))
+ {
+ UnHealthyVmCount = unHealthyVmCount;
+ UnHealthyProviderCount = unHealthyProviderCount;
+ EventsCount = eventsCount;
+ DeprecatedProviderCount = deprecatedProviderCount;
+ SupportedProviderCount = supportedProviderCount;
+ UnsupportedProviderCount = unsupportedProviderCount;
+ }
+
+ ///
+ /// Gets or sets count of unhealthy VMs.
+ ///
+ [JsonProperty(PropertyName = "unHealthyVmCount")]
+ public int? UnHealthyVmCount { get; set; }
+
+ ///
+ /// Gets or sets count of unhealthy replication providers.
+ ///
+ [JsonProperty(PropertyName = "unHealthyProviderCount")]
+ public int? UnHealthyProviderCount { get; set; }
+
+ ///
+ /// Gets or sets count of all critical warnings.
+ ///
+ [JsonProperty(PropertyName = "eventsCount")]
+ public int? EventsCount { get; set; }
+
+ ///
+ /// Gets or sets count of all deprecated recovery service providers.
+ ///
+ [JsonProperty(PropertyName = "deprecatedProviderCount")]
+ public int? DeprecatedProviderCount { get; set; }
+
+ ///
+ /// Gets or sets count of all the supported recovery service providers.
+ ///
+ [JsonProperty(PropertyName = "supportedProviderCount")]
+ public int? SupportedProviderCount { get; set; }
+
+ ///
+ /// Gets or sets count of all the unsupported recovery service
+ /// providers.
+ ///
+ [JsonProperty(PropertyName = "unsupportedProviderCount")]
+ public int? UnsupportedProviderCount { get; set; }
+
+ }
+}
diff --git a/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/NameInfo.cs b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/NameInfo.cs
new file mode 100644
index 000000000000..464874ec652a
--- /dev/null
+++ b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/NameInfo.cs
@@ -0,0 +1,47 @@
+// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+
+namespace Microsoft.Azure.Management.RecoveryServices.Models
+{
+ using Microsoft.Azure;
+ using Microsoft.Azure.Management;
+ using Microsoft.Azure.Management.RecoveryServices;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// The name of usage.
+ ///
+ public partial class NameInfo
+ {
+ ///
+ /// Initializes a new instance of the NameInfo class.
+ ///
+ public NameInfo() { }
+
+ ///
+ /// Initializes a new instance of the NameInfo class.
+ ///
+ /// Value of usage.
+ /// Localized value of usage.
+ public NameInfo(string value = default(string), string localizedValue = default(string))
+ {
+ Value = value;
+ LocalizedValue = localizedValue;
+ }
+
+ ///
+ /// Gets or sets value of usage.
+ ///
+ [JsonProperty(PropertyName = "value")]
+ public string Value { get; set; }
+
+ ///
+ /// Gets or sets localized value of usage.
+ ///
+ [JsonProperty(PropertyName = "localizedValue")]
+ public string LocalizedValue { get; set; }
+
+ }
+}
diff --git a/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/Page.cs b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/Page.cs
index cd73ca468752..a85ed111d170 100644
--- a/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/Page.cs
+++ b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/Page.cs
@@ -1,43 +1,48 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
+// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace Microsoft.Azure.Management.RecoveryServices.Models
{
+ using Microsoft.Azure;
+ using Microsoft.Azure.Management;
+ using Microsoft.Azure.Management.RecoveryServices;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
///
/// Defines a page in Azure responses.
///
/// Type of the page content items
- [Newtonsoft.Json.JsonObject]
- public class Page : Microsoft.Rest.Azure.IPage
+ [JsonObject]
+ public class Page : IPage
{
///
/// Gets the link to the next page.
///
- [Newtonsoft.Json.JsonProperty("null")]
- public System.String NextPageLink { get; private set; }
+ [JsonProperty("NextLink")]
+ public string NextPageLink { get; private set; }
- [Newtonsoft.Json.JsonProperty("value")]
- private System.Collections.Generic.IList Items{ get; set; }
+ [JsonProperty("value")]
+ private IList Items{ get; set; }
///
/// Returns an enumerator that iterates through the collection.
///
/// A an enumerator that can be used to iterate through the collection.
- public System.Collections.Generic.IEnumerator GetEnumerator()
+ public IEnumerator GetEnumerator()
{
- return (Items == null) ? System.Linq.Enumerable.Empty().GetEnumerator() : Items.GetEnumerator();
+ return Items == null ? System.Linq.Enumerable.Empty().GetEnumerator() : Items.GetEnumerator();
}
///
/// Returns an enumerator that iterates through the collection.
///
/// A an enumerator that can be used to iterate through the collection.
- System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
+ IEnumerator IEnumerable.GetEnumerator()
{
return GetEnumerator();
}
diff --git a/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/Page1.cs b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/Page1.cs
new file mode 100644
index 000000000000..71c27deefe11
--- /dev/null
+++ b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/Page1.cs
@@ -0,0 +1,50 @@
+// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+
+namespace Microsoft.Azure.Management.RecoveryServices.Models
+{
+ using Microsoft.Azure;
+ using Microsoft.Azure.Management;
+ using Microsoft.Azure.Management.RecoveryServices;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+
+ ///
+ /// Defines a page in Azure responses.
+ ///
+ /// Type of the page content items
+ [JsonObject]
+ public class Page1 : IPage
+ {
+ ///
+ /// Gets the link to the next page.
+ ///
+ [JsonProperty("")]
+ public string NextPageLink { get; private set; }
+
+ [JsonProperty("value")]
+ private IList Items{ get; set; }
+
+ ///
+ /// Returns an enumerator that iterates through the collection.
+ ///
+ /// A an enumerator that can be used to iterate through the collection.
+ public IEnumerator GetEnumerator()
+ {
+ return Items == null ? System.Linq.Enumerable.Empty().GetEnumerator() : Items.GetEnumerator();
+ }
+
+ ///
+ /// Returns an enumerator that iterates through the collection.
+ ///
+ /// A an enumerator that can be used to iterate through the collection.
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return GetEnumerator();
+ }
+ }
+}
diff --git a/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/RawCertificateData.cs b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/RawCertificateData.cs
new file mode 100644
index 000000000000..7fe9dd967d61
--- /dev/null
+++ b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/RawCertificateData.cs
@@ -0,0 +1,52 @@
+// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+
+namespace Microsoft.Azure.Management.RecoveryServices.Models
+{
+ using Microsoft.Azure;
+ using Microsoft.Azure.Management;
+ using Microsoft.Azure.Management.RecoveryServices;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Raw certificate data.
+ ///
+ public partial class RawCertificateData
+ {
+ ///
+ /// Initializes a new instance of the RawCertificateData class.
+ ///
+ public RawCertificateData() { }
+
+ ///
+ /// Initializes a new instance of the RawCertificateData class.
+ ///
+ /// Specifies the authentication type. Possible
+ /// values include: 'Invalid', 'ACS', 'AAD', 'AccessControlService',
+ /// 'AzureActiveDirectory'
+ /// The base64 encoded certificate raw data
+ /// string
+ public RawCertificateData(string authType = default(string), byte[] certificate = default(byte[]))
+ {
+ AuthType = authType;
+ Certificate = certificate;
+ }
+
+ ///
+ /// Gets or sets specifies the authentication type. Possible values
+ /// include: 'Invalid', 'ACS', 'AAD', 'AccessControlService',
+ /// 'AzureActiveDirectory'
+ ///
+ [JsonProperty(PropertyName = "authType")]
+ public string AuthType { get; set; }
+
+ ///
+ /// Gets or sets the base64 encoded certificate raw data string
+ ///
+ [JsonProperty(PropertyName = "certificate")]
+ public byte[] Certificate { get; set; }
+
+ }
+}
diff --git a/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/ReplicationUsage.cs b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/ReplicationUsage.cs
new file mode 100644
index 000000000000..bc5575c11404
--- /dev/null
+++ b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/ReplicationUsage.cs
@@ -0,0 +1,87 @@
+// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+
+namespace Microsoft.Azure.Management.RecoveryServices.Models
+{
+ using Microsoft.Azure;
+ using Microsoft.Azure.Management;
+ using Microsoft.Azure.Management.RecoveryServices;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Replication usages of a vault.
+ ///
+ public partial class ReplicationUsage
+ {
+ ///
+ /// Initializes a new instance of the ReplicationUsage class.
+ ///
+ public ReplicationUsage() { }
+
+ ///
+ /// Initializes a new instance of the ReplicationUsage class.
+ ///
+ /// Summary of the replication
+ /// monitoring data for this vault.
+ /// Summary of the replication jobs data for
+ /// this vault.
+ /// Number of replication protected
+ /// items for this vault.
+ /// Number of replication recovery
+ /// plans for this vault.
+ /// Number of servers registered
+ /// to this vault.
+ /// The authentication
+ /// type of recovery service providers in the vault.
+ public ReplicationUsage(MonitoringSummary monitoringSummary = default(MonitoringSummary), JobsSummary jobsSummary = default(JobsSummary), int? protectedItemCount = default(int?), int? recoveryPlanCount = default(int?), int? registeredServersCount = default(int?), int? recoveryServicesProviderAuthType = default(int?))
+ {
+ MonitoringSummary = monitoringSummary;
+ JobsSummary = jobsSummary;
+ ProtectedItemCount = protectedItemCount;
+ RecoveryPlanCount = recoveryPlanCount;
+ RegisteredServersCount = registeredServersCount;
+ RecoveryServicesProviderAuthType = recoveryServicesProviderAuthType;
+ }
+
+ ///
+ /// Gets or sets summary of the replication monitoring data for this
+ /// vault.
+ ///
+ [JsonProperty(PropertyName = "monitoringSummary")]
+ public MonitoringSummary MonitoringSummary { get; set; }
+
+ ///
+ /// Gets or sets summary of the replication jobs data for this vault.
+ ///
+ [JsonProperty(PropertyName = "jobsSummary")]
+ public JobsSummary JobsSummary { get; set; }
+
+ ///
+ /// Gets or sets number of replication protected items for this vault.
+ ///
+ [JsonProperty(PropertyName = "protectedItemCount")]
+ public int? ProtectedItemCount { get; set; }
+
+ ///
+ /// Gets or sets number of replication recovery plans for this vault.
+ ///
+ [JsonProperty(PropertyName = "recoveryPlanCount")]
+ public int? RecoveryPlanCount { get; set; }
+
+ ///
+ /// Gets or sets number of servers registered to this vault.
+ ///
+ [JsonProperty(PropertyName = "registeredServersCount")]
+ public int? RegisteredServersCount { get; set; }
+
+ ///
+ /// Gets or sets the authentication type of recovery service providers
+ /// in the vault.
+ ///
+ [JsonProperty(PropertyName = "recoveryServicesProviderAuthType")]
+ public int? RecoveryServicesProviderAuthType { get; set; }
+
+ }
+}
diff --git a/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/Resource.cs b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/Resource.cs
index f642675b7631..186dd6541f7b 100644
--- a/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/Resource.cs
+++ b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/Resource.cs
@@ -1,15 +1,21 @@
-// 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 0.17.0.0
+// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace Microsoft.Azure.Management.RecoveryServices.Models
{
+ using Microsoft.Azure;
+ using Microsoft.Azure.Management;
+ using Microsoft.Azure.Management.RecoveryServices;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Newtonsoft.Json;
using System.Linq;
- public partial class Resource : Microsoft.Rest.Azure.IResource
+ ///
+ /// ARM Resource.
+ ///
+ public partial class Resource : IResource
{
///
/// Initializes a new instance of the Resource class.
@@ -19,68 +25,45 @@ public Resource() { }
///
/// Initializes a new instance of the Resource class.
///
- /// Resource Id
- /// Resource Name
- /// Resource Type
- /// Resource Location
- /// Resource Tags
- public Resource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), Sku sku = default(Sku), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary))
+ /// Resource Id represents the complete path to the
+ /// resource.
+ /// Resource name associated with the
+ /// resource.
+ /// Resource type represents the complete path of
+ /// the form Namespace/ResourceType/ResourceType/...
+ /// Optional ETag.
+ public Resource(string id = default(string), string name = default(string), string type = default(string), string eTag = default(string))
{
Id = id;
Name = name;
Type = type;
- Location = location;
- Sku = sku;
- Tags = tags;
+ ETag = eTag;
}
///
- /// Gets resource Id
+ /// Gets resource Id represents the complete path to the resource.
///
- [Newtonsoft.Json.JsonProperty(PropertyName = "id")]
+ [JsonProperty(PropertyName = "id")]
public string Id { get; private set; }
///
- /// Gets resource Name
+ /// Gets resource name associated with the resource.
///
- [Newtonsoft.Json.JsonProperty(PropertyName = "name")]
+ [JsonProperty(PropertyName = "name")]
public string Name { get; private set; }
///
- /// Gets resource Type
+ /// Gets resource type represents the complete path of the form
+ /// Namespace/ResourceType/ResourceType/...
///
- [Newtonsoft.Json.JsonProperty(PropertyName = "type")]
+ [JsonProperty(PropertyName = "type")]
public string Type { get; private set; }
///
- /// Gets or sets resource Location
+ /// Gets or sets optional ETag.
///
- [Newtonsoft.Json.JsonProperty(PropertyName = "location")]
- public string Location { get; set; }
+ [JsonProperty(PropertyName = "eTag")]
+ public string ETag { get; set; }
- ///
- ///
- [Newtonsoft.Json.JsonProperty(PropertyName = "sku")]
- public Sku Sku { get; set; }
-
- ///
- /// Gets or sets resource Tags
- ///
- [Newtonsoft.Json.JsonProperty(PropertyName = "tags")]
- public System.Collections.Generic.IDictionary Tags { get; set; }
-
- ///
- /// Validate the object.
- ///
- ///
- /// Thrown if validation fails
- ///
- public virtual void Validate()
- {
- if (this.Sku != null)
- {
- this.Sku.Validate();
- }
- }
}
}
diff --git a/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/ResourceCertificateAndAADDetails.cs b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/ResourceCertificateAndAADDetails.cs
new file mode 100644
index 000000000000..36b09d37fe06
--- /dev/null
+++ b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/ResourceCertificateAndAADDetails.cs
@@ -0,0 +1,118 @@
+// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+
+namespace Microsoft.Azure.Management.RecoveryServices.Models
+{
+ using Microsoft.Azure;
+ using Microsoft.Azure.Management;
+ using Microsoft.Azure.Management.RecoveryServices;
+ using Microsoft.Rest;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Certificate details representing the Vault credentials for AAD.
+ ///
+ [Newtonsoft.Json.JsonObject("AzureActiveDirectory")]
+ public partial class ResourceCertificateAndAadDetails : ResourceCertificateDetails
+ {
+ ///
+ /// Initializes a new instance of the ResourceCertificateAndAadDetails
+ /// class.
+ ///
+ public ResourceCertificateAndAadDetails() { }
+
+ ///
+ /// Initializes a new instance of the ResourceCertificateAndAadDetails
+ /// class.
+ ///
+ /// AAD tenant authority.
+ /// AAD tenant Id.
+ /// AAD service principal
+ /// clientId.
+ /// AAD service principal
+ /// ObjectId.
+ /// Azure Management
+ /// Endpoint Audience.
+ /// The base64 encoded certificate raw data
+ /// string.
+ /// Certificate friendlyname.
+ /// Certificate issuer.
+ /// Resource ID of the vault.
+ /// Certificate Subject Name.
+ /// Certificate thumbprint.
+ /// Certificate Validity start Date
+ /// time.
+ /// Certificate Validity End Date time.
+ public ResourceCertificateAndAadDetails(string aadAuthority, string aadTenantId, string servicePrincipalClientId, string servicePrincipalObjectId, string azureManagementEndpointAudience, byte[] certificate = default(byte[]), string friendlyName = default(string), string issuer = default(string), long? resourceId = default(long?), string subject = default(string), string thumbprint = default(string), System.DateTime? validFrom = default(System.DateTime?), System.DateTime? validTo = default(System.DateTime?))
+ : base(certificate, friendlyName, issuer, resourceId, subject, thumbprint, validFrom, validTo)
+ {
+ AadAuthority = aadAuthority;
+ AadTenantId = aadTenantId;
+ ServicePrincipalClientId = servicePrincipalClientId;
+ ServicePrincipalObjectId = servicePrincipalObjectId;
+ AzureManagementEndpointAudience = azureManagementEndpointAudience;
+ }
+
+ ///
+ /// Gets or sets AAD tenant authority.
+ ///
+ [JsonProperty(PropertyName = "aadAuthority")]
+ public string AadAuthority { get; set; }
+
+ ///
+ /// Gets or sets AAD tenant Id.
+ ///
+ [JsonProperty(PropertyName = "aadTenantId")]
+ public string AadTenantId { get; set; }
+
+ ///
+ /// Gets or sets AAD service principal clientId.
+ ///
+ [JsonProperty(PropertyName = "servicePrincipalClientId")]
+ public string ServicePrincipalClientId { get; set; }
+
+ ///
+ /// Gets or sets AAD service principal ObjectId.
+ ///
+ [JsonProperty(PropertyName = "servicePrincipalObjectId")]
+ public string ServicePrincipalObjectId { get; set; }
+
+ ///
+ /// Gets or sets azure Management Endpoint Audience.
+ ///
+ [JsonProperty(PropertyName = "azureManagementEndpointAudience")]
+ public string AzureManagementEndpointAudience { get; set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (AadAuthority == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "AadAuthority");
+ }
+ if (AadTenantId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "AadTenantId");
+ }
+ if (ServicePrincipalClientId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "ServicePrincipalClientId");
+ }
+ if (ServicePrincipalObjectId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "ServicePrincipalObjectId");
+ }
+ if (AzureManagementEndpointAudience == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "AzureManagementEndpointAudience");
+ }
+ }
+ }
+}
diff --git a/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/ResourceCertificateAndACSDetails.cs b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/ResourceCertificateAndACSDetails.cs
new file mode 100644
index 000000000000..ebf771ff54a3
--- /dev/null
+++ b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/ResourceCertificateAndACSDetails.cs
@@ -0,0 +1,94 @@
+// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+
+namespace Microsoft.Azure.Management.RecoveryServices.Models
+{
+ using Microsoft.Azure;
+ using Microsoft.Azure.Management;
+ using Microsoft.Azure.Management.RecoveryServices;
+ using Microsoft.Rest;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Certificate details representing the Vault credentials for ACS.
+ ///
+ [Newtonsoft.Json.JsonObject("AccessControlService")]
+ public partial class ResourceCertificateAndAcsDetails : ResourceCertificateDetails
+ {
+ ///
+ /// Initializes a new instance of the ResourceCertificateAndAcsDetails
+ /// class.
+ ///
+ public ResourceCertificateAndAcsDetails() { }
+
+ ///
+ /// Initializes a new instance of the ResourceCertificateAndAcsDetails
+ /// class.
+ ///
+ /// ACS namespace name - tenant for
+ /// our service.
+ /// Acs mgmt host name to connect
+ /// to.
+ /// Global ACS namespace RP
+ /// realm.
+ /// The base64 encoded certificate raw data
+ /// string.
+ /// Certificate friendlyname.
+ /// Certificate issuer.
+ /// Resource ID of the vault.
+ /// Certificate Subject Name.
+ /// Certificate thumbprint.
+ /// Certificate Validity start Date
+ /// time.
+ /// Certificate Validity End Date time.
+ public ResourceCertificateAndAcsDetails(string globalAcsNamespace, string globalAcsHostName, string globalAcsRPRealm, byte[] certificate = default(byte[]), string friendlyName = default(string), string issuer = default(string), long? resourceId = default(long?), string subject = default(string), string thumbprint = default(string), System.DateTime? validFrom = default(System.DateTime?), System.DateTime? validTo = default(System.DateTime?))
+ : base(certificate, friendlyName, issuer, resourceId, subject, thumbprint, validFrom, validTo)
+ {
+ GlobalAcsNamespace = globalAcsNamespace;
+ GlobalAcsHostName = globalAcsHostName;
+ GlobalAcsRPRealm = globalAcsRPRealm;
+ }
+
+ ///
+ /// Gets or sets ACS namespace name - tenant for our service.
+ ///
+ [JsonProperty(PropertyName = "globalAcsNamespace")]
+ public string GlobalAcsNamespace { get; set; }
+
+ ///
+ /// Gets or sets acs mgmt host name to connect to.
+ ///
+ [JsonProperty(PropertyName = "globalAcsHostName")]
+ public string GlobalAcsHostName { get; set; }
+
+ ///
+ /// Gets or sets global ACS namespace RP realm.
+ ///
+ [JsonProperty(PropertyName = "globalAcsRPRealm")]
+ public string GlobalAcsRPRealm { get; set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (GlobalAcsNamespace == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "GlobalAcsNamespace");
+ }
+ if (GlobalAcsHostName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "GlobalAcsHostName");
+ }
+ if (GlobalAcsRPRealm == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "GlobalAcsRPRealm");
+ }
+ }
+ }
+}
diff --git a/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/ResourceCertificateDetails.cs b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/ResourceCertificateDetails.cs
new file mode 100644
index 000000000000..6bbf83d61f3b
--- /dev/null
+++ b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/ResourceCertificateDetails.cs
@@ -0,0 +1,97 @@
+// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+
+namespace Microsoft.Azure.Management.RecoveryServices.Models
+{
+ using Microsoft.Azure;
+ using Microsoft.Azure.Management;
+ using Microsoft.Azure.Management.RecoveryServices;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Certificate details representing the Vault credentials.
+ ///
+ public partial class ResourceCertificateDetails
+ {
+ ///
+ /// Initializes a new instance of the ResourceCertificateDetails class.
+ ///
+ public ResourceCertificateDetails() { }
+
+ ///
+ /// Initializes a new instance of the ResourceCertificateDetails class.
+ ///
+ /// The base64 encoded certificate raw data
+ /// string.
+ /// Certificate friendlyname.
+ /// Certificate issuer.
+ /// Resource ID of the vault.
+ /// Certificate Subject Name.
+ /// Certificate thumbprint.
+ /// Certificate Validity start Date
+ /// time.
+ /// Certificate Validity End Date time.
+ public ResourceCertificateDetails(byte[] certificate = default(byte[]), string friendlyName = default(string), string issuer = default(string), long? resourceId = default(long?), string subject = default(string), string thumbprint = default(string), System.DateTime? validFrom = default(System.DateTime?), System.DateTime? validTo = default(System.DateTime?))
+ {
+ Certificate = certificate;
+ FriendlyName = friendlyName;
+ Issuer = issuer;
+ ResourceId = resourceId;
+ Subject = subject;
+ Thumbprint = thumbprint;
+ ValidFrom = validFrom;
+ ValidTo = validTo;
+ }
+
+ ///
+ /// Gets or sets the base64 encoded certificate raw data string.
+ ///
+ [JsonProperty(PropertyName = "certificate")]
+ public byte[] Certificate { get; set; }
+
+ ///
+ /// Gets or sets certificate friendlyname.
+ ///
+ [JsonProperty(PropertyName = "friendlyName")]
+ public string FriendlyName { get; set; }
+
+ ///
+ /// Gets or sets certificate issuer.
+ ///
+ [JsonProperty(PropertyName = "issuer")]
+ public string Issuer { get; set; }
+
+ ///
+ /// Gets or sets resource ID of the vault.
+ ///
+ [JsonProperty(PropertyName = "resourceId")]
+ public long? ResourceId { get; set; }
+
+ ///
+ /// Gets or sets certificate Subject Name.
+ ///
+ [JsonProperty(PropertyName = "subject")]
+ public string Subject { get; set; }
+
+ ///
+ /// Gets or sets certificate thumbprint.
+ ///
+ [JsonProperty(PropertyName = "thumbprint")]
+ public string Thumbprint { get; set; }
+
+ ///
+ /// Gets or sets certificate Validity start Date time.
+ ///
+ [JsonProperty(PropertyName = "validFrom")]
+ public System.DateTime? ValidFrom { get; set; }
+
+ ///
+ /// Gets or sets certificate Validity End Date time.
+ ///
+ [JsonProperty(PropertyName = "validTo")]
+ public System.DateTime? ValidTo { get; set; }
+
+ }
+}
diff --git a/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/Sku.cs b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/Sku.cs
index 0a5b20ae2b5c..12ff6dd20eb5 100644
--- a/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/Sku.cs
+++ b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/Sku.cs
@@ -1,12 +1,14 @@
-// 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 0.17.0.0
+// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace Microsoft.Azure.Management.RecoveryServices.Models
{
+ using Microsoft.Azure;
+ using Microsoft.Azure.Management;
+ using Microsoft.Azure.Management.RecoveryServices;
+ using Microsoft.Rest;
+ using Newtonsoft.Json;
using System.Linq;
///
@@ -33,20 +35,20 @@ public Sku(string name)
/// Gets or sets the Sku name. Possible values include: 'Standard',
/// 'RS0'
///
- [Newtonsoft.Json.JsonProperty(PropertyName = "name")]
+ [JsonProperty(PropertyName = "name")]
public string Name { get; set; }
///
/// Validate the object.
///
- ///
+ ///
/// Thrown if validation fails
///
public virtual void Validate()
{
if (Name == null)
{
- throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Name");
+ throw new ValidationException(ValidationRules.CannotBeNull, "Name");
}
}
}
diff --git a/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/SkuName.cs b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/SkuName.cs
index c1cef2877a22..929f5cac4947 100644
--- a/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/SkuName.cs
+++ b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/SkuName.cs
@@ -1,12 +1,12 @@
-// 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 0.17.0.0
+// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace Microsoft.Azure.Management.RecoveryServices.Models
{
+ using Microsoft.Azure;
+ using Microsoft.Azure.Management;
+ using Microsoft.Azure.Management.RecoveryServices;
///
/// Defines values for SkuName.
diff --git a/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/StorageModelType.cs b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/StorageModelType.cs
new file mode 100644
index 000000000000..01b7af11c343
--- /dev/null
+++ b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/StorageModelType.cs
@@ -0,0 +1,20 @@
+// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+
+namespace Microsoft.Azure.Management.RecoveryServices.Models
+{
+ using Microsoft.Azure;
+ using Microsoft.Azure.Management;
+ using Microsoft.Azure.Management.RecoveryServices;
+
+ ///
+ /// Defines values for StorageModelType.
+ ///
+ public static class StorageModelType
+ {
+ public const string Invalid = "Invalid";
+ public const string GeoRedundant = "GeoRedundant";
+ public const string LocallyRedundant = "LocallyRedundant";
+ }
+}
diff --git a/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/StorageType.cs b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/StorageType.cs
new file mode 100644
index 000000000000..068b7393b302
--- /dev/null
+++ b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/StorageType.cs
@@ -0,0 +1,20 @@
+// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+
+namespace Microsoft.Azure.Management.RecoveryServices.Models
+{
+ using Microsoft.Azure;
+ using Microsoft.Azure.Management;
+ using Microsoft.Azure.Management.RecoveryServices;
+
+ ///
+ /// Defines values for StorageType.
+ ///
+ public static class StorageType
+ {
+ public const string Invalid = "Invalid";
+ public const string GeoRedundant = "GeoRedundant";
+ public const string LocallyRedundant = "LocallyRedundant";
+ }
+}
diff --git a/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/StorageTypeState.cs b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/StorageTypeState.cs
new file mode 100644
index 000000000000..defd73fd2ebc
--- /dev/null
+++ b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/StorageTypeState.cs
@@ -0,0 +1,20 @@
+// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+
+namespace Microsoft.Azure.Management.RecoveryServices.Models
+{
+ using Microsoft.Azure;
+ using Microsoft.Azure.Management;
+ using Microsoft.Azure.Management.RecoveryServices;
+
+ ///
+ /// Defines values for StorageTypeState.
+ ///
+ public static class StorageTypeState
+ {
+ public const string Invalid = "Invalid";
+ public const string Locked = "Locked";
+ public const string Unlocked = "Unlocked";
+ }
+}
diff --git a/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/TrackedResource.cs b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/TrackedResource.cs
new file mode 100644
index 000000000000..08e97c6a1b4a
--- /dev/null
+++ b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/TrackedResource.cs
@@ -0,0 +1,71 @@
+// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+
+namespace Microsoft.Azure.Management.RecoveryServices.Models
+{
+ using Microsoft.Azure;
+ using Microsoft.Azure.Management;
+ using Microsoft.Azure.Management.RecoveryServices;
+ using Microsoft.Rest;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Tracked resource with location.
+ ///
+ public partial class TrackedResource : Resource
+ {
+ ///
+ /// Initializes a new instance of the TrackedResource class.
+ ///
+ public TrackedResource() { }
+
+ ///
+ /// Initializes a new instance of the TrackedResource class.
+ ///
+ /// Resource location.
+ /// Resource Id represents the complete path to the
+ /// resource.
+ /// Resource name associated with the
+ /// resource.
+ /// Resource type represents the complete path of
+ /// the form Namespace/ResourceType/ResourceType/...
+ /// Optional ETag.
+ /// Resource tags.
+ public TrackedResource(string location, string id = default(string), string name = default(string), string type = default(string), string eTag = default(string), IDictionary tags = default(IDictionary))
+ : base(id, name, type, eTag)
+ {
+ Location = location;
+ Tags = tags;
+ }
+
+ ///
+ /// Gets or sets resource location.
+ ///
+ [JsonProperty(PropertyName = "location")]
+ public string Location { get; set; }
+
+ ///
+ /// Gets or sets resource tags.
+ ///
+ [JsonProperty(PropertyName = "tags")]
+ public IDictionary Tags { get; set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (Location == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "Location");
+ }
+ }
+ }
+}
diff --git a/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/TriggerType.cs b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/TriggerType.cs
new file mode 100644
index 000000000000..92cbcc1209c8
--- /dev/null
+++ b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/TriggerType.cs
@@ -0,0 +1,19 @@
+// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+
+namespace Microsoft.Azure.Management.RecoveryServices.Models
+{
+ using Microsoft.Azure;
+ using Microsoft.Azure.Management;
+ using Microsoft.Azure.Management.RecoveryServices;
+
+ ///
+ /// Defines values for TriggerType.
+ ///
+ public static class TriggerType
+ {
+ public const string UserTriggered = "UserTriggered";
+ public const string ForcedUpgrade = "ForcedUpgrade";
+ }
+}
diff --git a/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/UpgradeDetails.cs b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/UpgradeDetails.cs
new file mode 100644
index 000000000000..6911ae62b268
--- /dev/null
+++ b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/UpgradeDetails.cs
@@ -0,0 +1,118 @@
+// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+
+namespace Microsoft.Azure.Management.RecoveryServices.Models
+{
+ using Microsoft.Azure;
+ using Microsoft.Azure.Management;
+ using Microsoft.Azure.Management.RecoveryServices;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Details for upgrading vault.
+ ///
+ public partial class UpgradeDetails
+ {
+ ///
+ /// Initializes a new instance of the UpgradeDetails class.
+ ///
+ public UpgradeDetails() { }
+
+ ///
+ /// Initializes a new instance of the UpgradeDetails class.
+ ///
+ /// ID of the vault upgrade
+ /// operation.
+ /// UTC time at which the upgrade operation
+ /// has started.
+ /// UTC time at which the upgrade
+ /// operation status was last updated.
+ /// UTC time at which the upgrade operation
+ /// has ended.
+ /// Status of the vault upgrade operation.
+ /// Possible values include: 'Unknown', 'InProgress', 'Upgraded',
+ /// 'Failed'
+ /// Message to the user containing information
+ /// about the upgrade operation.
+ /// The way the vault upgradation was
+ /// triggered. Possible values include: 'UserTriggered',
+ /// 'ForcedUpgrade'
+ /// Resource ID of the upgraded
+ /// vault.
+ /// Resource ID of the vault before
+ /// the upgrade.
+ public UpgradeDetails(string operationId = default(string), System.DateTime? startTimeUtc = default(System.DateTime?), System.DateTime? lastUpdatedTimeUtc = default(System.DateTime?), System.DateTime? endTimeUtc = default(System.DateTime?), string status = default(string), string message = default(string), string triggerType = default(string), string upgradedResourceId = default(string), string previousResourceId = default(string))
+ {
+ OperationId = operationId;
+ StartTimeUtc = startTimeUtc;
+ LastUpdatedTimeUtc = lastUpdatedTimeUtc;
+ EndTimeUtc = endTimeUtc;
+ Status = status;
+ Message = message;
+ TriggerType = triggerType;
+ UpgradedResourceId = upgradedResourceId;
+ PreviousResourceId = previousResourceId;
+ }
+
+ ///
+ /// Gets ID of the vault upgrade operation.
+ ///
+ [JsonProperty(PropertyName = "operationId")]
+ public string OperationId { get; private set; }
+
+ ///
+ /// Gets UTC time at which the upgrade operation has started.
+ ///
+ [JsonProperty(PropertyName = "startTimeUtc")]
+ public System.DateTime? StartTimeUtc { get; private set; }
+
+ ///
+ /// Gets UTC time at which the upgrade operation status was last
+ /// updated.
+ ///
+ [JsonProperty(PropertyName = "lastUpdatedTimeUtc")]
+ public System.DateTime? LastUpdatedTimeUtc { get; private set; }
+
+ ///
+ /// Gets UTC time at which the upgrade operation has ended.
+ ///
+ [JsonProperty(PropertyName = "endTimeUtc")]
+ public System.DateTime? EndTimeUtc { get; private set; }
+
+ ///
+ /// Gets status of the vault upgrade operation. Possible values
+ /// include: 'Unknown', 'InProgress', 'Upgraded', 'Failed'
+ ///
+ [JsonProperty(PropertyName = "status")]
+ public string Status { get; private set; }
+
+ ///
+ /// Gets message to the user containing information about the upgrade
+ /// operation.
+ ///
+ [JsonProperty(PropertyName = "message")]
+ public string Message { get; private set; }
+
+ ///
+ /// Gets the way the vault upgradation was triggered. Possible values
+ /// include: 'UserTriggered', 'ForcedUpgrade'
+ ///
+ [JsonProperty(PropertyName = "triggerType")]
+ public string TriggerType { get; private set; }
+
+ ///
+ /// Gets resource ID of the upgraded vault.
+ ///
+ [JsonProperty(PropertyName = "upgradedResourceId")]
+ public string UpgradedResourceId { get; private set; }
+
+ ///
+ /// Gets resource ID of the vault before the upgrade.
+ ///
+ [JsonProperty(PropertyName = "previousResourceId")]
+ public string PreviousResourceId { get; private set; }
+
+ }
+}
diff --git a/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/UsagesUnit.cs b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/UsagesUnit.cs
new file mode 100644
index 000000000000..b80a396c165a
--- /dev/null
+++ b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/UsagesUnit.cs
@@ -0,0 +1,23 @@
+// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+
+namespace Microsoft.Azure.Management.RecoveryServices.Models
+{
+ using Microsoft.Azure;
+ using Microsoft.Azure.Management;
+ using Microsoft.Azure.Management.RecoveryServices;
+
+ ///
+ /// Defines values for UsagesUnit.
+ ///
+ public static class UsagesUnit
+ {
+ public const string Count = "Count";
+ public const string Bytes = "Bytes";
+ public const string Seconds = "Seconds";
+ public const string Percent = "Percent";
+ public const string CountPerSecond = "CountPerSecond";
+ public const string BytesPerSecond = "BytesPerSecond";
+ }
+}
diff --git a/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/Vault.cs b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/Vault.cs
index 05be128bc91a..c26953b3cad3 100644
--- a/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/Vault.cs
+++ b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/Vault.cs
@@ -1,18 +1,21 @@
-// 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 0.17.0.0
+// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace Microsoft.Azure.Management.RecoveryServices.Models
{
+ using Microsoft.Azure;
+ using Microsoft.Azure.Management;
+ using Microsoft.Azure.Management.RecoveryServices;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
using System.Linq;
///
/// Resource information, as returned by the resource provider.
///
- public partial class Vault : Resource
+ public partial class Vault : TrackedResource
{
///
/// Initializes a new instance of the Vault class.
@@ -22,39 +25,45 @@ public Vault() { }
///
/// Initializes a new instance of the Vault class.
///
- /// Resource Id
- /// Resource Name
- /// Resource Type
- /// Resource Location
- /// Resource Tags
- /// ETag of the Vault.
- public Vault(string id = default(string), string name = default(string), string type = default(string), string location = default(string), Sku sku = default(Sku), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), string etag = default(string), VaultProperties properties = default(VaultProperties))
- : base(id, name, type, location, sku, tags)
+ /// Resource location.
+ /// Resource Id represents the complete path to the
+ /// resource.
+ /// Resource name associated with the
+ /// resource.
+ /// Resource type represents the complete path of
+ /// the form Namespace/ResourceType/ResourceType/...
+ /// Optional ETag.
+ /// Resource tags.
+ public Vault(string location, string id = default(string), string name = default(string), string type = default(string), string eTag = default(string), IDictionary tags = default(IDictionary), VaultProperties properties = default(VaultProperties), Sku sku = default(Sku))
+ : base(location, id, name, type, eTag, tags)
{
- Etag = etag;
Properties = properties;
+ Sku = sku;
}
///
- /// Gets eTag of the Vault.
///
- [Newtonsoft.Json.JsonProperty(PropertyName = "etag")]
- public string Etag { get; private set; }
+ [JsonProperty(PropertyName = "properties")]
+ public VaultProperties Properties { get; set; }
///
///
- [Newtonsoft.Json.JsonProperty(PropertyName = "properties")]
- public VaultProperties Properties { get; set; }
+ [JsonProperty(PropertyName = "sku")]
+ public Sku Sku { get; set; }
///
/// Validate the object.
///
- ///
+ ///
/// Thrown if validation fails
///
public override void Validate()
{
base.Validate();
+ if (Sku != null)
+ {
+ Sku.Validate();
+ }
}
}
}
diff --git a/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/VaultCertificateResponse.cs b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/VaultCertificateResponse.cs
new file mode 100644
index 000000000000..56994a122f74
--- /dev/null
+++ b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/VaultCertificateResponse.cs
@@ -0,0 +1,56 @@
+// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+
+namespace Microsoft.Azure.Management.RecoveryServices.Models
+{
+ using Microsoft.Azure;
+ using Microsoft.Azure.Management;
+ using Microsoft.Azure.Management.RecoveryServices;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Certificate corresponding to a vault that can be used by clients to
+ /// register themselves with the vault.
+ ///
+ public partial class VaultCertificateResponse
+ {
+ ///
+ /// Initializes a new instance of the VaultCertificateResponse class.
+ ///
+ public VaultCertificateResponse() { }
+
+ ///
+ /// Initializes a new instance of the VaultCertificateResponse class.
+ ///
+ public VaultCertificateResponse(string name = default(string), string type = default(string), string id = default(string), ResourceCertificateDetails properties = default(ResourceCertificateDetails))
+ {
+ Name = name;
+ Type = type;
+ Id = id;
+ Properties = properties;
+ }
+
+ ///
+ ///
+ [JsonProperty(PropertyName = "name")]
+ public string Name { get; set; }
+
+ ///
+ ///
+ [JsonProperty(PropertyName = "type")]
+ public string Type { get; set; }
+
+ ///
+ ///
+ [JsonProperty(PropertyName = "id")]
+ public string Id { get; set; }
+
+ ///
+ ///
+ [JsonProperty(PropertyName = "properties")]
+ public ResourceCertificateDetails Properties { get; set; }
+
+ }
+}
diff --git a/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/VaultExtendedInfoResource.cs b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/VaultExtendedInfoResource.cs
new file mode 100644
index 000000000000..03c651de7369
--- /dev/null
+++ b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/VaultExtendedInfoResource.cs
@@ -0,0 +1,75 @@
+// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+
+namespace Microsoft.Azure.Management.RecoveryServices.Models
+{
+ using Microsoft.Azure;
+ using Microsoft.Azure.Management;
+ using Microsoft.Azure.Management.RecoveryServices;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Vault extended information.
+ ///
+ [Rest.Serialization.JsonTransformation]
+ public partial class VaultExtendedInfoResource : Resource
+ {
+ ///
+ /// Initializes a new instance of the VaultExtendedInfoResource class.
+ ///
+ public VaultExtendedInfoResource() { }
+
+ ///
+ /// Initializes a new instance of the VaultExtendedInfoResource class.
+ ///
+ /// Resource Id represents the complete path to the
+ /// resource.
+ /// Resource name associated with the
+ /// resource.
+ /// Resource type represents the complete path of
+ /// the form Namespace/ResourceType/ResourceType/...
+ /// Optional ETag.
+ /// Integrity key.
+ /// Encryption key.
+ /// Encryption key
+ /// thumbprint.
+ /// Algorithm.
+ public VaultExtendedInfoResource(string id = default(string), string name = default(string), string type = default(string), string eTag = default(string), string integrityKey = default(string), string encryptionKey = default(string), string encryptionKeyThumbprint = default(string), string algorithm = default(string))
+ : base(id, name, type, eTag)
+ {
+ IntegrityKey = integrityKey;
+ EncryptionKey = encryptionKey;
+ EncryptionKeyThumbprint = encryptionKeyThumbprint;
+ Algorithm = algorithm;
+ }
+
+ ///
+ /// Gets or sets integrity key.
+ ///
+ [JsonProperty(PropertyName = "properties.integrityKey")]
+ public string IntegrityKey { get; set; }
+
+ ///
+ /// Gets or sets encryption key.
+ ///
+ [JsonProperty(PropertyName = "properties.encryptionKey")]
+ public string EncryptionKey { get; set; }
+
+ ///
+ /// Gets or sets encryption key thumbprint.
+ ///
+ [JsonProperty(PropertyName = "properties.encryptionKeyThumbprint")]
+ public string EncryptionKeyThumbprint { get; set; }
+
+ ///
+ /// Gets or sets algorithm.
+ ///
+ [JsonProperty(PropertyName = "properties.algorithm")]
+ public string Algorithm { get; set; }
+
+ }
+}
diff --git a/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/VaultProperties.cs b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/VaultProperties.cs
index cb5bea1dc32e..72bece3084e0 100644
--- a/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/VaultProperties.cs
+++ b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/VaultProperties.cs
@@ -1,12 +1,13 @@
-// 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 0.17.0.0
+// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace Microsoft.Azure.Management.RecoveryServices.Models
{
+ using Microsoft.Azure;
+ using Microsoft.Azure.Management;
+ using Microsoft.Azure.Management.RecoveryServices;
+ using Newtonsoft.Json;
using System.Linq;
///
@@ -23,16 +24,22 @@ public VaultProperties() { }
/// Initializes a new instance of the VaultProperties class.
///
/// Provisioning State.
- public VaultProperties(string provisioningState = default(string))
+ public VaultProperties(string provisioningState = default(string), UpgradeDetails upgradeDetails = default(UpgradeDetails))
{
ProvisioningState = provisioningState;
+ UpgradeDetails = upgradeDetails;
}
///
/// Gets provisioning State.
///
- [Newtonsoft.Json.JsonProperty(PropertyName = "provisioningState")]
+ [JsonProperty(PropertyName = "provisioningState")]
public string ProvisioningState { get; private set; }
+ ///
+ ///
+ [JsonProperty(PropertyName = "upgradeDetails")]
+ public UpgradeDetails UpgradeDetails { get; set; }
+
}
}
diff --git a/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/VaultUpgradeState.cs b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/VaultUpgradeState.cs
new file mode 100644
index 000000000000..e8f8f03a7ea1
--- /dev/null
+++ b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/VaultUpgradeState.cs
@@ -0,0 +1,21 @@
+// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+
+namespace Microsoft.Azure.Management.RecoveryServices.Models
+{
+ using Microsoft.Azure;
+ using Microsoft.Azure.Management;
+ using Microsoft.Azure.Management.RecoveryServices;
+
+ ///
+ /// Defines values for VaultUpgradeState.
+ ///
+ public static class VaultUpgradeState
+ {
+ public const string Unknown = "Unknown";
+ public const string InProgress = "InProgress";
+ public const string Upgraded = "Upgraded";
+ public const string Failed = "Failed";
+ }
+}
diff --git a/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/VaultUsage.cs b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/VaultUsage.cs
new file mode 100644
index 000000000000..e30e13ce96d7
--- /dev/null
+++ b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Models/VaultUsage.cs
@@ -0,0 +1,82 @@
+// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+
+namespace Microsoft.Azure.Management.RecoveryServices.Models
+{
+ using Microsoft.Azure;
+ using Microsoft.Azure.Management;
+ using Microsoft.Azure.Management.RecoveryServices;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Usages of a vault.
+ ///
+ public partial class VaultUsage
+ {
+ ///
+ /// Initializes a new instance of the VaultUsage class.
+ ///
+ public VaultUsage() { }
+
+ ///
+ /// Initializes a new instance of the VaultUsage class.
+ ///
+ /// Unit of the usage. Possible values include:
+ /// 'Count', 'Bytes', 'Seconds', 'Percent', 'CountPerSecond',
+ /// 'BytesPerSecond'
+ /// Quota period of usage.
+ /// Next reset time of usage.
+ /// Current value of usage.
+ /// Limit of usage.
+ /// Name of usage.
+ public VaultUsage(string unit = default(string), string quotaPeriod = default(string), System.DateTime? nextResetTime = default(System.DateTime?), long? currentValue = default(long?), long? limit = default(long?), NameInfo name = default(NameInfo))
+ {
+ Unit = unit;
+ QuotaPeriod = quotaPeriod;
+ NextResetTime = nextResetTime;
+ CurrentValue = currentValue;
+ Limit = limit;
+ Name = name;
+ }
+
+ ///
+ /// Gets or sets unit of the usage. Possible values include: 'Count',
+ /// 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond'
+ ///
+ [JsonProperty(PropertyName = "unit")]
+ public string Unit { get; set; }
+
+ ///
+ /// Gets or sets quota period of usage.
+ ///
+ [JsonProperty(PropertyName = "quotaPeriod")]
+ public string QuotaPeriod { get; set; }
+
+ ///
+ /// Gets or sets next reset time of usage.
+ ///
+ [JsonProperty(PropertyName = "nextResetTime")]
+ public System.DateTime? NextResetTime { get; set; }
+
+ ///
+ /// Gets or sets current value of usage.
+ ///
+ [JsonProperty(PropertyName = "currentValue")]
+ public long? CurrentValue { get; set; }
+
+ ///
+ /// Gets or sets limit of usage.
+ ///
+ [JsonProperty(PropertyName = "limit")]
+ public long? Limit { get; set; }
+
+ ///
+ /// Gets or sets name of usage.
+ ///
+ [JsonProperty(PropertyName = "name")]
+ public NameInfo Name { get; set; }
+
+ }
+}
diff --git a/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Operations.cs b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Operations.cs
new file mode 100644
index 000000000000..c5315bcf551f
--- /dev/null
+++ b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/Operations.cs
@@ -0,0 +1,415 @@
+// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+
+namespace Microsoft.Azure.Management.RecoveryServices
+{
+ using Microsoft.Azure;
+ using Microsoft.Azure.Management;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+ using System.Net;
+ using System.Net.Http;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// Operations operations.
+ ///
+ internal partial class Operations : IServiceOperations, IOperations
+ {
+ ///
+ /// Initializes a new instance of the Operations class.
+ ///
+ ///
+ /// Reference to the service client.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ internal Operations(RecoveryServicesClient client)
+ {
+ if (client == null)
+ {
+ throw new System.ArgumentNullException("client");
+ }
+ Client = client;
+ }
+
+ ///
+ /// Gets a reference to the RecoveryServicesClient
+ ///
+ public RecoveryServicesClient Client { get; private set; }
+
+ ///
+ /// Returns the list of available operations.
+ ///
+ ///
+ /// The name of the resource group where the recovery services vault is
+ /// present.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task>> ListWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ string apiVersion = "2016-12-01";
+ string apiVersion1 = "2016-06-01";
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("apiVersion1", apiVersion1);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/operations").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ List _queryParameters = new List();
+ if (apiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
+ }
+ if (apiVersion1 != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion1)));
+ }
+ 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 the list of available operations.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (nextPageLink == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("nextPageLink", nextPageLink);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters);
+ }
+ // Construct URL
+ string _url = "{nextLink}";
+ _url = _url.Replace("{nextLink}", nextPageLink);
+ List _queryParameters = new List();
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ 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/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/OperationsExtensions.cs b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/OperationsExtensions.cs
new file mode 100644
index 000000000000..2b8a6c75648f
--- /dev/null
+++ b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/OperationsExtensions.cs
@@ -0,0 +1,91 @@
+// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+
+namespace Microsoft.Azure.Management.RecoveryServices
+{
+ using Microsoft.Azure;
+ using Microsoft.Azure.Management;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// Extension methods for Operations.
+ ///
+ public static partial class OperationsExtensions
+ {
+ ///
+ /// Returns the list of available operations.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group where the recovery services vault is
+ /// present.
+ ///
+ public static IPage List(this IOperations operations, string resourceGroupName)
+ {
+ return operations.ListAsync(resourceGroupName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Returns the list of available operations.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group where the recovery services vault is
+ /// present.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListAsync(this IOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Returns the list of available operations.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ public static IPage ListNext(this IOperations operations, string nextPageLink)
+ {
+ return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Returns the list of available operations.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListNextAsync(this IOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ }
+}
diff --git a/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/RecoveryServicesClient.cs b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/RecoveryServicesClient.cs
index 4efcfdd2af03..bac42da6aea4 100644
--- a/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/RecoveryServicesClient.cs
+++ b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/RecoveryServicesClient.cs
@@ -1,18 +1,26 @@
-// 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 0.17.0.0
+// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace Microsoft.Azure.Management.RecoveryServices
{
- using System.Linq;
+ using Microsoft.Azure;
+ using Microsoft.Azure.Management;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
+ using Microsoft.Rest.Serialization;
using Models;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+ using System.Net;
+ using System.Net.Http;
- public partial class RecoveryServicesClient : Microsoft.Rest.ServiceClient, IRecoveryServicesClient, IAzureClient
+ ///
+ /// Composite Swagger for Recovery Services Client
+ ///
+ public partial class RecoveryServicesClient : ServiceClient, IRecoveryServicesClient, IAzureClient
{
///
/// The base URI of the service.
@@ -22,28 +30,23 @@ public partial class RecoveryServicesClient : Microsoft.Rest.ServiceClient
/// Gets or sets json serialization settings.
///
- public Newtonsoft.Json.JsonSerializerSettings SerializationSettings { get; private set; }
+ public JsonSerializerSettings SerializationSettings { get; private set; }
///
/// Gets or sets json deserialization settings.
///
- public Newtonsoft.Json.JsonSerializerSettings DeserializationSettings { get; private set; }
+ public JsonSerializerSettings DeserializationSettings { get; private set; }
///
/// Credentials needed for the client to connect to Azure.
///
- public Microsoft.Rest.ServiceClientCredentials Credentials { get; private set; }
+ public ServiceClientCredentials Credentials { get; private set; }
///
/// The subscription Id.
///
public string SubscriptionId { get; set; }
- ///
- /// Client Api Version.
- ///
- public string ApiVersion { get; private set; }
-
///
/// Gets or sets the preferred language for the response.
///
@@ -61,20 +64,60 @@ public partial class RecoveryServicesClient : Microsoft.Rest.ServiceClient
public bool? GenerateClientRequestId { get; set; }
+ ///
+ /// Gets the IOperations.
+ ///
+ public virtual IOperations Operations { get; private set; }
+
+ ///
+ /// Gets the IBackupVaultConfigsOperations.
+ ///
+ public virtual IBackupVaultConfigsOperations BackupVaultConfigs { get; private set; }
+
+ ///
+ /// Gets the IBackupStorageConfigsOperations.
+ ///
+ public virtual IBackupStorageConfigsOperations BackupStorageConfigs { get; private set; }
+
+ ///
+ /// Gets the IVaultCertificatesOperations.
+ ///
+ public virtual IVaultCertificatesOperations VaultCertificates { get; private set; }
+
+ ///
+ /// Gets the IRegisteredIdentitiesOperations.
+ ///
+ public virtual IRegisteredIdentitiesOperations RegisteredIdentities { get; private set; }
+
+ ///
+ /// Gets the IReplicationUsagesOperations.
+ ///
+ public virtual IReplicationUsagesOperations ReplicationUsages { get; private set; }
+
///
/// Gets the IVaultsOperations.
///
public virtual IVaultsOperations Vaults { get; private set; }
+ ///
+ /// Gets the IVaultExtendedInfoOperations.
+ ///
+ public virtual IVaultExtendedInfoOperations VaultExtendedInfo { get; private set; }
+
+ ///
+ /// Gets the IUsagesOperations.
+ ///
+ public virtual IUsagesOperations Usages { get; private set; }
+
///
/// Initializes a new instance of the RecoveryServicesClient class.
///
///
/// Optional. The delegating handlers to add to the http client pipeline.
///
- protected RecoveryServicesClient(params System.Net.Http.DelegatingHandler[] handlers) : base(handlers)
+ protected RecoveryServicesClient(params DelegatingHandler[] handlers) : base(handlers)
{
- this.Initialize();
+ Initialize();
}
///
@@ -86,9 +129,9 @@ protected RecoveryServicesClient(params System.Net.Http.DelegatingHandler[] hand
///
/// Optional. The delegating handlers to add to the http client pipeline.
///
- protected RecoveryServicesClient(System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : base(rootHandler, handlers)
+ protected RecoveryServicesClient(HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : base(rootHandler, handlers)
{
- this.Initialize();
+ Initialize();
}
///
@@ -103,13 +146,13 @@ protected RecoveryServicesClient(System.Net.Http.HttpClientHandler rootHandler,
///
/// Thrown when a required parameter is null
///
- protected RecoveryServicesClient(System.Uri baseUri, params System.Net.Http.DelegatingHandler[] handlers) : this(handlers)
+ protected RecoveryServicesClient(System.Uri baseUri, params DelegatingHandler[] handlers) : this(handlers)
{
if (baseUri == null)
{
throw new System.ArgumentNullException("baseUri");
}
- this.BaseUri = baseUri;
+ BaseUri = baseUri;
}
///
@@ -127,13 +170,13 @@ protected RecoveryServicesClient(System.Uri baseUri, params System.Net.Http.Dele
///
/// Thrown when a required parameter is null
///
- protected RecoveryServicesClient(System.Uri baseUri, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : this(rootHandler, handlers)
+ protected RecoveryServicesClient(System.Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers)
{
if (baseUri == null)
{
throw new System.ArgumentNullException("baseUri");
}
- this.BaseUri = baseUri;
+ BaseUri = baseUri;
}
///
@@ -148,16 +191,16 @@ protected RecoveryServicesClient(System.Uri baseUri, System.Net.Http.HttpClientH
///
/// Thrown when a required parameter is null
///
- internal RecoveryServicesClient(Microsoft.Rest.ServiceClientCredentials credentials, params System.Net.Http.DelegatingHandler[] handlers) : this(handlers)
+ public RecoveryServicesClient(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers)
{
if (credentials == null)
{
throw new System.ArgumentNullException("credentials");
}
- this.Credentials = credentials;
- if (this.Credentials != null)
+ Credentials = credentials;
+ if (Credentials != null)
{
- this.Credentials.InitializeServiceClient(this);
+ Credentials.InitializeServiceClient(this);
}
}
@@ -176,16 +219,16 @@ internal RecoveryServicesClient(Microsoft.Rest.ServiceClientCredentials credenti
///
/// Thrown when a required parameter is null
///
- internal RecoveryServicesClient(Microsoft.Rest.ServiceClientCredentials credentials, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : this(rootHandler, handlers)
+ public RecoveryServicesClient(ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers)
{
if (credentials == null)
{
throw new System.ArgumentNullException("credentials");
}
- this.Credentials = credentials;
- if (this.Credentials != null)
+ Credentials = credentials;
+ if (Credentials != null)
{
- this.Credentials.InitializeServiceClient(this);
+ Credentials.InitializeServiceClient(this);
}
}
@@ -204,7 +247,7 @@ internal RecoveryServicesClient(Microsoft.Rest.ServiceClientCredentials credenti
///
/// Thrown when a required parameter is null
///
- internal RecoveryServicesClient(System.Uri baseUri, Microsoft.Rest.ServiceClientCredentials credentials, params System.Net.Http.DelegatingHandler[] handlers) : this(handlers)
+ public RecoveryServicesClient(System.Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers)
{
if (baseUri == null)
{
@@ -214,11 +257,11 @@ internal RecoveryServicesClient(System.Uri baseUri, Microsoft.Rest.ServiceClient
{
throw new System.ArgumentNullException("credentials");
}
- this.BaseUri = baseUri;
- this.Credentials = credentials;
- if (this.Credentials != null)
+ BaseUri = baseUri;
+ Credentials = credentials;
+ if (Credentials != null)
{
- this.Credentials.InitializeServiceClient(this);
+ Credentials.InitializeServiceClient(this);
}
}
@@ -240,7 +283,7 @@ internal RecoveryServicesClient(System.Uri baseUri, Microsoft.Rest.ServiceClient
///
/// Thrown when a required parameter is null
///
- internal RecoveryServicesClient(System.Uri baseUri, Microsoft.Rest.ServiceClientCredentials credentials, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : this(rootHandler, handlers)
+ public RecoveryServicesClient(System.Uri baseUri, ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers)
{
if (baseUri == null)
{
@@ -250,11 +293,11 @@ internal RecoveryServicesClient(System.Uri baseUri, Microsoft.Rest.ServiceClient
{
throw new System.ArgumentNullException("credentials");
}
- this.BaseUri = baseUri;
- this.Credentials = credentials;
- if (this.Credentials != null)
+ BaseUri = baseUri;
+ Credentials = credentials;
+ if (Credentials != null)
{
- this.Credentials.InitializeServiceClient(this);
+ Credentials.InitializeServiceClient(this);
}
}
@@ -267,39 +310,50 @@ internal RecoveryServicesClient(System.Uri baseUri, Microsoft.Rest.ServiceClient
///
private void Initialize()
{
- this.Vaults = new VaultsOperations(this);
- this.BaseUri = new System.Uri("https://management.azure.com");
- this.ApiVersion = "2016-06-01";
- this.AcceptLanguage = "en-US";
- this.LongRunningOperationRetryTimeout = 30;
- this.GenerateClientRequestId = true;
- SerializationSettings = new Newtonsoft.Json.JsonSerializerSettings
+ Operations = new Operations(this);
+ BackupVaultConfigs = new BackupVaultConfigsOperations(this);
+ BackupStorageConfigs = new BackupStorageConfigsOperations(this);
+ VaultCertificates = new VaultCertificatesOperations(this);
+ RegisteredIdentities = new RegisteredIdentitiesOperations(this);
+ ReplicationUsages = new ReplicationUsagesOperations(this);
+ Vaults = new VaultsOperations(this);
+ VaultExtendedInfo = new VaultExtendedInfoOperations(this);
+ Usages = new UsagesOperations(this);
+ BaseUri = new System.Uri("https://management.azure.com");
+ AcceptLanguage = "en-US";
+ LongRunningOperationRetryTimeout = 30;
+ GenerateClientRequestId = true;
+ SerializationSettings = new JsonSerializerSettings
{
Formatting = Newtonsoft.Json.Formatting.Indented,
DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc,
NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore,
ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
- ContractResolver = new Microsoft.Rest.Serialization.ReadOnlyJsonContractResolver(),
- Converters = new System.Collections.Generic.List
+ ContractResolver = new ReadOnlyJsonContractResolver(),
+ Converters = new List
{
- new Microsoft.Rest.Serialization.Iso8601TimeSpanConverter()
+ new Iso8601TimeSpanConverter()
}
};
- DeserializationSettings = new Newtonsoft.Json.JsonSerializerSettings
+ SerializationSettings.Converters.Add(new TransformationJsonConverter());
+ DeserializationSettings = new JsonSerializerSettings
{
DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc,
NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore,
ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
- ContractResolver = new Microsoft.Rest.Serialization.ReadOnlyJsonContractResolver(),
- Converters = new System.Collections.Generic.List
+ ContractResolver = new ReadOnlyJsonContractResolver(),
+ Converters = new List
{
- new Microsoft.Rest.Serialization.Iso8601TimeSpanConverter()
+ new Iso8601TimeSpanConverter()
}
};
+ SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("authType"));
+ DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("authType"));
CustomInitialize();
- DeserializationSettings.Converters.Add(new Microsoft.Rest.Azure.CloudErrorJsonConverter());
- }
+ DeserializationSettings.Converters.Add(new TransformationJsonConverter());
+ DeserializationSettings.Converters.Add(new CloudErrorJsonConverter());
+ }
}
}
diff --git a/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/RegisteredIdentitiesOperations.cs b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/RegisteredIdentitiesOperations.cs
new file mode 100644
index 000000000000..1dc1246ca04f
--- /dev/null
+++ b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/RegisteredIdentitiesOperations.cs
@@ -0,0 +1,233 @@
+// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+
+namespace Microsoft.Azure.Management.RecoveryServices
+{
+ using Microsoft.Azure;
+ using Microsoft.Azure.Management;
+ 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;
+
+ ///
+ /// RegisteredIdentitiesOperations operations.
+ ///
+ internal partial class RegisteredIdentitiesOperations : IServiceOperations, IRegisteredIdentitiesOperations
+ {
+ ///
+ /// Initializes a new instance of the RegisteredIdentitiesOperations class.
+ ///
+ ///
+ /// Reference to the service client.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ internal RegisteredIdentitiesOperations(RecoveryServicesClient client)
+ {
+ if (client == null)
+ {
+ throw new System.ArgumentNullException("client");
+ }
+ Client = client;
+ }
+
+ ///
+ /// Gets a reference to the RecoveryServicesClient
+ ///
+ public RecoveryServicesClient Client { get; private set; }
+
+ ///
+ /// Unregisters the given container from your Recovery Services vault.
+ ///
+ ///
+ /// The name of the resource group where the recovery services vault is
+ /// present.
+ ///
+ ///
+ /// The name of the recovery services vault.
+ ///
+ ///
+ /// Name of the protection container to unregister.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string vaultName, string identityName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (vaultName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "vaultName");
+ }
+ if (identityName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "identityName");
+ }
+ string apiVersion = "2016-06-01";
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("vaultName", vaultName);
+ tracingParameters.Add("identityName", identityName);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/registeredIdentities/{identityName}").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("{identityName}", System.Uri.EscapeDataString(identityName));
+ List _queryParameters = new List();
+ if (apiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("DELETE");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 204)
+ {
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ }
+}
diff --git a/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/RegisteredIdentitiesOperationsExtensions.cs b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/RegisteredIdentitiesOperationsExtensions.cs
new file mode 100644
index 000000000000..a7a9c66d17ab
--- /dev/null
+++ b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/RegisteredIdentitiesOperationsExtensions.cs
@@ -0,0 +1,66 @@
+// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+
+namespace Microsoft.Azure.Management.RecoveryServices
+{
+ using Microsoft.Azure;
+ using Microsoft.Azure.Management;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// Extension methods for RegisteredIdentitiesOperations.
+ ///
+ public static partial class RegisteredIdentitiesOperationsExtensions
+ {
+ ///
+ /// Unregisters the given container from your Recovery Services vault.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group where the recovery services vault is
+ /// present.
+ ///
+ ///
+ /// The name of the recovery services vault.
+ ///
+ ///
+ /// Name of the protection container to unregister.
+ ///
+ public static void Delete(this IRegisteredIdentitiesOperations operations, string resourceGroupName, string vaultName, string identityName)
+ {
+ operations.DeleteAsync(resourceGroupName, vaultName, identityName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Unregisters the given container from your Recovery Services vault.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group where the recovery services vault is
+ /// present.
+ ///
+ ///
+ /// The name of the recovery services vault.
+ ///
+ ///
+ /// Name of the protection container to unregister.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task DeleteAsync(this IRegisteredIdentitiesOperations operations, string resourceGroupName, string vaultName, string identityName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, vaultName, identityName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
+ }
+}
diff --git a/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/ReplicationUsagesOperations.cs b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/ReplicationUsagesOperations.cs
new file mode 100644
index 000000000000..88368c496983
--- /dev/null
+++ b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/ReplicationUsagesOperations.cs
@@ -0,0 +1,245 @@
+// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+
+namespace Microsoft.Azure.Management.RecoveryServices
+{
+ using Microsoft.Azure;
+ using Microsoft.Azure.Management;
+ 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;
+
+ ///
+ /// ReplicationUsagesOperations operations.
+ ///
+ internal partial class ReplicationUsagesOperations : IServiceOperations, IReplicationUsagesOperations
+ {
+ ///
+ /// Initializes a new instance of the ReplicationUsagesOperations class.
+ ///
+ ///
+ /// Reference to the service client.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ internal ReplicationUsagesOperations(RecoveryServicesClient client)
+ {
+ if (client == null)
+ {
+ throw new System.ArgumentNullException("client");
+ }
+ Client = client;
+ }
+
+ ///
+ /// Gets a reference to the RecoveryServicesClient
+ ///
+ public RecoveryServicesClient Client { get; private set; }
+
+ ///
+ /// Fetches the replication usages of the vault.
+ ///
+ ///
+ /// The name of the resource group where the recovery services vault is
+ /// present.
+ ///
+ ///
+ /// The name of the recovery services vault.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task>> ListWithHttpMessagesAsync(string resourceGroupName, string vaultName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (vaultName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "vaultName");
+ }
+ string apiVersion = "2016-06-01";
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("vaultName", vaultName);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/replicationUsages").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));
+ List _queryParameters = new List();
+ if (apiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ 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/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/ReplicationUsagesOperationsExtensions.cs b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/ReplicationUsagesOperationsExtensions.cs
new file mode 100644
index 000000000000..8ac0f197fd16
--- /dev/null
+++ b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/ReplicationUsagesOperationsExtensions.cs
@@ -0,0 +1,65 @@
+// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+
+namespace Microsoft.Azure.Management.RecoveryServices
+{
+ using Microsoft.Azure;
+ using Microsoft.Azure.Management;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// Extension methods for ReplicationUsagesOperations.
+ ///
+ public static partial class ReplicationUsagesOperationsExtensions
+ {
+ ///
+ /// Fetches the replication usages of the vault.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group where the recovery services vault is
+ /// present.
+ ///
+ ///
+ /// The name of the recovery services vault.
+ ///
+ public static IEnumerable List(this IReplicationUsagesOperations operations, string resourceGroupName, string vaultName)
+ {
+ return operations.ListAsync(resourceGroupName, vaultName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Fetches the replication usages of the vault.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group where the recovery services vault is
+ /// present.
+ ///
+ ///
+ /// The name of the recovery services vault.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListAsync(this IReplicationUsagesOperations operations, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, vaultName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ }
+}
diff --git a/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/UsagesOperations.cs b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/UsagesOperations.cs
new file mode 100644
index 000000000000..bcd8fe0392e7
--- /dev/null
+++ b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/UsagesOperations.cs
@@ -0,0 +1,245 @@
+// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+
+namespace Microsoft.Azure.Management.RecoveryServices
+{
+ using Microsoft.Azure;
+ using Microsoft.Azure.Management;
+ 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;
+
+ ///
+ /// UsagesOperations operations.
+ ///
+ internal partial class UsagesOperations : IServiceOperations, IUsagesOperations
+ {
+ ///
+ /// Initializes a new instance of the UsagesOperations class.
+ ///
+ ///
+ /// Reference to the service client.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ internal UsagesOperations(RecoveryServicesClient client)
+ {
+ if (client == null)
+ {
+ throw new System.ArgumentNullException("client");
+ }
+ Client = client;
+ }
+
+ ///
+ /// Gets a reference to the RecoveryServicesClient
+ ///
+ public RecoveryServicesClient Client { get; private set; }
+
+ ///
+ /// Fetches the usages of the vault.
+ ///
+ ///
+ /// The name of the resource group where the recovery services vault is
+ /// present.
+ ///
+ ///
+ /// The name of the recovery services vault.
+ ///
+ ///
+ /// 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>> ListByVaultsWithHttpMessagesAsync(string resourceGroupName, string vaultName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (vaultName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "vaultName");
+ }
+ string apiVersion = "2016-06-01";
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("vaultName", vaultName);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "ListByVaults", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/usages").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));
+ List _queryParameters = new List();
+ if (apiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ 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/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/UsagesOperationsExtensions.cs b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/UsagesOperationsExtensions.cs
new file mode 100644
index 000000000000..6ab377e8dc21
--- /dev/null
+++ b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/UsagesOperationsExtensions.cs
@@ -0,0 +1,65 @@
+// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+
+namespace Microsoft.Azure.Management.RecoveryServices
+{
+ using Microsoft.Azure;
+ using Microsoft.Azure.Management;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// Extension methods for UsagesOperations.
+ ///
+ public static partial class UsagesOperationsExtensions
+ {
+ ///
+ /// Fetches the usages of the vault.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group where the recovery services vault is
+ /// present.
+ ///
+ ///
+ /// The name of the recovery services vault.
+ ///
+ public static IEnumerable ListByVaults(this IUsagesOperations operations, string resourceGroupName, string vaultName)
+ {
+ return operations.ListByVaultsAsync(resourceGroupName, vaultName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Fetches the usages of the vault.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group where the recovery services vault is
+ /// present.
+ ///
+ ///
+ /// The name of the recovery services vault.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListByVaultsAsync(this IUsagesOperations operations, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListByVaultsWithHttpMessagesAsync(resourceGroupName, vaultName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ }
+}
diff --git a/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/VaultCertificatesOperations.cs b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/VaultCertificatesOperations.cs
new file mode 100644
index 000000000000..3d989c08a509
--- /dev/null
+++ b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/VaultCertificatesOperations.cs
@@ -0,0 +1,268 @@
+// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+
+namespace Microsoft.Azure.Management.RecoveryServices
+{
+ using Microsoft.Azure;
+ using Microsoft.Azure.Management;
+ 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;
+
+ ///
+ /// VaultCertificatesOperations operations.
+ ///
+ internal partial class VaultCertificatesOperations : IServiceOperations, IVaultCertificatesOperations
+ {
+ ///
+ /// Initializes a new instance of the VaultCertificatesOperations class.
+ ///
+ ///
+ /// Reference to the service client.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ internal VaultCertificatesOperations(RecoveryServicesClient client)
+ {
+ if (client == null)
+ {
+ throw new System.ArgumentNullException("client");
+ }
+ Client = client;
+ }
+
+ ///
+ /// Gets a reference to the RecoveryServicesClient
+ ///
+ public RecoveryServicesClient Client { get; private set; }
+
+ ///
+ /// Upload a certificate for a resource.
+ ///
+ ///
+ /// The name of the resource group where the recovery services vault is
+ /// present.
+ ///
+ ///
+ /// The name of the recovery services vault.
+ ///
+ ///
+ /// Certificate friendly name.
+ ///
+ ///
+ /// Input parameters for uploading the vault certificate.
+ ///
+ ///
+ /// 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> CreateWithHttpMessagesAsync(string resourceGroupName, string vaultName, string certificateName, CertificateRequest certificateRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (vaultName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "vaultName");
+ }
+ if (certificateName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "certificateName");
+ }
+ if (certificateRequest == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "certificateRequest");
+ }
+ string apiVersion = "2016-06-01";
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("vaultName", vaultName);
+ tracingParameters.Add("certificateName", certificateName);
+ tracingParameters.Add("certificateRequest", certificateRequest);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "Create", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/certificates/{certificateName}").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("{certificateName}", System.Uri.EscapeDataString(certificateName));
+ List _queryParameters = new List();
+ if (apiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("PUT");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ if(certificateRequest != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(certificateRequest, 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/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/VaultCertificatesOperationsExtensions.cs b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/VaultCertificatesOperationsExtensions.cs
new file mode 100644
index 000000000000..0ad1dd14680d
--- /dev/null
+++ b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/VaultCertificatesOperationsExtensions.cs
@@ -0,0 +1,75 @@
+// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+
+namespace Microsoft.Azure.Management.RecoveryServices
+{
+ using Microsoft.Azure;
+ using Microsoft.Azure.Management;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// Extension methods for VaultCertificatesOperations.
+ ///
+ public static partial class VaultCertificatesOperationsExtensions
+ {
+ ///
+ /// Upload a certificate for a resource.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group where the recovery services vault is
+ /// present.
+ ///
+ ///
+ /// The name of the recovery services vault.
+ ///
+ ///
+ /// Certificate friendly name.
+ ///
+ ///
+ /// Input parameters for uploading the vault certificate.
+ ///
+ public static VaultCertificateResponse Create(this IVaultCertificatesOperations operations, string resourceGroupName, string vaultName, string certificateName, CertificateRequest certificateRequest)
+ {
+ return operations.CreateAsync(resourceGroupName, vaultName, certificateName, certificateRequest).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Upload a certificate for a resource.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group where the recovery services vault is
+ /// present.
+ ///
+ ///
+ /// The name of the recovery services vault.
+ ///
+ ///
+ /// Certificate friendly name.
+ ///
+ ///
+ /// Input parameters for uploading the vault certificate.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task CreateAsync(this IVaultCertificatesOperations operations, string resourceGroupName, string vaultName, string certificateName, CertificateRequest certificateRequest, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.CreateWithHttpMessagesAsync(resourceGroupName, vaultName, certificateName, certificateRequest, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ }
+}
diff --git a/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/VaultExtendedInfoOperations.cs b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/VaultExtendedInfoOperations.cs
new file mode 100644
index 000000000000..fff5a01b494e
--- /dev/null
+++ b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/VaultExtendedInfoOperations.cs
@@ -0,0 +1,663 @@
+// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+
+namespace Microsoft.Azure.Management.RecoveryServices
+{
+ using Microsoft.Azure;
+ using Microsoft.Azure.Management;
+ 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;
+
+ ///
+ /// VaultExtendedInfoOperations operations.
+ ///
+ internal partial class VaultExtendedInfoOperations : IServiceOperations, IVaultExtendedInfoOperations
+ {
+ ///
+ /// Initializes a new instance of the VaultExtendedInfoOperations class.
+ ///
+ ///
+ /// Reference to the service client.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ internal VaultExtendedInfoOperations(RecoveryServicesClient client)
+ {
+ if (client == null)
+ {
+ throw new System.ArgumentNullException("client");
+ }
+ Client = client;
+ }
+
+ ///
+ /// Gets a reference to the RecoveryServicesClient
+ ///
+ public RecoveryServicesClient Client { get; private set; }
+
+ ///
+ /// Get the vault extended info.
+ ///
+ ///
+ /// The name of the resource group where the recovery services vault is
+ /// present.
+ ///
+ ///
+ /// The name of the recovery services vault.
+ ///
+ ///
+ /// 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, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (vaultName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "vaultName");
+ }
+ string apiVersion = "2016-06-01";
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("vaultName", vaultName);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/extendedInformation/vaultExtendedInfo").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));
+ List _queryParameters = new List();
+ if (apiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ 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;
+ }
+
+ ///
+ /// Create vault extended info.
+ ///
+ ///
+ /// The name of the resource group where the recovery services vault is
+ /// present.
+ ///
+ ///
+ /// The name of the recovery services vault.
+ ///
+ ///
+ /// resourceResourceExtendedInfoDetails
+ ///
+ ///
+ /// 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> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string vaultName, VaultExtendedInfoResource resourceResourceExtendedInfoDetails, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (vaultName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "vaultName");
+ }
+ if (resourceResourceExtendedInfoDetails == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceResourceExtendedInfoDetails");
+ }
+ string apiVersion = "2016-06-01";
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("vaultName", vaultName);
+ tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("resourceResourceExtendedInfoDetails", resourceResourceExtendedInfoDetails);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/extendedInformation/vaultExtendedInfo").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));
+ List _queryParameters = new List();
+ if (apiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("PUT");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ if(resourceResourceExtendedInfoDetails != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(resourceResourceExtendedInfoDetails, 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;
+ }
+
+ ///
+ /// Update vault extended info.
+ ///
+ ///
+ /// The name of the resource group where the recovery services vault is
+ /// present.
+ ///
+ ///
+ /// The name of the recovery services vault.
+ ///
+ ///
+ /// resourceResourceExtendedInfoDetails
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string vaultName, VaultExtendedInfoResource resourceResourceExtendedInfoDetails, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (vaultName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "vaultName");
+ }
+ if (resourceResourceExtendedInfoDetails == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceResourceExtendedInfoDetails");
+ }
+ string apiVersion = "2016-06-01";
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("vaultName", vaultName);
+ tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("resourceResourceExtendedInfoDetails", resourceResourceExtendedInfoDetails);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/extendedInformation/vaultExtendedInfo").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));
+ List _queryParameters = new List();
+ if (apiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("PATCH");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ if(resourceResourceExtendedInfoDetails != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(resourceResourceExtendedInfoDetails, 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/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/VaultExtendedInfoOperationsExtensions.cs b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/VaultExtendedInfoOperationsExtensions.cs
new file mode 100644
index 000000000000..a238c906bc36
--- /dev/null
+++ b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/VaultExtendedInfoOperationsExtensions.cs
@@ -0,0 +1,159 @@
+// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+
+namespace Microsoft.Azure.Management.RecoveryServices
+{
+ using Microsoft.Azure;
+ using Microsoft.Azure.Management;
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// Extension methods for VaultExtendedInfoOperations.
+ ///
+ public static partial class VaultExtendedInfoOperationsExtensions
+ {
+ ///
+ /// Get the vault extended info.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group where the recovery services vault is
+ /// present.
+ ///
+ ///
+ /// The name of the recovery services vault.
+ ///
+ public static VaultExtendedInfoResource Get(this IVaultExtendedInfoOperations operations, string resourceGroupName, string vaultName)
+ {
+ return operations.GetAsync(resourceGroupName, vaultName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Get the vault extended info.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group where the recovery services vault is
+ /// present.
+ ///
+ ///
+ /// The name of the recovery services vault.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task GetAsync(this IVaultExtendedInfoOperations operations, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, vaultName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Create vault extended info.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group where the recovery services vault is
+ /// present.
+ ///
+ ///
+ /// The name of the recovery services vault.
+ ///
+ ///
+ /// resourceResourceExtendedInfoDetails
+ ///
+ public static VaultExtendedInfoResource CreateOrUpdate(this IVaultExtendedInfoOperations operations, string resourceGroupName, string vaultName, VaultExtendedInfoResource resourceResourceExtendedInfoDetails)
+ {
+ return operations.CreateOrUpdateAsync(resourceGroupName, vaultName, resourceResourceExtendedInfoDetails).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Create vault extended info.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group where the recovery services vault is
+ /// present.
+ ///
+ ///
+ /// The name of the recovery services vault.
+ ///
+ ///
+ /// resourceResourceExtendedInfoDetails
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task CreateOrUpdateAsync(this IVaultExtendedInfoOperations operations, string resourceGroupName, string vaultName, VaultExtendedInfoResource resourceResourceExtendedInfoDetails, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, vaultName, resourceResourceExtendedInfoDetails, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Update vault extended info.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group where the recovery services vault is
+ /// present.
+ ///
+ ///
+ /// The name of the recovery services vault.
+ ///
+ ///
+ /// resourceResourceExtendedInfoDetails
+ ///
+ public static VaultExtendedInfoResource Update(this IVaultExtendedInfoOperations operations, string resourceGroupName, string vaultName, VaultExtendedInfoResource resourceResourceExtendedInfoDetails)
+ {
+ return operations.UpdateAsync(resourceGroupName, vaultName, resourceResourceExtendedInfoDetails).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Update vault extended info.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group where the recovery services vault is
+ /// present.
+ ///
+ ///
+ /// The name of the recovery services vault.
+ ///
+ ///
+ /// resourceResourceExtendedInfoDetails
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task UpdateAsync(this IVaultExtendedInfoOperations operations, string resourceGroupName, string vaultName, VaultExtendedInfoResource resourceResourceExtendedInfoDetails, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, vaultName, resourceResourceExtendedInfoDetails, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ }
+}
diff --git a/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/VaultsOperations.cs b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/VaultsOperations.cs
index fd1a031542ad..af9955f19eeb 100644
--- a/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/VaultsOperations.cs
+++ b/src/ResourceManagement/RecoveryServices/Microsoft.Azure.Management.RecoveryServices/Generated/VaultsOperations.cs
@@ -1,21 +1,27 @@
-// 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 0.17.0.0
+// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace Microsoft.Azure.Management.RecoveryServices
{
- using System.Linq;
+ using Microsoft.Azure;
+ using Microsoft.Azure.Management;
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;
///
/// VaultsOperations operations.
///
- internal partial class VaultsOperations : Microsoft.Rest.IServiceOperations, IVaultsOperations
+ internal partial class VaultsOperations : IServiceOperations, IVaultsOperations
{
///
/// Initializes a new instance of the VaultsOperations class.
@@ -28,11 +34,11 @@ internal partial class VaultsOperations : Microsoft.Rest.IServiceOperations
internal VaultsOperations(RecoveryServicesClient client)
{
- if (client == null)
+ if (client == null)
{
throw new System.ArgumentNullException("client");
}
- this.Client = client;
+ Client = client;
}
///
@@ -41,96 +47,266 @@ internal VaultsOperations(RecoveryServicesClient client)
public RecoveryServicesClient Client { get; private set; }
///
- /// Get the Vault details.
+ /// Fetches all the resources of the specified type in the subscription.
+ ///
+ ///
+ /// 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>> ListBySubscriptionIdWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ string apiVersion = "2016-06-01";
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "ListBySubscriptionId", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/vaults").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ List _queryParameters = new List();
+ if (apiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ 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;
+ }
+
+ ///
+ /// Retrieve a list of Vaults.
///
///
/// The name of the resource group where the recovery services vault is
/// present.
///
- ///
- /// The name of the recovery services vault.
- ///
///
/// 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 System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string vaultName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public async Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
- if (this.Client.SubscriptionId == null)
+ if (Client.SubscriptionId == null)
{
- throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
if (resourceGroupName == null)
{
- throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName");
- }
- if (vaultName == null)
- {
- throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vaultName");
- }
- if (this.Client.ApiVersion == null)
- {
- throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
+ string apiVersion = "2016-06-01";
// Tracing
- bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled;
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
if (_shouldTrace)
{
- _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString();
- System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary();
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary