diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/BackupStorageConfigsOperations.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/BackupStorageConfigsOperations.cs deleted file mode 100644 index e75fdc8e9760..000000000000 --- a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/BackupStorageConfigsOperations.cs +++ /dev/null @@ -1,433 +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; - 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/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/BackupStorageConfigsOperationsExtensions.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/BackupStorageConfigsOperationsExtensions.cs deleted file mode 100644 index a3eea8c07697..000000000000 --- a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/BackupStorageConfigsOperationsExtensions.cs +++ /dev/null @@ -1,108 +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.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/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/BackupVaultConfigsOperationsExtensions.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/BackupVaultConfigsOperationsExtensions.cs deleted file mode 100644 index d0a968329ca1..000000000000 --- a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/BackupVaultConfigsOperationsExtensions.cs +++ /dev/null @@ -1,111 +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.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/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/IBackupStorageConfigsOperations.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/IBackupStorageConfigsOperations.cs deleted file mode 100644 index 628d398c9ae2..000000000000 --- a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/IBackupStorageConfigsOperations.cs +++ /dev/null @@ -1,75 +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; - - /// - /// 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/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/IOperations.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/IOperations.cs index 675d715b50bb..52c1af3a3069 100644 --- a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/IOperations.cs +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/IOperations.cs @@ -1,11 +1,15 @@ -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.RecoveryServices { - using Microsoft.Azure; - using Microsoft.Azure.Management; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; @@ -22,10 +26,6 @@ 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. /// @@ -41,7 +41,7 @@ public partial interface IOperations /// /// Thrown when a required parameter is null /// - Task>> ListWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Returns the list of available operations. /// diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/IBackupVaultConfigsOperations.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/IPrivateLinkResourcesOperations.cs similarity index 50% rename from sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/IBackupVaultConfigsOperations.cs rename to sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/IPrivateLinkResourcesOperations.cs index d303bb217eff..de2901a03514 100644 --- a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/IBackupVaultConfigsOperations.cs +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/IPrivateLinkResourcesOperations.cs @@ -1,11 +1,15 @@ -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.RecoveryServices { - using Microsoft.Azure; - using Microsoft.Azure.Management; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; @@ -15,12 +19,13 @@ namespace Microsoft.Azure.Management.RecoveryServices using System.Threading.Tasks; /// - /// BackupVaultConfigsOperations operations. + /// PrivateLinkResourcesOperations operations. /// - public partial interface IBackupVaultConfigsOperations + public partial interface IPrivateLinkResourcesOperations { /// - /// Fetches vault config. + /// Returns the list of private link resources that need to be created + /// for Backup and SiteRecovery /// /// /// The name of the resource group where the recovery services vault is @@ -44,9 +49,10 @@ public partial interface IBackupVaultConfigsOperations /// /// Thrown when a required parameter is null /// - Task> GetWithHttpMessagesAsync(string resourceGroupName, string vaultName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListWithHttpMessagesAsync(string resourceGroupName, string vaultName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Updates vault config model type. + /// Returns a specified private link resource that need to be created + /// for Backup and SiteRecovery /// /// /// The name of the resource group where the recovery services vault is @@ -55,8 +61,7 @@ public partial interface IBackupVaultConfigsOperations /// /// The name of the recovery services vault. /// - /// - /// Backup vault config. + /// /// /// /// The headers that will be added to request. @@ -73,6 +78,29 @@ public partial interface IBackupVaultConfigsOperations /// /// Thrown when a required parameter is null /// - Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string vaultName, BackupVaultConfig backupVaultConfig, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> GetWithHttpMessagesAsync(string resourceGroupName, string vaultName, string privateLinkResourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Returns the list of private link resources that need to be created + /// for Backup and SiteRecovery + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/IRecoveryServicesClient.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/IRecoveryServicesClient.cs index 983ef915a66d..eafe67a6d30e 100644 --- a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/IRecoveryServicesClient.cs +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/IRecoveryServicesClient.cs @@ -1,18 +1,22 @@ -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.RecoveryServices { - 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 + /// Recovery Services Client /// public partial interface IRecoveryServicesClient : System.IDisposable { @@ -42,57 +46,63 @@ public partial interface IRecoveryServicesClient : System.IDisposable string SubscriptionId { get; set; } /// - /// Gets or sets the preferred language for the response. + /// Client Api Version. + /// + string ApiVersion { get; } + + /// + /// The preferred language for the response. /// string AcceptLanguage { get; set; } /// - /// Gets or sets the retry timeout in seconds for Long Running - /// Operations. Default value is 30. + /// The retry timeout in seconds for Long Running Operations. Default + /// value is 30. /// 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. + /// Whether a unique x-ms-client-request-id should be generated. 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. + /// Gets the IVaultCertificatesOperations. /// - IOperations Operations { get; } + IVaultCertificatesOperations VaultCertificates { get; } /// - /// Gets the IBackupVaultConfigsOperations. + /// Gets the IRegisteredIdentitiesOperations. /// - IBackupVaultConfigsOperations BackupVaultConfigs { get; } + IRegisteredIdentitiesOperations RegisteredIdentities { get; } /// - /// Gets the IBackupStorageConfigsOperations. + /// Gets the IReplicationUsagesOperations. /// - IBackupStorageConfigsOperations BackupStorageConfigs { get; } + IReplicationUsagesOperations ReplicationUsages { get; } /// - /// Gets the IVaultCertificatesOperations. + /// Gets the IPrivateLinkResourcesOperations. /// - IVaultCertificatesOperations VaultCertificates { get; } + IPrivateLinkResourcesOperations PrivateLinkResources { get; } /// - /// Gets the IRegisteredIdentitiesOperations. + /// Gets the IRecoveryServicesOperations. /// - IRegisteredIdentitiesOperations RegisteredIdentities { get; } + IRecoveryServicesOperations RecoveryServices { get; } /// - /// Gets the IReplicationUsagesOperations. + /// Gets the IVaultsOperations. /// - IReplicationUsagesOperations ReplicationUsages { get; } + IVaultsOperations Vaults { get; } /// - /// Gets the IVaultsOperations. + /// Gets the IOperations. /// - IVaultsOperations Vaults { get; } + IOperations Operations { get; } /// /// Gets the IVaultExtendedInfoOperations. diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/IRecoveryServicesOperations.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/IRecoveryServicesOperations.cs new file mode 100644 index 000000000000..3677a3cc8da1 --- /dev/null +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/IRecoveryServicesOperations.cs @@ -0,0 +1,60 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.RecoveryServices +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// RecoveryServicesOperations operations. + /// + public partial interface IRecoveryServicesOperations + { + /// + /// API to check for resource name availability. + /// A name is available if no other resource exists that has the same + /// SubscriptionId, Resource Name and Type + /// or if one or more such resources exist, each of these must be GC'd + /// and their time of deletion be more than 24 Hours Ago + /// + /// + /// The name of the resource group where the recovery services vault is + /// present. + /// + /// + /// Location of the resource + /// + /// + /// Contains information about Resource type and Resource name + /// + /// + /// 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> CheckNameAvailabilityWithHttpMessagesAsync(string resourceGroupName, string location, CheckNameAvailabilityParameters input, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/IRegisteredIdentitiesOperations.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/IRegisteredIdentitiesOperations.cs index a4d0b0bbcd44..80cf8386d151 100644 --- a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/IRegisteredIdentitiesOperations.cs +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/IRegisteredIdentitiesOperations.cs @@ -1,11 +1,15 @@ -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.RecoveryServices { - using Microsoft.Azure; - using Microsoft.Azure.Management; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/IReplicationUsagesOperations.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/IReplicationUsagesOperations.cs index e525882063c1..5f124345bb39 100644 --- a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/IReplicationUsagesOperations.cs +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/IReplicationUsagesOperations.cs @@ -1,11 +1,15 @@ -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.RecoveryServices { - using Microsoft.Azure; - using Microsoft.Azure.Management; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/IUsagesOperations.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/IUsagesOperations.cs index e417b229bf3d..c70099f3e53b 100644 --- a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/IUsagesOperations.cs +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/IUsagesOperations.cs @@ -1,11 +1,15 @@ -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.RecoveryServices { - using Microsoft.Azure; - using Microsoft.Azure.Management; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/IVaultCertificatesOperations.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/IVaultCertificatesOperations.cs index 331c82d60486..cf216b54f847 100644 --- a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/IVaultCertificatesOperations.cs +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/IVaultCertificatesOperations.cs @@ -1,11 +1,15 @@ -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.RecoveryServices { - using Microsoft.Azure; - using Microsoft.Azure.Management; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; @@ -20,7 +24,7 @@ namespace Microsoft.Azure.Management.RecoveryServices public partial interface IVaultCertificatesOperations { /// - /// Upload a certificate for a resource. + /// Uploads a certificate for a resource. /// /// /// The name of the resource group where the recovery services vault is @@ -32,8 +36,7 @@ public partial interface IVaultCertificatesOperations /// /// Certificate friendly name. /// - /// - /// Input parameters for uploading the vault certificate. + /// /// /// /// The headers that will be added to request. @@ -50,6 +53,6 @@ public partial interface IVaultCertificatesOperations /// /// Thrown when a required parameter is null /// - Task> CreateWithHttpMessagesAsync(string resourceGroupName, string vaultName, string certificateName, CertificateRequest certificateRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> CreateWithHttpMessagesAsync(string resourceGroupName, string vaultName, string certificateName, RawCertificateData properties = default(RawCertificateData), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/IVaultExtendedInfoOperations.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/IVaultExtendedInfoOperations.cs index acda50836779..55165b8574b6 100644 --- a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/IVaultExtendedInfoOperations.cs +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/IVaultExtendedInfoOperations.cs @@ -1,11 +1,15 @@ -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.RecoveryServices { - using Microsoft.Azure; - using Microsoft.Azure.Management; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; @@ -56,7 +60,7 @@ public partial interface IVaultExtendedInfoOperations /// The name of the recovery services vault. /// /// - /// resourceResourceExtendedInfoDetails + /// Details of ResourceExtendedInfo /// /// /// The headers that will be added to request. @@ -85,7 +89,7 @@ public partial interface IVaultExtendedInfoOperations /// The name of the recovery services vault. /// /// - /// resourceResourceExtendedInfoDetails + /// Details of ResourceExtendedInfo /// /// /// The headers that will be added to request. diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/IVaultsOperations.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/IVaultsOperations.cs index 9092457fc8cc..f69cfbed7529 100644 --- a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/IVaultsOperations.cs +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/IVaultsOperations.cs @@ -1,11 +1,15 @@ -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.RecoveryServices { - using Microsoft.Azure; - using Microsoft.Azure.Management; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; @@ -38,7 +42,7 @@ public partial interface IVaultsOperations /// /// Thrown when a required parameter is null /// - Task>> ListBySubscriptionIdWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListBySubscriptionIdWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Retrieve a list of Vaults. /// @@ -61,7 +65,7 @@ public partial interface IVaultsOperations /// /// Thrown when a required parameter is null /// - Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Get the Vault details. /// @@ -168,6 +172,51 @@ public partial interface IVaultsOperations /// /// Thrown when a required parameter is null /// - Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string vaultName, Vault vault, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string vaultName, PatchVault vault, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Fetches all the resources of the specified type in the + /// subscription. + /// + /// + /// 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>> ListBySubscriptionIdNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Retrieve a list of Vaults. + /// + /// + /// 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>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/AuthType.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/AuthType.cs index 803d1f8d8764..70e7f0bd2308 100644 --- a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/AuthType.cs +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/AuthType.cs @@ -1,12 +1,15 @@ -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.RecoveryServices.Models { - using Microsoft.Azure; - using Microsoft.Azure.Management; - using Microsoft.Azure.Management.RecoveryServices; /// /// Defines values for AuthType. diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/BackupStorageConfig.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/BackupStorageConfig.cs deleted file mode 100644 index 3b79445fbac4..000000000000 --- a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/BackupStorageConfig.cs +++ /dev/null @@ -1,75 +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.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/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/BackupVaultConfig.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/BackupVaultConfig.cs deleted file mode 100644 index 76d310a59261..000000000000 --- a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/BackupVaultConfig.cs +++ /dev/null @@ -1,75 +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.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/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/CertificateRequest.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/CertificateRequest.cs index dae9358c9196..3ac42fbf0422 100644 --- a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/CertificateRequest.cs +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/CertificateRequest.cs @@ -1,12 +1,15 @@ -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.RecoveryServices.Models { - using Microsoft.Azure; - using Microsoft.Azure.Management; - using Microsoft.Azure.Management.RecoveryServices; using Newtonsoft.Json; using System.Linq; @@ -18,7 +21,10 @@ public partial class CertificateRequest /// /// Initializes a new instance of the CertificateRequest class. /// - public CertificateRequest() { } + public CertificateRequest() + { + CustomInit(); + } /// /// Initializes a new instance of the CertificateRequest class. @@ -26,8 +32,14 @@ public CertificateRequest() { } public CertificateRequest(RawCertificateData properties = default(RawCertificateData)) { Properties = properties; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// [JsonProperty(PropertyName = "properties")] diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/CheckNameAvailabilityParameters.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/CheckNameAvailabilityParameters.cs new file mode 100644 index 000000000000..44c34f1677dd --- /dev/null +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/CheckNameAvailabilityParameters.cs @@ -0,0 +1,66 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.RecoveryServices.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Resource Name availability input parameters - Resource type and + /// resource name + /// + public partial class CheckNameAvailabilityParameters + { + /// + /// Initializes a new instance of the CheckNameAvailabilityParameters + /// class. + /// + public CheckNameAvailabilityParameters() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CheckNameAvailabilityParameters + /// class. + /// + /// Describes the Resource type: + /// Microsoft.RecoveryServices/Vaults + /// Resource name for which availability needs to be + /// checked + public CheckNameAvailabilityParameters(string type = default(string), string name = default(string)) + { + Type = type; + Name = name; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets describes the Resource type: + /// Microsoft.RecoveryServices/Vaults + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + + /// + /// Gets or sets resource name for which availability needs to be + /// checked + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + } +} diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/CheckNameAvailabilityResult.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/CheckNameAvailabilityResult.cs new file mode 100644 index 000000000000..d0b353f02341 --- /dev/null +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/CheckNameAvailabilityResult.cs @@ -0,0 +1,64 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.RecoveryServices.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Response for check name availability API. Resource provider will set + /// availability as true | false. + /// + public partial class CheckNameAvailabilityResult + { + /// + /// Initializes a new instance of the CheckNameAvailabilityResult + /// class. + /// + public CheckNameAvailabilityResult() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CheckNameAvailabilityResult + /// class. + /// + public CheckNameAvailabilityResult(bool? nameAvailable = default(bool?), string reason = default(string), string message = default(string)) + { + NameAvailable = nameAvailable; + Reason = reason; + Message = message; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// + [JsonProperty(PropertyName = "nameAvailable")] + public bool? NameAvailable { get; set; } + + /// + /// + [JsonProperty(PropertyName = "reason")] + public string Reason { get; set; } + + /// + /// + [JsonProperty(PropertyName = "message")] + public string Message { get; set; } + + } +} diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/ClientDiscoveryDisplay.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/ClientDiscoveryDisplay.cs index 822c8c8e8d2f..7e879220bd47 100644 --- a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/ClientDiscoveryDisplay.cs +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/ClientDiscoveryDisplay.cs @@ -1,12 +1,15 @@ -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.RecoveryServices.Models { - using Microsoft.Azure; - using Microsoft.Azure.Management; - using Microsoft.Azure.Management.RecoveryServices; using Newtonsoft.Json; using System.Linq; @@ -18,46 +21,60 @@ public partial class ClientDiscoveryDisplay /// /// Initializes a new instance of the ClientDiscoveryDisplay class. /// - public ClientDiscoveryDisplay() { } + public ClientDiscoveryDisplay() + { + CustomInit(); + } /// /// Initializes a new instance of the ClientDiscoveryDisplay class. /// - /// Name of the resource provider. - /// Type of the resource. - /// Name of the operation. - /// Operation description. + /// Name of the provider for display + /// purposes + /// ResourceType for which this Operation can be + /// performed. + /// Operations Name itself. + /// Description of the operation having + /// details of what operation is about. 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; + CustomInit(); } /// - /// Gets name of the resource provider. + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets name of the provider for display purposes /// - [JsonProperty(PropertyName = "Provider")] - public string Provider { get; private set; } + [JsonProperty(PropertyName = "provider")] + public string Provider { get; set; } /// - /// Gets type of the resource. + /// Gets or sets resourceType for which this Operation can be + /// performed. /// - [JsonProperty(PropertyName = "Resource")] - public string Resource { get; private set; } + [JsonProperty(PropertyName = "resource")] + public string Resource { get; set; } /// - /// Gets name of the operation. + /// Gets or sets operations Name itself. /// - [JsonProperty(PropertyName = "Operation")] - public string Operation { get; private set; } + [JsonProperty(PropertyName = "operation")] + public string Operation { get; set; } /// - /// Gets operation description. + /// Gets or sets description of the operation having details of what + /// operation is about. /// - [JsonProperty(PropertyName = "Description")] - public string Description { get; private set; } + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } } } diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/ClientDiscoveryForLogSpecification.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/ClientDiscoveryForLogSpecification.cs index fb323f122e9d..4baed2829de2 100644 --- a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/ClientDiscoveryForLogSpecification.cs +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/ClientDiscoveryForLogSpecification.cs @@ -1,17 +1,20 @@ -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.RecoveryServices.Models { - using Microsoft.Azure; - using Microsoft.Azure.Management; - using Microsoft.Azure.Management.RecoveryServices; using Newtonsoft.Json; using System.Linq; /// - /// Log specification for the operation. + /// Class to represent shoebox log specification in json client discovery. /// public partial class ClientDiscoveryForLogSpecification { @@ -19,39 +22,49 @@ public partial class ClientDiscoveryForLogSpecification /// Initializes a new instance of the /// ClientDiscoveryForLogSpecification class. /// - public ClientDiscoveryForLogSpecification() { } + public ClientDiscoveryForLogSpecification() + { + CustomInit(); + } /// /// 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?)) + /// Localized display name + /// Blobs created in customer storage + /// account per hour + public ClientDiscoveryForLogSpecification(string name = default(string), string displayName = default(string), string blobDuration = default(string)) { Name = name; DisplayName = displayName; BlobDuration = blobDuration; + CustomInit(); } /// - /// Gets name of the log. + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets name of the log. /// [JsonProperty(PropertyName = "name")] - public string Name { get; private set; } + public string Name { get; set; } /// - /// Gets localized display name. + /// Gets or sets localized display name /// [JsonProperty(PropertyName = "displayName")] - public string DisplayName { get; private set; } + public string DisplayName { get; set; } /// - /// Gets blob duration. + /// Gets or sets blobs created in customer storage account per hour /// [JsonProperty(PropertyName = "blobDuration")] - public System.DateTime? BlobDuration { get; private set; } + public string BlobDuration { get; set; } } } diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/ClientDiscoveryForProperties.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/ClientDiscoveryForProperties.cs new file mode 100644 index 000000000000..3aa50aaea8d0 --- /dev/null +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/ClientDiscoveryForProperties.cs @@ -0,0 +1,53 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.RecoveryServices.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Class to represent shoebox properties in json client discovery. + /// + public partial class ClientDiscoveryForProperties + { + /// + /// Initializes a new instance of the ClientDiscoveryForProperties + /// class. + /// + public ClientDiscoveryForProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ClientDiscoveryForProperties + /// class. + /// + /// Operation properties. + public ClientDiscoveryForProperties(ClientDiscoveryForServiceSpecification serviceSpecification = default(ClientDiscoveryForServiceSpecification)) + { + ServiceSpecification = serviceSpecification; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets operation properties. + /// + [JsonProperty(PropertyName = "serviceSpecification")] + public ClientDiscoveryForServiceSpecification ServiceSpecification { get; set; } + + } +} diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/ClientDiscoveryForServiceSpecification.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/ClientDiscoveryForServiceSpecification.cs index 89f8adeddf57..f97ed49dec0d 100644 --- a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/ClientDiscoveryForServiceSpecification.cs +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/ClientDiscoveryForServiceSpecification.cs @@ -1,19 +1,23 @@ -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.RecoveryServices.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. + /// Class to represent shoebox service specification in json client + /// discovery. /// public partial class ClientDiscoveryForServiceSpecification { @@ -21,7 +25,10 @@ public partial class ClientDiscoveryForServiceSpecification /// Initializes a new instance of the /// ClientDiscoveryForServiceSpecification class. /// - public ClientDiscoveryForServiceSpecification() { } + public ClientDiscoveryForServiceSpecification() + { + CustomInit(); + } /// /// Initializes a new instance of the @@ -32,13 +39,19 @@ public ClientDiscoveryForServiceSpecification() { } public ClientDiscoveryForServiceSpecification(IList logSpecifications = default(IList)) { LogSpecifications = logSpecifications; + CustomInit(); } /// - /// Gets list of log specifications of this operation. + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets list of log specifications of this operation. /// [JsonProperty(PropertyName = "logSpecifications")] - public IList LogSpecifications { get; private set; } + public IList LogSpecifications { get; set; } } } diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/ClientDiscoveryValueForSingleApi.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/ClientDiscoveryValueForSingleApi.cs index 3b93e25482a0..3a73ad409d21 100644 --- a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/ClientDiscoveryValueForSingleApi.cs +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/ClientDiscoveryValueForSingleApi.cs @@ -1,71 +1,83 @@ -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.RecoveryServices.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() { } + public ClientDiscoveryValueForSingleApi() + { + CustomInit(); + } /// /// Initializes a new instance of the ClientDiscoveryValueForSingleApi /// class. /// - /// Name of the operation. + /// Name of the Operation. /// Contains the localized display information - /// for this particular operation. - /// The intended executor of the + /// for this particular operation + /// The intended executor of the operation;governs + /// the display of the operation in the RBAC UX and the audit logs + /// UX + /// ShoeBox properties for the given /// operation. - /// Operation properties. - public ClientDiscoveryValueForSingleApi(string name = default(string), ClientDiscoveryDisplay display = default(ClientDiscoveryDisplay), string origin = default(string), ClientDiscoveryForServiceSpecification serviceSpecification = default(ClientDiscoveryForServiceSpecification)) + public ClientDiscoveryValueForSingleApi(string name = default(string), ClientDiscoveryDisplay display = default(ClientDiscoveryDisplay), string origin = default(string), ClientDiscoveryForProperties properties = default(ClientDiscoveryForProperties)) { Name = name; Display = display; Origin = origin; - ServiceSpecification = serviceSpecification; + Properties = properties; + CustomInit(); } /// - /// Gets name of the operation. + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets name of the Operation. /// - [JsonProperty(PropertyName = "Name")] - public string Name { get; private set; } + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } /// - /// Gets contains the localized display information for this particular - /// operation. + /// Gets or sets contains the localized display information for this + /// particular operation /// - [JsonProperty(PropertyName = "Display")] - public ClientDiscoveryDisplay Display { get; private set; } + [JsonProperty(PropertyName = "display")] + public ClientDiscoveryDisplay Display { get; set; } /// - /// Gets the intended executor of the operation. + /// Gets or sets the intended executor of the operation;governs the + /// display of the operation in the RBAC UX and the audit logs UX /// - [JsonProperty(PropertyName = "Origin")] - public string Origin { get; private set; } + [JsonProperty(PropertyName = "origin")] + public string Origin { get; set; } /// - /// Gets operation properties. + /// Gets or sets shoeBox properties for the given operation. /// - [JsonProperty(PropertyName = "Properties.serviceSpecification")] - public ClientDiscoveryForServiceSpecification ServiceSpecification { get; private set; } + [JsonProperty(PropertyName = "properties")] + public ClientDiscoveryForProperties Properties { get; set; } } } diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/EnhancedSecurityState.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/EnhancedSecurityState.cs deleted file mode 100644 index 0d6874a92bec..000000000000 --- a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/EnhancedSecurityState.cs +++ /dev/null @@ -1,20 +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 EnhancedSecurityState. - /// - public static class EnhancedSecurityState - { - public const string Invalid = "Invalid"; - public const string Enabled = "Enabled"; - public const string Disabled = "Disabled"; - } -} diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/IdentityData.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/IdentityData.cs new file mode 100644 index 000000000000..052f13f2507a --- /dev/null +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/IdentityData.cs @@ -0,0 +1,84 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.RecoveryServices.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Identity for the resource. + /// + public partial class IdentityData + { + /// + /// Initializes a new instance of the IdentityData class. + /// + public IdentityData() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the IdentityData class. + /// + /// The identity type. Possible values include: + /// 'SystemAssigned', 'None' + /// The principal ID of resource + /// identity. + /// The tenant ID of resource. + public IdentityData(string type, string principalId = default(string), string tenantId = default(string)) + { + PrincipalId = principalId; + TenantId = tenantId; + Type = type; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the principal ID of resource identity. + /// + [JsonProperty(PropertyName = "principalId")] + public string PrincipalId { get; private set; } + + /// + /// Gets the tenant ID of resource. + /// + [JsonProperty(PropertyName = "tenantId")] + public string TenantId { get; private set; } + + /// + /// Gets or sets the identity type. Possible values include: + /// 'SystemAssigned', 'None' + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Type == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Type"); + } + } + } +} diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/JobsSummary.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/JobsSummary.cs index cffe781bf1d3..835f3de0e6ec 100644 --- a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/JobsSummary.cs +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/JobsSummary.cs @@ -1,12 +1,15 @@ -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.RecoveryServices.Models { - using Microsoft.Azure; - using Microsoft.Azure.Management; - using Microsoft.Azure.Management.RecoveryServices; using Newtonsoft.Json; using System.Linq; @@ -18,7 +21,10 @@ public partial class JobsSummary /// /// Initializes a new instance of the JobsSummary class. /// - public JobsSummary() { } + public JobsSummary() + { + CustomInit(); + } /// /// Initializes a new instance of the JobsSummary class. @@ -31,8 +37,14 @@ public JobsSummary() { } FailedJobs = failedJobs; SuspendedJobs = suspendedJobs; InProgressJobs = inProgressJobs; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets count of failed jobs. /// diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/MonitoringSummary.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/MonitoringSummary.cs index 9a32ec20e015..faf7a772da1e 100644 --- a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/MonitoringSummary.cs +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/MonitoringSummary.cs @@ -1,12 +1,15 @@ -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.RecoveryServices.Models { - using Microsoft.Azure; - using Microsoft.Azure.Management; - using Microsoft.Azure.Management.RecoveryServices; using Newtonsoft.Json; using System.Linq; @@ -18,7 +21,10 @@ public partial class MonitoringSummary /// /// Initializes a new instance of the MonitoringSummary class. /// - public MonitoringSummary() { } + public MonitoringSummary() + { + CustomInit(); + } /// /// Initializes a new instance of the MonitoringSummary class. @@ -41,8 +47,14 @@ public MonitoringSummary() { } DeprecatedProviderCount = deprecatedProviderCount; SupportedProviderCount = supportedProviderCount; UnsupportedProviderCount = unsupportedProviderCount; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets count of unhealthy VMs. /// diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/NameInfo.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/NameInfo.cs index 464874ec652a..710918fdb27b 100644 --- a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/NameInfo.cs +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/NameInfo.cs @@ -1,12 +1,15 @@ -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.RecoveryServices.Models { - using Microsoft.Azure; - using Microsoft.Azure.Management; - using Microsoft.Azure.Management.RecoveryServices; using Newtonsoft.Json; using System.Linq; @@ -18,7 +21,10 @@ public partial class NameInfo /// /// Initializes a new instance of the NameInfo class. /// - public NameInfo() { } + public NameInfo() + { + CustomInit(); + } /// /// Initializes a new instance of the NameInfo class. @@ -29,8 +35,14 @@ public NameInfo() { } { Value = value; LocalizedValue = localizedValue; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets value of usage. /// diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/Page.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/Page.cs index a85ed111d170..78d0b96806d0 100644 --- a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/Page.cs +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/Page.cs @@ -1,12 +1,15 @@ -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.RecoveryServices.Models { - using Microsoft.Azure; - using Microsoft.Azure.Management; - using Microsoft.Azure.Management.RecoveryServices; using Microsoft.Rest; using Microsoft.Rest.Azure; using Newtonsoft.Json; @@ -23,7 +26,7 @@ public class Page : IPage /// /// Gets the link to the next page. /// - [JsonProperty("NextLink")] + [JsonProperty("")] public string NextPageLink { get; private set; } [JsonProperty("value")] diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/Page1.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/Page1.cs index 71c27deefe11..ff74648fba2a 100644 --- a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/Page1.cs +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/Page1.cs @@ -1,12 +1,15 @@ -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.RecoveryServices.Models { - using Microsoft.Azure; - using Microsoft.Azure.Management; - using Microsoft.Azure.Management.RecoveryServices; using Microsoft.Rest; using Microsoft.Rest.Azure; using Newtonsoft.Json; @@ -23,7 +26,7 @@ public class Page1 : IPage /// /// Gets the link to the next page. /// - [JsonProperty("")] + [JsonProperty("nextLink")] public string NextPageLink { get; private set; } [JsonProperty("value")] diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/PatchTrackedResource.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/PatchTrackedResource.cs new file mode 100644 index 000000000000..f7a7aa9a7db0 --- /dev/null +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/PatchTrackedResource.cs @@ -0,0 +1,69 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.RecoveryServices.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Tracked resource with location. + /// + public partial class PatchTrackedResource : Resource + { + /// + /// Initializes a new instance of the PatchTrackedResource class. + /// + public PatchTrackedResource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PatchTrackedResource 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. + /// Resource location. + /// Resource tags. + public PatchTrackedResource(string id = default(string), string name = default(string), string type = default(string), string eTag = default(string), string location = default(string), IDictionary tags = default(IDictionary)) + : base(id, name, type, eTag) + { + Location = location; + Tags = tags; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// 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; } + + } +} diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/PatchVault.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/PatchVault.cs new file mode 100644 index 000000000000..15f954a38224 --- /dev/null +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/PatchVault.cs @@ -0,0 +1,80 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.RecoveryServices.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Patch Resource information, as returned by the resource provider. + /// + public partial class PatchVault : PatchTrackedResource + { + /// + /// Initializes a new instance of the PatchVault class. + /// + public PatchVault() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PatchVault 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. + /// Resource location. + /// Resource tags. + public PatchVault(string id = default(string), string name = default(string), string type = default(string), string eTag = default(string), string location = default(string), IDictionary tags = default(IDictionary), VaultProperties properties = default(VaultProperties), Sku sku = default(Sku)) + : base(id, name, type, eTag, location, tags) + { + Properties = properties; + Sku = sku; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// + [JsonProperty(PropertyName = "properties")] + public VaultProperties Properties { get; set; } + + /// + /// + [JsonProperty(PropertyName = "sku")] + public Sku Sku { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Sku != null) + { + Sku.Validate(); + } + } + } +} diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/PrivateEndpoint.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/PrivateEndpoint.cs new file mode 100644 index 000000000000..e6750d807ed3 --- /dev/null +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/PrivateEndpoint.cs @@ -0,0 +1,52 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.RecoveryServices.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// The Private Endpoint network resource that is linked to the Private + /// Endpoint connection. + /// + public partial class PrivateEndpoint + { + /// + /// Initializes a new instance of the PrivateEndpoint class. + /// + public PrivateEndpoint() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PrivateEndpoint class. + /// + /// Gets or sets id. + public PrivateEndpoint(string id = default(string)) + { + Id = id; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets id. + /// + [JsonProperty(PropertyName = "id")] + public string Id { get; private set; } + + } +} diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/PrivateEndpointConnection.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/PrivateEndpointConnection.cs new file mode 100644 index 000000000000..399b7b30464d --- /dev/null +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/PrivateEndpointConnection.cs @@ -0,0 +1,67 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.RecoveryServices.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Private Endpoint Connection Response Properties. + /// + public partial class PrivateEndpointConnection + { + /// + /// Initializes a new instance of the PrivateEndpointConnection class. + /// + public PrivateEndpointConnection() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PrivateEndpointConnection class. + /// + /// Gets or sets provisioning state of + /// the private endpoint connection. Possible values include: + /// 'Succeeded', 'Deleting', 'Failed', 'Pending' + public PrivateEndpointConnection(string provisioningState = default(string), PrivateEndpoint privateEndpoint = default(PrivateEndpoint), PrivateLinkServiceConnectionState privateLinkServiceConnectionState = default(PrivateLinkServiceConnectionState)) + { + ProvisioningState = provisioningState; + PrivateEndpoint = privateEndpoint; + PrivateLinkServiceConnectionState = privateLinkServiceConnectionState; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets provisioning state of the private endpoint connection. + /// Possible values include: 'Succeeded', 'Deleting', 'Failed', + /// 'Pending' + /// + [JsonProperty(PropertyName = "provisioningState")] + public string ProvisioningState { get; private set; } + + /// + /// + [JsonProperty(PropertyName = "privateEndpoint")] + public PrivateEndpoint PrivateEndpoint { get; set; } + + /// + /// + [JsonProperty(PropertyName = "privateLinkServiceConnectionState")] + public PrivateLinkServiceConnectionState PrivateLinkServiceConnectionState { get; set; } + + } +} diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/PrivateEndpointConnectionStatus.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/PrivateEndpointConnectionStatus.cs new file mode 100644 index 000000000000..200d7ebed4f8 --- /dev/null +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/PrivateEndpointConnectionStatus.cs @@ -0,0 +1,24 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.RecoveryServices.Models +{ + + /// + /// Defines values for PrivateEndpointConnectionStatus. + /// + public static class PrivateEndpointConnectionStatus + { + public const string Pending = "Pending"; + public const string Approved = "Approved"; + public const string Rejected = "Rejected"; + public const string Disconnected = "Disconnected"; + } +} diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/PrivateEndpointConnectionVaultProperties.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/PrivateEndpointConnectionVaultProperties.cs new file mode 100644 index 000000000000..2ba6421cd145 --- /dev/null +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/PrivateEndpointConnectionVaultProperties.cs @@ -0,0 +1,62 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.RecoveryServices.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Information to be stored in Vault properties as an element of + /// privateEndpointConnections List. + /// + public partial class PrivateEndpointConnectionVaultProperties + { + /// + /// Initializes a new instance of the + /// PrivateEndpointConnectionVaultProperties class. + /// + public PrivateEndpointConnectionVaultProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// PrivateEndpointConnectionVaultProperties class. + /// + /// Format of id + /// subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.[Service]/{resource}/{resourceName}/privateEndpointConnections/{connectionName}. + public PrivateEndpointConnectionVaultProperties(string id = default(string), PrivateEndpointConnection properties = default(PrivateEndpointConnection)) + { + Id = id; + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets format of id + /// subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.[Service]/{resource}/{resourceName}/privateEndpointConnections/{connectionName}. + /// + [JsonProperty(PropertyName = "id")] + public string Id { get; private set; } + + /// + /// + [JsonProperty(PropertyName = "properties")] + public PrivateEndpointConnection Properties { get; set; } + + } +} diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/PrivateLinkResource.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/PrivateLinkResource.cs new file mode 100644 index 000000000000..8f5e9546e9b2 --- /dev/null +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/PrivateLinkResource.cs @@ -0,0 +1,104 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.RecoveryServices.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Information of the private link resource. + /// + [Rest.Serialization.JsonTransformation] + public partial class PrivateLinkResource + { + /// + /// Initializes a new instance of the PrivateLinkResource class. + /// + public PrivateLinkResource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PrivateLinkResource class. + /// + /// e.g. f9ad6492-33d4-4690-9999-6bfd52a0d081 + /// (Backup) or f9ad6492-33d4-4690-9999-6bfd52a0d082 + /// (SiteRecovery) + /// [backup-ecs1, backup-prot1, + /// backup-prot1b, backup-prot1c, backup-id1] + /// The private link resource Private + /// link DNS zone name. + /// Fully qualified identifier of the + /// resource. + /// Name of the resource. + /// e.g. + /// Microsoft.RecoveryServices/vaults/privateLinkResources + public PrivateLinkResource(string groupId = default(string), IList requiredMembers = default(IList), IList requiredZoneNames = default(IList), string id = default(string), string name = default(string), string type = default(string)) + { + GroupId = groupId; + RequiredMembers = requiredMembers; + RequiredZoneNames = requiredZoneNames; + Id = id; + Name = name; + Type = type; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets e.g. f9ad6492-33d4-4690-9999-6bfd52a0d081 (Backup) or + /// f9ad6492-33d4-4690-9999-6bfd52a0d082 (SiteRecovery) + /// + [JsonProperty(PropertyName = "properties.groupId")] + public string GroupId { get; private set; } + + /// + /// Gets [backup-ecs1, backup-prot1, backup-prot1b, backup-prot1c, + /// backup-id1] + /// + [JsonProperty(PropertyName = "properties.requiredMembers")] + public IList RequiredMembers { get; private set; } + + /// + /// Gets the private link resource Private link DNS zone name. + /// + [JsonProperty(PropertyName = "properties.requiredZoneNames")] + public IList RequiredZoneNames { get; private set; } + + /// + /// Gets fully qualified identifier of the resource. + /// + [JsonProperty(PropertyName = "id")] + public string Id { get; private set; } + + /// + /// Gets name of the resource. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; private set; } + + /// + /// Gets e.g. Microsoft.RecoveryServices/vaults/privateLinkResources + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; private set; } + + } +} diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/PrivateLinkServiceConnectionState.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/PrivateLinkServiceConnectionState.cs new file mode 100644 index 000000000000..6e3100e1c51f --- /dev/null +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/PrivateLinkServiceConnectionState.cs @@ -0,0 +1,72 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.RecoveryServices.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Gets or sets private link service connection state. + /// + public partial class PrivateLinkServiceConnectionState + { + /// + /// Initializes a new instance of the PrivateLinkServiceConnectionState + /// class. + /// + public PrivateLinkServiceConnectionState() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PrivateLinkServiceConnectionState + /// class. + /// + /// Gets or sets the status. Possible values + /// include: 'Pending', 'Approved', 'Rejected', 'Disconnected' + /// Gets or sets description. + /// Gets or sets actions + /// required. + public PrivateLinkServiceConnectionState(string status = default(string), string description = default(string), string actionsRequired = default(string)) + { + Status = status; + Description = description; + ActionsRequired = actionsRequired; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the status. Possible values include: 'Pending', + /// 'Approved', 'Rejected', 'Disconnected' + /// + [JsonProperty(PropertyName = "status")] + public string Status { get; private set; } + + /// + /// Gets or sets description. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; private set; } + + /// + /// Gets or sets actions required. + /// + [JsonProperty(PropertyName = "actionsRequired")] + public string ActionsRequired { get; private set; } + + } +} diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/ProvisioningState.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/ProvisioningState.cs new file mode 100644 index 000000000000..95b72ba9f692 --- /dev/null +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/ProvisioningState.cs @@ -0,0 +1,24 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.RecoveryServices.Models +{ + + /// + /// Defines values for ProvisioningState. + /// + public static class ProvisioningState + { + public const string Succeeded = "Succeeded"; + public const string Deleting = "Deleting"; + public const string Failed = "Failed"; + public const string Pending = "Pending"; + } +} diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/RawCertificateData.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/RawCertificateData.cs index 7fe9dd967d61..2f3c1a947420 100644 --- a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/RawCertificateData.cs +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/RawCertificateData.cs @@ -1,12 +1,15 @@ -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.RecoveryServices.Models { - using Microsoft.Azure; - using Microsoft.Azure.Management; - using Microsoft.Azure.Management.RecoveryServices; using Newtonsoft.Json; using System.Linq; @@ -18,7 +21,10 @@ public partial class RawCertificateData /// /// Initializes a new instance of the RawCertificateData class. /// - public RawCertificateData() { } + public RawCertificateData() + { + CustomInit(); + } /// /// Initializes a new instance of the RawCertificateData class. @@ -32,8 +38,14 @@ public RawCertificateData() { } { AuthType = authType; Certificate = certificate; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets specifies the authentication type. Possible values /// include: 'Invalid', 'ACS', 'AAD', 'AccessControlService', diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/ReplicationUsage.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/ReplicationUsage.cs index bc5575c11404..fff27ae4ab0e 100644 --- a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/ReplicationUsage.cs +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/ReplicationUsage.cs @@ -1,12 +1,15 @@ -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.RecoveryServices.Models { - using Microsoft.Azure; - using Microsoft.Azure.Management; - using Microsoft.Azure.Management.RecoveryServices; using Newtonsoft.Json; using System.Linq; @@ -18,7 +21,10 @@ public partial class ReplicationUsage /// /// Initializes a new instance of the ReplicationUsage class. /// - public ReplicationUsage() { } + public ReplicationUsage() + { + CustomInit(); + } /// /// Initializes a new instance of the ReplicationUsage class. @@ -43,8 +49,14 @@ public ReplicationUsage() { } RecoveryPlanCount = recoveryPlanCount; RegisteredServersCount = registeredServersCount; RecoveryServicesProviderAuthType = recoveryServicesProviderAuthType; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets summary of the replication monitoring data for this /// vault. diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/Resource.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/Resource.cs index 186dd6541f7b..a7f83e9364ff 100644 --- a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/Resource.cs +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/Resource.cs @@ -1,12 +1,15 @@ -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.RecoveryServices.Models { - using Microsoft.Azure; - using Microsoft.Azure.Management; - using Microsoft.Azure.Management.RecoveryServices; using Microsoft.Rest; using Microsoft.Rest.Azure; using Newtonsoft.Json; @@ -20,7 +23,10 @@ public partial class Resource : IResource /// /// Initializes a new instance of the Resource class. /// - public Resource() { } + public Resource() + { + CustomInit(); + } /// /// Initializes a new instance of the Resource class. @@ -38,8 +44,14 @@ public Resource() { } Name = name; Type = type; ETag = eTag; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets resource Id represents the complete path to the resource. /// diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/ResourceCertificateAndAADDetails.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/ResourceCertificateAndAadDetails.cs similarity index 88% rename from sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/ResourceCertificateAndAADDetails.cs rename to sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/ResourceCertificateAndAadDetails.cs index 36b09d37fe06..d95a50303f0e 100644 --- a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/ResourceCertificateAndAADDetails.cs +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/ResourceCertificateAndAadDetails.cs @@ -1,12 +1,15 @@ -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.RecoveryServices.Models { - using Microsoft.Azure; - using Microsoft.Azure.Management; - using Microsoft.Azure.Management.RecoveryServices; using Microsoft.Rest; using Newtonsoft.Json; using System.Linq; @@ -21,7 +24,10 @@ public partial class ResourceCertificateAndAadDetails : ResourceCertificateDetai /// Initializes a new instance of the ResourceCertificateAndAadDetails /// class. /// - public ResourceCertificateAndAadDetails() { } + public ResourceCertificateAndAadDetails() + { + CustomInit(); + } /// /// Initializes a new instance of the ResourceCertificateAndAadDetails @@ -37,7 +43,7 @@ public ResourceCertificateAndAadDetails() { } /// Endpoint Audience. /// The base64 encoded certificate raw data /// string. - /// Certificate friendlyname. + /// Certificate friendly name. /// Certificate issuer. /// Resource ID of the vault. /// Certificate Subject Name. @@ -53,8 +59,14 @@ public ResourceCertificateAndAadDetails() { } ServicePrincipalClientId = servicePrincipalClientId; ServicePrincipalObjectId = servicePrincipalObjectId; AzureManagementEndpointAudience = azureManagementEndpointAudience; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets AAD tenant authority. /// diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/ResourceCertificateAndACSDetails.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/ResourceCertificateAndAcsDetails.cs similarity index 85% rename from sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/ResourceCertificateAndACSDetails.cs rename to sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/ResourceCertificateAndAcsDetails.cs index ebf771ff54a3..0015fe09e96a 100644 --- a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/ResourceCertificateAndACSDetails.cs +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/ResourceCertificateAndAcsDetails.cs @@ -1,12 +1,15 @@ -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.RecoveryServices.Models { - using Microsoft.Azure; - using Microsoft.Azure.Management; - using Microsoft.Azure.Management.RecoveryServices; using Microsoft.Rest; using Newtonsoft.Json; using System.Linq; @@ -21,7 +24,10 @@ public partial class ResourceCertificateAndAcsDetails : ResourceCertificateDetai /// Initializes a new instance of the ResourceCertificateAndAcsDetails /// class. /// - public ResourceCertificateAndAcsDetails() { } + public ResourceCertificateAndAcsDetails() + { + CustomInit(); + } /// /// Initializes a new instance of the ResourceCertificateAndAcsDetails @@ -35,7 +41,7 @@ public ResourceCertificateAndAcsDetails() { } /// realm. /// The base64 encoded certificate raw data /// string. - /// Certificate friendlyname. + /// Certificate friendly name. /// Certificate issuer. /// Resource ID of the vault. /// Certificate Subject Name. @@ -49,8 +55,14 @@ public ResourceCertificateAndAcsDetails() { } GlobalAcsNamespace = globalAcsNamespace; GlobalAcsHostName = globalAcsHostName; GlobalAcsRPRealm = globalAcsRPRealm; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets ACS namespace name - tenant for our service. /// diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/ResourceCertificateDetails.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/ResourceCertificateDetails.cs index 6bbf83d61f3b..bcc3c313bae0 100644 --- a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/ResourceCertificateDetails.cs +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/ResourceCertificateDetails.cs @@ -1,12 +1,15 @@ -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.RecoveryServices.Models { - using Microsoft.Azure; - using Microsoft.Azure.Management; - using Microsoft.Azure.Management.RecoveryServices; using Newtonsoft.Json; using System.Linq; @@ -18,14 +21,17 @@ public partial class ResourceCertificateDetails /// /// Initializes a new instance of the ResourceCertificateDetails class. /// - public ResourceCertificateDetails() { } + public ResourceCertificateDetails() + { + CustomInit(); + } /// /// Initializes a new instance of the ResourceCertificateDetails class. /// /// The base64 encoded certificate raw data /// string. - /// Certificate friendlyname. + /// Certificate friendly name. /// Certificate issuer. /// Resource ID of the vault. /// Certificate Subject Name. @@ -43,8 +49,14 @@ public ResourceCertificateDetails() { } Thumbprint = thumbprint; ValidFrom = validFrom; ValidTo = validTo; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets the base64 encoded certificate raw data string. /// @@ -52,7 +64,7 @@ public ResourceCertificateDetails() { } public byte[] Certificate { get; set; } /// - /// Gets or sets certificate friendlyname. + /// Gets or sets certificate friendly name. /// [JsonProperty(PropertyName = "friendlyName")] public string FriendlyName { get; set; } diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/ResourceIdentityType.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/ResourceIdentityType.cs new file mode 100644 index 000000000000..0ea68639fe07 --- /dev/null +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/ResourceIdentityType.cs @@ -0,0 +1,22 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.RecoveryServices.Models +{ + + /// + /// Defines values for ResourceIdentityType. + /// + public static class ResourceIdentityType + { + public const string SystemAssigned = "SystemAssigned"; + public const string None = "None"; + } +} diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/Sku.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/Sku.cs index 12ff6dd20eb5..a5ad264045a5 100644 --- a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/Sku.cs +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/Sku.cs @@ -1,12 +1,15 @@ -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.RecoveryServices.Models { - using Microsoft.Azure; - using Microsoft.Azure.Management; - using Microsoft.Azure.Management.RecoveryServices; using Microsoft.Rest; using Newtonsoft.Json; using System.Linq; @@ -19,7 +22,10 @@ public partial class Sku /// /// Initializes a new instance of the Sku class. /// - public Sku() { } + public Sku() + { + CustomInit(); + } /// /// Initializes a new instance of the Sku class. @@ -29,8 +35,14 @@ public Sku() { } public Sku(string name) { Name = name; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets the Sku name. Possible values include: 'Standard', /// 'RS0' diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/SkuName.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/SkuName.cs index 929f5cac4947..0762af8428ab 100644 --- a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/SkuName.cs +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/SkuName.cs @@ -1,12 +1,15 @@ -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.RecoveryServices.Models { - using Microsoft.Azure; - using Microsoft.Azure.Management; - using Microsoft.Azure.Management.RecoveryServices; /// /// Defines values for SkuName. diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/StorageModelType.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/StorageModelType.cs deleted file mode 100644 index 01b7af11c343..000000000000 --- a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/StorageModelType.cs +++ /dev/null @@ -1,20 +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 StorageModelType. - /// - public static class StorageModelType - { - public const string Invalid = "Invalid"; - public const string GeoRedundant = "GeoRedundant"; - public const string LocallyRedundant = "LocallyRedundant"; - } -} diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/StorageType.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/StorageType.cs deleted file mode 100644 index 068b7393b302..000000000000 --- a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/StorageType.cs +++ /dev/null @@ -1,20 +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 StorageType. - /// - public static class StorageType - { - public const string Invalid = "Invalid"; - public const string GeoRedundant = "GeoRedundant"; - public const string LocallyRedundant = "LocallyRedundant"; - } -} diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/StorageTypeState.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/StorageTypeState.cs deleted file mode 100644 index defd73fd2ebc..000000000000 --- a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/StorageTypeState.cs +++ /dev/null @@ -1,20 +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 StorageTypeState. - /// - public static class StorageTypeState - { - public const string Invalid = "Invalid"; - public const string Locked = "Locked"; - public const string Unlocked = "Unlocked"; - } -} diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/TrackedResource.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/TrackedResource.cs index 08e97c6a1b4a..e363a7093f46 100644 --- a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/TrackedResource.cs +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/TrackedResource.cs @@ -1,12 +1,15 @@ -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.RecoveryServices.Models { - using Microsoft.Azure; - using Microsoft.Azure.Management; - using Microsoft.Azure.Management.RecoveryServices; using Microsoft.Rest; using Newtonsoft.Json; using System.Collections; @@ -21,7 +24,10 @@ public partial class TrackedResource : Resource /// /// Initializes a new instance of the TrackedResource class. /// - public TrackedResource() { } + public TrackedResource() + { + CustomInit(); + } /// /// Initializes a new instance of the TrackedResource class. @@ -40,8 +46,14 @@ public TrackedResource() { } { Location = location; Tags = tags; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets resource location. /// diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/TriggerType.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/TriggerType.cs index 92cbcc1209c8..f327961eec85 100644 --- a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/TriggerType.cs +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/TriggerType.cs @@ -1,12 +1,15 @@ -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.RecoveryServices.Models { - using Microsoft.Azure; - using Microsoft.Azure.Management; - using Microsoft.Azure.Management.RecoveryServices; /// /// Defines values for TriggerType. diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/UpgradeDetails.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/UpgradeDetails.cs index 6911ae62b268..1c983bde08f4 100644 --- a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/UpgradeDetails.cs +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/UpgradeDetails.cs @@ -1,12 +1,15 @@ -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.RecoveryServices.Models { - using Microsoft.Azure; - using Microsoft.Azure.Management; - using Microsoft.Azure.Management.RecoveryServices; using Newtonsoft.Json; using System.Linq; @@ -18,7 +21,10 @@ public partial class UpgradeDetails /// /// Initializes a new instance of the UpgradeDetails class. /// - public UpgradeDetails() { } + public UpgradeDetails() + { + CustomInit(); + } /// /// Initializes a new instance of the UpgradeDetails class. @@ -36,9 +42,8 @@ public UpgradeDetails() { } /// 'Failed' /// Message to the user containing information /// about the upgrade operation. - /// The way the vault upgradation was - /// triggered. Possible values include: 'UserTriggered', - /// 'ForcedUpgrade' + /// The way the vault upgrade was triggered. + /// Possible values include: 'UserTriggered', 'ForcedUpgrade' /// Resource ID of the upgraded /// vault. /// Resource ID of the vault before @@ -54,8 +59,14 @@ public UpgradeDetails() { } TriggerType = triggerType; UpgradedResourceId = upgradedResourceId; PreviousResourceId = previousResourceId; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets ID of the vault upgrade operation. /// @@ -96,7 +107,7 @@ public UpgradeDetails() { } public string Message { get; private set; } /// - /// Gets the way the vault upgradation was triggered. Possible values + /// Gets the way the vault upgrade was triggered. Possible values /// include: 'UserTriggered', 'ForcedUpgrade' /// [JsonProperty(PropertyName = "triggerType")] diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/UsagesUnit.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/UsagesUnit.cs index b80a396c165a..0adfc9a0b1c9 100644 --- a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/UsagesUnit.cs +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/UsagesUnit.cs @@ -1,12 +1,15 @@ -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.RecoveryServices.Models { - using Microsoft.Azure; - using Microsoft.Azure.Management; - using Microsoft.Azure.Management.RecoveryServices; /// /// Defines values for UsagesUnit. diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/Vault.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/Vault.cs index c26953b3cad3..d180b87a4364 100644 --- a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/Vault.cs +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/Vault.cs @@ -1,12 +1,15 @@ -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.RecoveryServices.Models { - using Microsoft.Azure; - using Microsoft.Azure.Management; - using Microsoft.Azure.Management.RecoveryServices; using Newtonsoft.Json; using System.Collections; using System.Collections.Generic; @@ -20,7 +23,10 @@ public partial class Vault : TrackedResource /// /// Initializes a new instance of the Vault class. /// - public Vault() { } + public Vault() + { + CustomInit(); + } /// /// Initializes a new instance of the Vault class. @@ -34,13 +40,25 @@ public Vault() { } /// 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)) + public Vault(string location, string id = default(string), string name = default(string), string type = default(string), string eTag = default(string), IDictionary tags = default(IDictionary), IdentityData identity = default(IdentityData), VaultProperties properties = default(VaultProperties), Sku sku = default(Sku)) : base(location, id, name, type, eTag, tags) { + Identity = identity; Properties = properties; Sku = sku; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// + [JsonProperty(PropertyName = "identity")] + public IdentityData Identity { get; set; } + /// /// [JsonProperty(PropertyName = "properties")] @@ -60,6 +78,10 @@ public Vault() { } public override void Validate() { base.Validate(); + if (Identity != null) + { + Identity.Validate(); + } if (Sku != null) { Sku.Validate(); diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/VaultCertificateResponse.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/VaultCertificateResponse.cs index 56994a122f74..aef05295282e 100644 --- a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/VaultCertificateResponse.cs +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/VaultCertificateResponse.cs @@ -1,12 +1,17 @@ -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.RecoveryServices.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; @@ -14,38 +19,57 @@ namespace Microsoft.Azure.Management.RecoveryServices.Models /// Certificate corresponding to a vault that can be used by clients to /// register themselves with the vault. /// - public partial class VaultCertificateResponse + public partial class VaultCertificateResponse : IResource { /// /// Initializes a new instance of the VaultCertificateResponse class. /// - public VaultCertificateResponse() { } + public VaultCertificateResponse() + { + CustomInit(); + } /// /// Initializes a new instance of the VaultCertificateResponse class. /// + /// Resource name associated with the + /// resource. + /// Resource type represents the complete path of + /// the form Namespace/ResourceType/ResourceType/... + /// Resource Id represents the complete path to the + /// resource. 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; + CustomInit(); } /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets resource name associated with the resource. /// [JsonProperty(PropertyName = "name")] - public string Name { get; set; } + public string Name { get; private set; } /// + /// Gets resource type represents the complete path of the form + /// Namespace/ResourceType/ResourceType/... /// [JsonProperty(PropertyName = "type")] - public string Type { get; set; } + public string Type { get; private set; } /// + /// Gets resource Id represents the complete path to the resource. /// [JsonProperty(PropertyName = "id")] - public string Id { get; set; } + public string Id { get; private set; } /// /// diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/VaultExtendedInfoResource.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/VaultExtendedInfoResource.cs index 03c651de7369..4619f590b8b5 100644 --- a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/VaultExtendedInfoResource.cs +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/VaultExtendedInfoResource.cs @@ -1,12 +1,15 @@ -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.RecoveryServices.Models { - using Microsoft.Azure; - using Microsoft.Azure.Management; - using Microsoft.Azure.Management.RecoveryServices; using Microsoft.Rest; using Microsoft.Rest.Serialization; using Newtonsoft.Json; @@ -21,7 +24,10 @@ public partial class VaultExtendedInfoResource : Resource /// /// Initializes a new instance of the VaultExtendedInfoResource class. /// - public VaultExtendedInfoResource() { } + public VaultExtendedInfoResource() + { + CustomInit(); + } /// /// Initializes a new instance of the VaultExtendedInfoResource class. @@ -37,7 +43,7 @@ public VaultExtendedInfoResource() { } /// Encryption key. /// Encryption key /// thumbprint. - /// Algorithm. + /// Algorithm for Vault ExtendedInfo 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) { @@ -45,8 +51,14 @@ public VaultExtendedInfoResource() { } EncryptionKey = encryptionKey; EncryptionKeyThumbprint = encryptionKeyThumbprint; Algorithm = algorithm; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets integrity key. /// @@ -66,7 +78,7 @@ public VaultExtendedInfoResource() { } public string EncryptionKeyThumbprint { get; set; } /// - /// Gets or sets algorithm. + /// Gets or sets algorithm for Vault ExtendedInfo /// [JsonProperty(PropertyName = "properties.algorithm")] public string Algorithm { get; set; } diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/VaultPrivateEndpointState.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/VaultPrivateEndpointState.cs new file mode 100644 index 000000000000..13548fb0d11e --- /dev/null +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/VaultPrivateEndpointState.cs @@ -0,0 +1,22 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.RecoveryServices.Models +{ + + /// + /// Defines values for VaultPrivateEndpointState. + /// + public static class VaultPrivateEndpointState + { + public const string None = "None"; + public const string Enabled = "Enabled"; + } +} diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/VaultProperties.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/VaultProperties.cs index 72bece3084e0..6c7e81d024d4 100644 --- a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/VaultProperties.cs +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/VaultProperties.cs @@ -1,13 +1,18 @@ -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.RecoveryServices.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; /// @@ -18,18 +23,37 @@ public partial class VaultProperties /// /// Initializes a new instance of the VaultProperties class. /// - public VaultProperties() { } + public VaultProperties() + { + CustomInit(); + } /// /// Initializes a new instance of the VaultProperties class. /// /// Provisioning State. - public VaultProperties(string provisioningState = default(string), UpgradeDetails upgradeDetails = default(UpgradeDetails)) + /// List of private endpoint + /// connection. + /// Private endpoint state + /// for backup. Possible values include: 'None', 'Enabled' + /// Private endpoint + /// state for site recovery. Possible values include: 'None', + /// 'Enabled' + public VaultProperties(string provisioningState = default(string), UpgradeDetails upgradeDetails = default(UpgradeDetails), IList privateEndpointConnections = default(IList), string privateEndpointStateForBackup = default(string), string privateEndpointStateForSiteRecovery = default(string)) { ProvisioningState = provisioningState; UpgradeDetails = upgradeDetails; + PrivateEndpointConnections = privateEndpointConnections; + PrivateEndpointStateForBackup = privateEndpointStateForBackup; + PrivateEndpointStateForSiteRecovery = privateEndpointStateForSiteRecovery; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets provisioning State. /// @@ -41,5 +65,25 @@ public VaultProperties() { } [JsonProperty(PropertyName = "upgradeDetails")] public UpgradeDetails UpgradeDetails { get; set; } + /// + /// Gets list of private endpoint connection. + /// + [JsonProperty(PropertyName = "privateEndpointConnections")] + public IList PrivateEndpointConnections { get; private set; } + + /// + /// Gets private endpoint state for backup. Possible values include: + /// 'None', 'Enabled' + /// + [JsonProperty(PropertyName = "privateEndpointStateForBackup")] + public string PrivateEndpointStateForBackup { get; private set; } + + /// + /// Gets private endpoint state for site recovery. Possible values + /// include: 'None', 'Enabled' + /// + [JsonProperty(PropertyName = "privateEndpointStateForSiteRecovery")] + public string PrivateEndpointStateForSiteRecovery { get; private set; } + } } diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/VaultUpgradeState.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/VaultUpgradeState.cs index e8f8f03a7ea1..b011acee0eca 100644 --- a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/VaultUpgradeState.cs +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/VaultUpgradeState.cs @@ -1,12 +1,15 @@ -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.RecoveryServices.Models { - using Microsoft.Azure; - using Microsoft.Azure.Management; - using Microsoft.Azure.Management.RecoveryServices; /// /// Defines values for VaultUpgradeState. diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/VaultUsage.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/VaultUsage.cs index e30e13ce96d7..b10b1638f966 100644 --- a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/VaultUsage.cs +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Models/VaultUsage.cs @@ -1,12 +1,15 @@ -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.RecoveryServices.Models { - using Microsoft.Azure; - using Microsoft.Azure.Management; - using Microsoft.Azure.Management.RecoveryServices; using Newtonsoft.Json; using System.Linq; @@ -18,7 +21,10 @@ public partial class VaultUsage /// /// Initializes a new instance of the VaultUsage class. /// - public VaultUsage() { } + public VaultUsage() + { + CustomInit(); + } /// /// Initializes a new instance of the VaultUsage class. @@ -39,8 +45,14 @@ public VaultUsage() { } CurrentValue = currentValue; Limit = limit; Name = name; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets unit of the usage. Possible values include: 'Count', /// 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond' diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Operations.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Operations.cs index c5315bcf551f..c9cec23ebdbd 100644 --- a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Operations.cs +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/Operations.cs @@ -1,11 +1,15 @@ -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.RecoveryServices { - using Microsoft.Azure; - using Microsoft.Azure.Management; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; @@ -49,10 +53,6 @@ internal Operations(RecoveryServicesClient client) /// /// 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. /// @@ -74,18 +74,12 @@ internal Operations(RecoveryServicesClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - if (resourceGroupName == null) + if (Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - string apiVersion = "2016-12-01"; - string apiVersion1 = "2016-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -93,25 +87,16 @@ internal Operations(RecoveryServicesClient client) { _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)); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.RecoveryServices/operations").ToString(); List _queryParameters = new List(); - if (apiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); - } - if (apiVersion1 != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion1))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -219,7 +204,7 @@ internal Operations(RecoveryServicesClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -392,7 +377,7 @@ internal Operations(RecoveryServicesClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/OperationsExtensions.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/OperationsExtensions.cs index 2b8a6c75648f..047a83c4e091 100644 --- a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/OperationsExtensions.cs +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/OperationsExtensions.cs @@ -1,11 +1,15 @@ -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.RecoveryServices { - using Microsoft.Azure; - using Microsoft.Azure.Management; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; @@ -23,13 +27,9 @@ public static partial class OperationsExtensions /// /// 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) + public static IPage List(this IOperations operations) { - return operations.ListAsync(resourceGroupName).GetAwaiter().GetResult(); + return operations.ListAsync().GetAwaiter().GetResult(); } /// @@ -38,16 +38,12 @@ public static IPage List(this IOperations oper /// /// 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)) + public static async Task> ListAsync(this IOperations operations, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/BackupVaultConfigsOperations.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/PrivateLinkResourcesOperations.cs similarity index 62% rename from sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/BackupVaultConfigsOperations.cs rename to sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/PrivateLinkResourcesOperations.cs index e6a7ad44a289..7bf40761c42c 100644 --- a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/BackupVaultConfigsOperations.cs +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/PrivateLinkResourcesOperations.cs @@ -1,11 +1,15 @@ -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.RecoveryServices { - using Microsoft.Azure; - using Microsoft.Azure.Management; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; @@ -19,12 +23,12 @@ namespace Microsoft.Azure.Management.RecoveryServices using System.Threading.Tasks; /// - /// BackupVaultConfigsOperations operations. + /// PrivateLinkResourcesOperations operations. /// - internal partial class BackupVaultConfigsOperations : IServiceOperations, IBackupVaultConfigsOperations + internal partial class PrivateLinkResourcesOperations : IServiceOperations, IPrivateLinkResourcesOperations { /// - /// Initializes a new instance of the BackupVaultConfigsOperations class. + /// Initializes a new instance of the PrivateLinkResourcesOperations class. /// /// /// Reference to the service client. @@ -32,7 +36,7 @@ internal partial class BackupVaultConfigsOperations : IServiceOperations /// Thrown when a required parameter is null /// - internal BackupVaultConfigsOperations(RecoveryServicesClient client) + internal PrivateLinkResourcesOperations(RecoveryServicesClient client) { if (client == null) { @@ -47,7 +51,8 @@ internal BackupVaultConfigsOperations(RecoveryServicesClient client) public RecoveryServicesClient Client { get; private set; } /// - /// Fetches vault config. + /// Returns the list of private link resources that need to be created for + /// Backup and SiteRecovery /// /// /// The name of the resource group where the recovery services vault is @@ -77,7 +82,7 @@ internal BackupVaultConfigsOperations(RecoveryServicesClient client) /// /// 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)) + public async Task>> ListWithHttpMessagesAsync(string resourceGroupName, string vaultName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -91,7 +96,10 @@ internal BackupVaultConfigsOperations(RecoveryServicesClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); } - string apiVersion = "2016-12-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -99,22 +107,21 @@ internal BackupVaultConfigsOperations(RecoveryServicesClient client) { _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); + 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}/backupconfig/vaultconfig").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateLinkResources").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) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -209,7 +216,7 @@ internal BackupVaultConfigsOperations(RecoveryServicesClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -222,7 +229,7 @@ internal BackupVaultConfigsOperations(RecoveryServicesClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { @@ -242,7 +249,8 @@ internal BackupVaultConfigsOperations(RecoveryServicesClient client) } /// - /// Updates vault config model type. + /// Returns a specified private link resource that need to be created for + /// Backup and SiteRecovery /// /// /// The name of the resource group where the recovery services vault is @@ -251,8 +259,7 @@ internal BackupVaultConfigsOperations(RecoveryServicesClient client) /// /// The name of the recovery services vault. /// - /// - /// Backup vault config. + /// /// /// /// Headers that will be added to request. @@ -275,7 +282,7 @@ internal BackupVaultConfigsOperations(RecoveryServicesClient client) /// /// 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)) + public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string vaultName, string privateLinkResourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -289,11 +296,14 @@ internal BackupVaultConfigsOperations(RecoveryServicesClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); } - if (backupVaultConfig == null) + if (Client.ApiVersion == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "backupVaultConfig"); + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (privateLinkResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "privateLinkResourceName"); } - string apiVersion = "2016-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -301,23 +311,23 @@ internal BackupVaultConfigsOperations(RecoveryServicesClient client) { _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("privateLinkResourceName", privateLinkResourceName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); + 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(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateLinkResources/{privateLinkResourceName}").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("{privateLinkResourceName}", System.Uri.EscapeDataString(privateLinkResourceName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -326,7 +336,7 @@ internal BackupVaultConfigsOperations(RecoveryServicesClient client) // Create HTTP transport objects var _httpRequest = new HttpRequestMessage(); HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.Method = new HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) @@ -357,12 +367,180 @@ internal BackupVaultConfigsOperations(RecoveryServicesClient client) // Serialize Request string _requestContent = null; - if(backupVaultConfig != 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 private link resources that need to be created for + /// Backup and SiteRecovery + /// + /// + /// 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) { - _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"); + 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) { @@ -418,7 +596,7 @@ internal BackupVaultConfigsOperations(RecoveryServicesClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -431,7 +609,7 @@ internal BackupVaultConfigsOperations(RecoveryServicesClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/PrivateLinkResourcesOperationsExtensions.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/PrivateLinkResourcesOperationsExtensions.cs new file mode 100644 index 000000000000..4c9594cd664e --- /dev/null +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/PrivateLinkResourcesOperationsExtensions.cs @@ -0,0 +1,153 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.RecoveryServices +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for PrivateLinkResourcesOperations. + /// + public static partial class PrivateLinkResourcesOperationsExtensions + { + /// + /// Returns the list of private link resources that need to be created for + /// Backup and SiteRecovery + /// + /// + /// 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 IPage List(this IPrivateLinkResourcesOperations operations, string resourceGroupName, string vaultName) + { + return operations.ListAsync(resourceGroupName, vaultName).GetAwaiter().GetResult(); + } + + /// + /// Returns the list of private link resources that need to be created for + /// Backup and SiteRecovery + /// + /// + /// 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 IPrivateLinkResourcesOperations operations, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, vaultName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Returns a specified private link resource that need to be created for + /// Backup and SiteRecovery + /// + /// + /// 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 PrivateLinkResource Get(this IPrivateLinkResourcesOperations operations, string resourceGroupName, string vaultName, string privateLinkResourceName) + { + return operations.GetAsync(resourceGroupName, vaultName, privateLinkResourceName).GetAwaiter().GetResult(); + } + + /// + /// Returns a specified private link resource that need to be created for + /// Backup and SiteRecovery + /// + /// + /// 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 IPrivateLinkResourcesOperations operations, string resourceGroupName, string vaultName, string privateLinkResourceName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, vaultName, privateLinkResourceName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Returns the list of private link resources that need to be created for + /// Backup and SiteRecovery + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListNext(this IPrivateLinkResourcesOperations operations, string nextPageLink) + { + return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Returns the list of private link resources that need to be created for + /// Backup and SiteRecovery + /// + /// + /// 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 IPrivateLinkResourcesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/RecoveryServicesClient.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/RecoveryServicesClient.cs index bac42da6aea4..9712df407dcc 100644 --- a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/RecoveryServicesClient.cs +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/RecoveryServicesClient.cs @@ -1,11 +1,15 @@ -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.RecoveryServices { - using Microsoft.Azure; - using Microsoft.Azure.Management; using Microsoft.Rest; using Microsoft.Rest.Azure; using Microsoft.Rest.Serialization; @@ -18,7 +22,7 @@ namespace Microsoft.Azure.Management.RecoveryServices using System.Net.Http; /// - /// Composite Swagger for Recovery Services Client + /// Recovery Services Client /// public partial class RecoveryServicesClient : ServiceClient, IRecoveryServicesClient, IAzureClient { @@ -48,56 +52,62 @@ public partial class RecoveryServicesClient : ServiceClient - /// Gets or sets the preferred language for the response. + /// Client Api Version. + /// + public string ApiVersion { get; private set; } + + /// + /// The preferred language for the response. /// public string AcceptLanguage { get; set; } /// - /// Gets or sets the retry timeout in seconds for Long Running Operations. - /// Default value is 30. + /// The retry timeout in seconds for Long Running Operations. Default value is + /// 30. /// public 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. + /// Whether a unique x-ms-client-request-id should be generated. When set to + /// true a unique x-ms-client-request-id value is generated and included in + /// each request. Default is true. /// public bool? GenerateClientRequestId { get; set; } /// - /// Gets the IOperations. + /// Gets the IVaultCertificatesOperations. /// - public virtual IOperations Operations { get; private set; } + public virtual IVaultCertificatesOperations VaultCertificates { get; private set; } /// - /// Gets the IBackupVaultConfigsOperations. + /// Gets the IRegisteredIdentitiesOperations. /// - public virtual IBackupVaultConfigsOperations BackupVaultConfigs { get; private set; } + public virtual IRegisteredIdentitiesOperations RegisteredIdentities { get; private set; } /// - /// Gets the IBackupStorageConfigsOperations. + /// Gets the IReplicationUsagesOperations. /// - public virtual IBackupStorageConfigsOperations BackupStorageConfigs { get; private set; } + public virtual IReplicationUsagesOperations ReplicationUsages { get; private set; } /// - /// Gets the IVaultCertificatesOperations. + /// Gets the IPrivateLinkResourcesOperations. /// - public virtual IVaultCertificatesOperations VaultCertificates { get; private set; } + public virtual IPrivateLinkResourcesOperations PrivateLinkResources { get; private set; } /// - /// Gets the IRegisteredIdentitiesOperations. + /// Gets the IRecoveryServicesOperations. /// - public virtual IRegisteredIdentitiesOperations RegisteredIdentities { get; private set; } + public virtual IRecoveryServicesOperations RecoveryServices { get; private set; } /// - /// Gets the IReplicationUsagesOperations. + /// Gets the IVaultsOperations. /// - public virtual IReplicationUsagesOperations ReplicationUsages { get; private set; } + public virtual IVaultsOperations Vaults { get; private set; } /// - /// Gets the IVaultsOperations. + /// Gets the IOperations. /// - public virtual IVaultsOperations Vaults { get; private set; } + public virtual IOperations Operations { get; private set; } /// /// Gets the IVaultExtendedInfoOperations. @@ -109,6 +119,19 @@ public partial class RecoveryServicesClient : ServiceClient public virtual IUsagesOperations Usages { get; private set; } + /// + /// Initializes a new instance of the RecoveryServicesClient class. + /// + /// + /// HttpClient to be used + /// + /// + /// True: will dispose the provided httpClient on calling RecoveryServicesClient.Dispose(). False: will not dispose provided httpClient + protected RecoveryServicesClient(HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient) + { + Initialize(); + } + /// /// Initializes a new instance of the RecoveryServicesClient class. /// @@ -204,6 +227,33 @@ public RecoveryServicesClient(ServiceClientCredentials credentials, params Deleg } } + /// + /// Initializes a new instance of the RecoveryServicesClient class. + /// + /// + /// Required. Credentials needed for the client to connect to Azure. + /// + /// + /// HttpClient to be used + /// + /// + /// True: will dispose the provided httpClient on calling RecoveryServicesClient.Dispose(). False: will not dispose provided httpClient + /// + /// Thrown when a required parameter is null + /// + public RecoveryServicesClient(ServiceClientCredentials credentials, HttpClient httpClient, bool disposeHttpClient) : this(httpClient, disposeHttpClient) + { + if (credentials == null) + { + throw new System.ArgumentNullException("credentials"); + } + Credentials = credentials; + if (Credentials != null) + { + Credentials.InitializeServiceClient(this); + } + } + /// /// Initializes a new instance of the RecoveryServicesClient class. /// @@ -310,16 +360,17 @@ public RecoveryServicesClient(System.Uri baseUri, ServiceClientCredentials crede /// private void Initialize() { - Operations = new Operations(this); - BackupVaultConfigs = new BackupVaultConfigsOperations(this); - BackupStorageConfigs = new BackupStorageConfigsOperations(this); VaultCertificates = new VaultCertificatesOperations(this); RegisteredIdentities = new RegisteredIdentitiesOperations(this); ReplicationUsages = new ReplicationUsagesOperations(this); + PrivateLinkResources = new PrivateLinkResourcesOperations(this); + RecoveryServices = new RecoveryServicesOperations(this); Vaults = new VaultsOperations(this); + Operations = new Operations(this); VaultExtendedInfo = new VaultExtendedInfoOperations(this); Usages = new UsagesOperations(this); BaseUri = new System.Uri("https://management.azure.com"); + ApiVersion = "2016-06-01"; AcceptLanguage = "en-US"; LongRunningOperationRetryTimeout = 30; GenerateClientRequestId = true; diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/RecoveryServicesOperations.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/RecoveryServicesOperations.cs new file mode 100644 index 000000000000..e8597990c0ad --- /dev/null +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/RecoveryServicesOperations.cs @@ -0,0 +1,269 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.RecoveryServices +{ + 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; + + /// + /// RecoveryServicesOperations operations. + /// + internal partial class RecoveryServicesOperations : IServiceOperations, IRecoveryServicesOperations + { + /// + /// Initializes a new instance of the RecoveryServicesOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal RecoveryServicesOperations(RecoveryServicesClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the RecoveryServicesClient + /// + public RecoveryServicesClient Client { get; private set; } + + /// + /// API to check for resource name availability. + /// A name is available if no other resource exists that has the same + /// SubscriptionId, Resource Name and Type + /// or if one or more such resources exist, each of these must be GC'd and + /// their time of deletion be more than 24 Hours Ago + /// + /// + /// The name of the resource group where the recovery services vault is + /// present. + /// + /// + /// Location of the resource + /// + /// + /// Contains information about Resource type and Resource name + /// + /// + /// 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> CheckNameAvailabilityWithHttpMessagesAsync(string resourceGroupName, string location, CheckNameAvailabilityParameters input, 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 (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (location == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "location"); + } + if (input == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "input"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("location", location); + tracingParameters.Add("input", input); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CheckNameAvailability", 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/locations/{location}/checkNameAvailability").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{location}", System.Uri.EscapeDataString(location)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(input != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(input, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/RecoveryServicesOperationsExtensions.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/RecoveryServicesOperationsExtensions.cs new file mode 100644 index 000000000000..617f09a30e7d --- /dev/null +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/RecoveryServicesOperationsExtensions.cs @@ -0,0 +1,81 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.RecoveryServices +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for RecoveryServicesOperations. + /// + public static partial class RecoveryServicesOperationsExtensions + { + /// + /// API to check for resource name availability. + /// A name is available if no other resource exists that has the same + /// SubscriptionId, Resource Name and Type + /// or if one or more such resources exist, each of these must be GC'd and + /// their time of deletion be more than 24 Hours Ago + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group where the recovery services vault is + /// present. + /// + /// + /// Location of the resource + /// + /// + /// Contains information about Resource type and Resource name + /// + public static CheckNameAvailabilityResult CheckNameAvailability(this IRecoveryServicesOperations operations, string resourceGroupName, string location, CheckNameAvailabilityParameters input) + { + return operations.CheckNameAvailabilityAsync(resourceGroupName, location, input).GetAwaiter().GetResult(); + } + + /// + /// API to check for resource name availability. + /// A name is available if no other resource exists that has the same + /// SubscriptionId, Resource Name and Type + /// or if one or more such resources exist, each of these must be GC'd and + /// their time of deletion be more than 24 Hours Ago + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group where the recovery services vault is + /// present. + /// + /// + /// Location of the resource + /// + /// + /// Contains information about Resource type and Resource name + /// + /// + /// The cancellation token. + /// + public static async Task CheckNameAvailabilityAsync(this IRecoveryServicesOperations operations, string resourceGroupName, string location, CheckNameAvailabilityParameters input, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CheckNameAvailabilityWithHttpMessagesAsync(resourceGroupName, location, input, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/RegisteredIdentitiesOperations.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/RegisteredIdentitiesOperations.cs index 1dc1246ca04f..ab074e806847 100644 --- a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/RegisteredIdentitiesOperations.cs +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/RegisteredIdentitiesOperations.cs @@ -1,11 +1,15 @@ -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.RecoveryServices { - using Microsoft.Azure; - using Microsoft.Azure.Management; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; @@ -83,6 +87,10 @@ internal RegisteredIdentitiesOperations(RecoveryServicesClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (resourceGroupName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); @@ -95,7 +103,6 @@ internal RegisteredIdentitiesOperations(RecoveryServicesClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "identityName"); } - string apiVersion = "2016-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -103,7 +110,6 @@ internal RegisteredIdentitiesOperations(RecoveryServicesClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("identityName", identityName); @@ -118,9 +124,9 @@ internal RegisteredIdentitiesOperations(RecoveryServicesClient client) _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{identityName}", System.Uri.EscapeDataString(identityName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/RegisteredIdentitiesOperationsExtensions.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/RegisteredIdentitiesOperationsExtensions.cs index a7a9c66d17ab..8123a72d26ab 100644 --- a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/RegisteredIdentitiesOperationsExtensions.cs +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/RegisteredIdentitiesOperationsExtensions.cs @@ -1,11 +1,15 @@ -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.RecoveryServices { - using Microsoft.Azure; - using Microsoft.Azure.Management; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/ReplicationUsagesOperations.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/ReplicationUsagesOperations.cs index 88368c496983..9dbe3ce829b7 100644 --- a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/ReplicationUsagesOperations.cs +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/ReplicationUsagesOperations.cs @@ -1,11 +1,15 @@ -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.RecoveryServices { - using Microsoft.Azure; - using Microsoft.Azure.Management; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; @@ -83,6 +87,10 @@ internal ReplicationUsagesOperations(RecoveryServicesClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (resourceGroupName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); @@ -91,7 +99,6 @@ internal ReplicationUsagesOperations(RecoveryServicesClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); } - string apiVersion = "2016-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -99,7 +106,6 @@ internal ReplicationUsagesOperations(RecoveryServicesClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("cancellationToken", cancellationToken); @@ -112,9 +118,9 @@ internal ReplicationUsagesOperations(RecoveryServicesClient client) _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -222,7 +228,7 @@ internal ReplicationUsagesOperations(RecoveryServicesClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/ReplicationUsagesOperationsExtensions.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/ReplicationUsagesOperationsExtensions.cs index 8ac0f197fd16..911036d39380 100644 --- a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/ReplicationUsagesOperationsExtensions.cs +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/ReplicationUsagesOperationsExtensions.cs @@ -1,11 +1,15 @@ -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.RecoveryServices { - using Microsoft.Azure; - using Microsoft.Azure.Management; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/SdkInfo_RecoveryServicesClient.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/SdkInfo_RecoveryServicesClient.cs new file mode 100644 index 000000000000..9abdb146eccd --- /dev/null +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/SdkInfo_RecoveryServicesClient.cs @@ -0,0 +1,35 @@ + +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.RecoveryServices +{ + using System; + using System.Collections.Generic; + using System.Linq; + + internal static partial class SdkInfo + { + public static IEnumerable> ApiInfo_RecoveryServicesClient + { + get + { + return new Tuple[] + { + new Tuple("RecoveryServices", "Operations", "2016-06-01"), + new Tuple("RecoveryServices", "PrivateLinkResources", "2016-06-01"), + new Tuple("RecoveryServices", "RecoveryServices", "2016-06-01"), + new Tuple("RecoveryServices", "RegisteredIdentities", "2016-06-01"), + new Tuple("RecoveryServices", "ReplicationUsages", "2016-06-01"), + new Tuple("RecoveryServices", "Usages", "2016-06-01"), + new Tuple("RecoveryServices", "VaultCertificates", "2016-06-01"), + new Tuple("RecoveryServices", "VaultExtendedInfo", "2016-06-01"), + new Tuple("RecoveryServices", "Vaults", "2016-06-01"), + }.AsEnumerable(); + } + } + } +} diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/UsagesOperations.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/UsagesOperations.cs index bcd8fe0392e7..db8d9141fc39 100644 --- a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/UsagesOperations.cs +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/UsagesOperations.cs @@ -1,11 +1,15 @@ -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.RecoveryServices { - using Microsoft.Azure; - using Microsoft.Azure.Management; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; @@ -83,6 +87,10 @@ internal UsagesOperations(RecoveryServicesClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (resourceGroupName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); @@ -91,7 +99,6 @@ internal UsagesOperations(RecoveryServicesClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); } - string apiVersion = "2016-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -99,7 +106,6 @@ internal UsagesOperations(RecoveryServicesClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("cancellationToken", cancellationToken); @@ -112,9 +118,9 @@ internal UsagesOperations(RecoveryServicesClient client) _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -222,7 +228,7 @@ internal UsagesOperations(RecoveryServicesClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/UsagesOperationsExtensions.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/UsagesOperationsExtensions.cs index 6ab377e8dc21..bcacc758bd98 100644 --- a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/UsagesOperationsExtensions.cs +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/UsagesOperationsExtensions.cs @@ -1,11 +1,15 @@ -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.RecoveryServices { - using Microsoft.Azure; - using Microsoft.Azure.Management; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/VaultCertificatesOperations.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/VaultCertificatesOperations.cs index 3d989c08a509..e753160b7b13 100644 --- a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/VaultCertificatesOperations.cs +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/VaultCertificatesOperations.cs @@ -1,11 +1,15 @@ -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.RecoveryServices { - using Microsoft.Azure; - using Microsoft.Azure.Management; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; @@ -47,7 +51,7 @@ internal VaultCertificatesOperations(RecoveryServicesClient client) public RecoveryServicesClient Client { get; private set; } /// - /// Upload a certificate for a resource. + /// Uploads a certificate for a resource. /// /// /// The name of the resource group where the recovery services vault is @@ -59,8 +63,7 @@ internal VaultCertificatesOperations(RecoveryServicesClient client) /// /// Certificate friendly name. /// - /// - /// Input parameters for uploading the vault certificate. + /// /// /// /// Headers that will be added to request. @@ -83,12 +86,16 @@ internal VaultCertificatesOperations(RecoveryServicesClient client) /// /// 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)) + public async Task> CreateWithHttpMessagesAsync(string resourceGroupName, string vaultName, string certificateName, RawCertificateData properties = default(RawCertificateData), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (resourceGroupName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); @@ -101,11 +108,11 @@ internal VaultCertificatesOperations(RecoveryServicesClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "certificateName"); } - if (certificateRequest == null) + CertificateRequest certificateRequest = new CertificateRequest(); + if (properties != null) { - throw new ValidationException(ValidationRules.CannotBeNull, "certificateRequest"); + certificateRequest.Properties = properties; } - string apiVersion = "2016-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -113,7 +120,6 @@ internal VaultCertificatesOperations(RecoveryServicesClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("certificateName", certificateName); @@ -129,9 +135,9 @@ internal VaultCertificatesOperations(RecoveryServicesClient client) _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); _url = _url.Replace("{certificateName}", System.Uri.EscapeDataString(certificateName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/VaultCertificatesOperationsExtensions.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/VaultCertificatesOperationsExtensions.cs index 0ad1dd14680d..c9d1b3e3c921 100644 --- a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/VaultCertificatesOperationsExtensions.cs +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/VaultCertificatesOperationsExtensions.cs @@ -1,11 +1,15 @@ -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.RecoveryServices { - using Microsoft.Azure; - using Microsoft.Azure.Management; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; @@ -18,7 +22,7 @@ namespace Microsoft.Azure.Management.RecoveryServices public static partial class VaultCertificatesOperationsExtensions { /// - /// Upload a certificate for a resource. + /// Uploads a certificate for a resource. /// /// /// The operations group for this extension method. @@ -33,16 +37,15 @@ public static partial class VaultCertificatesOperationsExtensions /// /// 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) + public static VaultCertificateResponse Create(this IVaultCertificatesOperations operations, string resourceGroupName, string vaultName, string certificateName, RawCertificateData properties = default(RawCertificateData)) { - return operations.CreateAsync(resourceGroupName, vaultName, certificateName, certificateRequest).GetAwaiter().GetResult(); + return operations.CreateAsync(resourceGroupName, vaultName, certificateName, properties).GetAwaiter().GetResult(); } /// - /// Upload a certificate for a resource. + /// Uploads a certificate for a resource. /// /// /// The operations group for this extension method. @@ -57,15 +60,14 @@ public static VaultCertificateResponse Create(this IVaultCertificatesOperations /// /// 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)) + public static async Task CreateAsync(this IVaultCertificatesOperations operations, string resourceGroupName, string vaultName, string certificateName, RawCertificateData properties = default(RawCertificateData), CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.CreateWithHttpMessagesAsync(resourceGroupName, vaultName, certificateName, certificateRequest, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.CreateWithHttpMessagesAsync(resourceGroupName, vaultName, certificateName, properties, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/VaultExtendedInfoOperations.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/VaultExtendedInfoOperations.cs index fff5a01b494e..95765b32c525 100644 --- a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/VaultExtendedInfoOperations.cs +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/VaultExtendedInfoOperations.cs @@ -1,11 +1,15 @@ -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.RecoveryServices { - using Microsoft.Azure; - using Microsoft.Azure.Management; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; @@ -83,6 +87,10 @@ internal VaultExtendedInfoOperations(RecoveryServicesClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (resourceGroupName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); @@ -91,7 +99,6 @@ internal VaultExtendedInfoOperations(RecoveryServicesClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); } - string apiVersion = "2016-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -99,7 +106,6 @@ internal VaultExtendedInfoOperations(RecoveryServicesClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("cancellationToken", cancellationToken); @@ -112,9 +118,9 @@ internal VaultExtendedInfoOperations(RecoveryServicesClient client) _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -252,7 +258,7 @@ internal VaultExtendedInfoOperations(RecoveryServicesClient client) /// The name of the recovery services vault. /// /// - /// resourceResourceExtendedInfoDetails + /// Details of ResourceExtendedInfo /// /// /// Headers that will be added to request. @@ -289,11 +295,14 @@ internal VaultExtendedInfoOperations(RecoveryServicesClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (resourceResourceExtendedInfoDetails == null) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceResourceExtendedInfoDetails"); } - string apiVersion = "2016-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -303,7 +312,6 @@ internal VaultExtendedInfoOperations(RecoveryServicesClient client) 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); @@ -315,9 +323,9 @@ internal VaultExtendedInfoOperations(RecoveryServicesClient client) _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -461,7 +469,7 @@ internal VaultExtendedInfoOperations(RecoveryServicesClient client) /// The name of the recovery services vault. /// /// - /// resourceResourceExtendedInfoDetails + /// Details of ResourceExtendedInfo /// /// /// Headers that will be added to request. @@ -498,11 +506,14 @@ internal VaultExtendedInfoOperations(RecoveryServicesClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (resourceResourceExtendedInfoDetails == null) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceResourceExtendedInfoDetails"); } - string apiVersion = "2016-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -512,7 +523,6 @@ internal VaultExtendedInfoOperations(RecoveryServicesClient client) 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); @@ -524,9 +534,9 @@ internal VaultExtendedInfoOperations(RecoveryServicesClient client) _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/VaultExtendedInfoOperationsExtensions.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/VaultExtendedInfoOperationsExtensions.cs index a238c906bc36..8052c9853c69 100644 --- a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/VaultExtendedInfoOperationsExtensions.cs +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/VaultExtendedInfoOperationsExtensions.cs @@ -1,11 +1,15 @@ -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.RecoveryServices { - using Microsoft.Azure; - using Microsoft.Azure.Management; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; @@ -73,7 +77,7 @@ public static VaultExtendedInfoResource Get(this IVaultExtendedInfoOperations op /// The name of the recovery services vault. /// /// - /// resourceResourceExtendedInfoDetails + /// Details of ResourceExtendedInfo /// public static VaultExtendedInfoResource CreateOrUpdate(this IVaultExtendedInfoOperations operations, string resourceGroupName, string vaultName, VaultExtendedInfoResource resourceResourceExtendedInfoDetails) { @@ -94,7 +98,7 @@ public static VaultExtendedInfoResource CreateOrUpdate(this IVaultExtendedInfoOp /// The name of the recovery services vault. /// /// - /// resourceResourceExtendedInfoDetails + /// Details of ResourceExtendedInfo /// /// /// The cancellation token. @@ -121,7 +125,7 @@ public static VaultExtendedInfoResource CreateOrUpdate(this IVaultExtendedInfoOp /// The name of the recovery services vault. /// /// - /// resourceResourceExtendedInfoDetails + /// Details of ResourceExtendedInfo /// public static VaultExtendedInfoResource Update(this IVaultExtendedInfoOperations operations, string resourceGroupName, string vaultName, VaultExtendedInfoResource resourceResourceExtendedInfoDetails) { @@ -142,7 +146,7 @@ public static VaultExtendedInfoResource Update(this IVaultExtendedInfoOperations /// The name of the recovery services vault. /// /// - /// resourceResourceExtendedInfoDetails + /// Details of ResourceExtendedInfo /// /// /// The cancellation token. diff --git a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/VaultsOperations.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/VaultsOperations.cs index af9955f19eeb..4cd317dd120c 100644 --- a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/VaultsOperations.cs +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/VaultsOperations.cs @@ -1,11 +1,15 @@ -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.RecoveryServices { - using Microsoft.Azure; - using Microsoft.Azure.Management; using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; @@ -70,13 +74,16 @@ internal VaultsOperations(RecoveryServicesClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListBySubscriptionIdWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + 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"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -84,7 +91,6 @@ internal VaultsOperations(RecoveryServicesClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "ListBySubscriptionId", tracingParameters); } @@ -93,9 +99,9 @@ internal VaultsOperations(RecoveryServicesClient client) 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) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -190,7 +196,7 @@ internal VaultsOperations(RecoveryServicesClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -250,17 +256,20 @@ internal VaultsOperations(RecoveryServicesClient client) /// /// A response object containing the response body and response headers. /// - public async Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (resourceGroupName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } - string apiVersion = "2016-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -268,7 +277,6 @@ internal VaultsOperations(RecoveryServicesClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroup", tracingParameters); @@ -279,9 +287,9 @@ internal VaultsOperations(RecoveryServicesClient client) _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -376,7 +384,7 @@ internal VaultsOperations(RecoveryServicesClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse>(); + var _result = new AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -445,6 +453,10 @@ internal VaultsOperations(RecoveryServicesClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (resourceGroupName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); @@ -453,7 +465,6 @@ internal VaultsOperations(RecoveryServicesClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); } - string apiVersion = "2016-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -461,7 +472,6 @@ internal VaultsOperations(RecoveryServicesClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("cancellationToken", cancellationToken); @@ -474,9 +484,9 @@ internal VaultsOperations(RecoveryServicesClient client) _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -643,6 +653,10 @@ internal VaultsOperations(RecoveryServicesClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (resourceGroupName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); @@ -659,7 +673,6 @@ internal VaultsOperations(RecoveryServicesClient client) { vault.Validate(); } - string apiVersion = "2016-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -667,7 +680,6 @@ internal VaultsOperations(RecoveryServicesClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("vault", vault); @@ -681,9 +693,9 @@ internal VaultsOperations(RecoveryServicesClient client) _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -868,6 +880,10 @@ internal VaultsOperations(RecoveryServicesClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (resourceGroupName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); @@ -876,7 +892,6 @@ internal VaultsOperations(RecoveryServicesClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "vaultName"); } - string apiVersion = "2016-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -884,7 +899,6 @@ internal VaultsOperations(RecoveryServicesClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("cancellationToken", cancellationToken); @@ -897,9 +911,9 @@ internal VaultsOperations(RecoveryServicesClient client) _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -1042,12 +1056,16 @@ internal VaultsOperations(RecoveryServicesClient client) /// /// A response object containing the response body and response headers. /// - public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string vaultName, Vault vault, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string vaultName, PatchVault vault, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (resourceGroupName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); @@ -1060,7 +1078,6 @@ internal VaultsOperations(RecoveryServicesClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "vault"); } - string apiVersion = "2016-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1068,7 +1085,6 @@ internal VaultsOperations(RecoveryServicesClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("vaultName", vaultName); tracingParameters.Add("vault", vault); @@ -1082,9 +1098,9 @@ internal VaultsOperations(RecoveryServicesClient client) _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{vaultName}", System.Uri.EscapeDataString(vaultName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -1235,5 +1251,351 @@ internal VaultsOperations(RecoveryServicesClient client) return _result; } + /// + /// Fetches all the resources of the specified type in the subscription. + /// + /// + /// 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>> ListBySubscriptionIdNextWithHttpMessagesAsync(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, "ListBySubscriptionIdNext", 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; + } + + /// + /// Retrieve a list of Vaults. + /// + /// + /// 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>> ListByResourceGroupNextWithHttpMessagesAsync(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, "ListByResourceGroupNext", 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/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/VaultsOperationsExtensions.cs b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/VaultsOperationsExtensions.cs index 2b8115d599ea..491496494361 100644 --- a/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/VaultsOperationsExtensions.cs +++ b/sdk/recoveryservices/Microsoft.Azure.Management.RecoveryServices/src/Generated/VaultsOperationsExtensions.cs @@ -1,16 +1,18 @@ -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. +// namespace Microsoft.Azure.Management.RecoveryServices { - 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; @@ -25,7 +27,7 @@ public static partial class VaultsOperationsExtensions /// /// The operations group for this extension method. /// - public static IEnumerable ListBySubscriptionId(this IVaultsOperations operations) + public static IPage ListBySubscriptionId(this IVaultsOperations operations) { return operations.ListBySubscriptionIdAsync().GetAwaiter().GetResult(); } @@ -39,7 +41,7 @@ public static IEnumerable ListBySubscriptionId(this IVaultsOperations ope /// /// The cancellation token. /// - public static async Task> ListBySubscriptionIdAsync(this IVaultsOperations operations, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListBySubscriptionIdAsync(this IVaultsOperations operations, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListBySubscriptionIdWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { @@ -57,7 +59,7 @@ public static IEnumerable ListBySubscriptionId(this IVaultsOperations ope /// The name of the resource group where the recovery services vault is /// present. /// - public static IEnumerable ListByResourceGroup(this IVaultsOperations operations, string resourceGroupName) + public static IPage ListByResourceGroup(this IVaultsOperations operations, string resourceGroupName) { return operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult(); } @@ -75,7 +77,7 @@ public static IEnumerable ListByResourceGroup(this IVaultsOperations oper /// /// The cancellation token. /// - public static async Task> ListByResourceGroupAsync(this IVaultsOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task> ListByResourceGroupAsync(this IVaultsOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false)) { @@ -228,7 +230,7 @@ public static void Delete(this IVaultsOperations operations, string resourceGrou /// /// Recovery Services Vault to be created. /// - public static Vault Update(this IVaultsOperations operations, string resourceGroupName, string vaultName, Vault vault) + public static Vault Update(this IVaultsOperations operations, string resourceGroupName, string vaultName, PatchVault vault) { return operations.UpdateAsync(resourceGroupName, vaultName, vault).GetAwaiter().GetResult(); } @@ -252,7 +254,7 @@ public static Vault Update(this IVaultsOperations operations, string resourceGro /// /// The cancellation token. /// - public static async Task UpdateAsync(this IVaultsOperations operations, string resourceGroupName, string vaultName, Vault vault, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task UpdateAsync(this IVaultsOperations operations, string resourceGroupName, string vaultName, PatchVault vault, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, vaultName, vault, null, cancellationToken).ConfigureAwait(false)) { @@ -260,5 +262,73 @@ public static Vault Update(this IVaultsOperations operations, string resourceGro } } + /// + /// Fetches all the resources of the specified type in the subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListBySubscriptionIdNext(this IVaultsOperations operations, string nextPageLink) + { + return operations.ListBySubscriptionIdNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Fetches all the resources of the specified type in the subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListBySubscriptionIdNextAsync(this IVaultsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListBySubscriptionIdNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Retrieve a list of Vaults. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByResourceGroupNext(this IVaultsOperations operations, string nextPageLink) + { + return operations.ListByResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Retrieve a list of Vaults. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByResourceGroupNextAsync(this IVaultsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByResourceGroupNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + } }